Fix CPPlatformWindow's title bug

if setTitle: is called on a CPWindow with the primaryPlatformWindow as platformWindow,
the main page's title is changed. This patch prevent changing the primaryPlatformWindow's title.
This is not optimal, but this is better than changing the title at each window setTitle: call
This commit is contained in:
Antoine Mercadal committed 2011-09-02 12:42:09 +02:00
1 parent 608cb86a4a
commit be10bcf27a
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -264,7 +264,8 @@ var PrimaryPlatformWindow = NULL;
_title = aTitle;
#if PLATFORM(DOM)
if (_DOMWindow && _DOMWindow.document)
if (_DOMWindow && _DOMWindow.document
&& (self != [CPPlatformWindow primaryPlatformWindow]))
_DOMWindow.document.title = _title;
#endif
}
+2 -1
View File
@@ -541,7 +541,8 @@ var ModifierKeyCodes = [
// FIXME: cpSetFrame?
_DOMWindow.document.write("<!DOCTYPE html><html lang='en'><head></head><body style='background-color:transparent;'></body></html>");
_DOMWindow.document.close();
_DOMWindow.document.title = _title;
if (self != [CPPlatformWindow primaryPlatformWindow])
_DOMWindow.document.title = _title;
if (![CPPlatform isBrowser])
{