Loading dom/base/test/gtest/TestParserDialogOptions.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ #include "gtest/gtest.h" #include "nsGlobalWindow.h" // XXX(nika): I can't find any non-test callers of this code, can we remove it? struct dialog_test { const char* input; const char* output; Loading @@ -25,7 +27,7 @@ void runTokenizeTest(dialog_test& test) nsAutoString result; nsAutoString token; while (nsGlobalWindow::TokenizeDialogOptions(token, iter, end)) { while (nsGlobalWindowInner::TokenizeDialogOptions(token, iter, end)) { if (!result.IsEmpty()) { result.Append(','); } Loading @@ -41,7 +43,7 @@ void runTest(dialog_test& test) NS_ConvertUTF8toUTF16 input(test.input); nsAutoString result; nsGlobalWindow::ConvertDialogOptions(input, result); nsGlobalWindowInner::ConvertDialogOptions(input, result); ASSERT_STREQ(test.output, NS_ConvertUTF16toUTF8(result).get()) << "Testing " << test.input; } Loading dom/webidl/Window.webidl +19 −19 Original line number Diff line number Diff line Loading @@ -377,19 +377,19 @@ partial interface Window { // Mozilla extensions for Chrome windows. partial interface Window { // The STATE_* constants need to match the corresponding enum in nsGlobalWindow.cpp. [Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] const unsigned short STATE_MAXIMIZED = 1; [Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] const unsigned short STATE_MINIMIZED = 2; [Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] const unsigned short STATE_NORMAL = 3; [Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] const unsigned short STATE_FULLSCREEN = 4; [Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] readonly attribute unsigned short windowState; [Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] readonly attribute boolean isFullyOccluded; /** Loading @@ -397,40 +397,40 @@ partial interface Window { * utility functions implemented by chrome script. It will be null * for DOMWindows not corresponding to browsers. */ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] attribute nsIBrowserDOMWindow? browserDOMWindow; [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] void getAttention(); [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] void getAttentionWithCycleCount(long aCycleCount); [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] void setCursor(DOMString cursor); [Func="nsGlobalWindow::IsPrivilegedChromeWindow", UnsafeInPrerendering] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow", UnsafeInPrerendering] void maximize(); [Func="nsGlobalWindow::IsPrivilegedChromeWindow", UnsafeInPrerendering] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow", UnsafeInPrerendering] void minimize(); [Func="nsGlobalWindow::IsPrivilegedChromeWindow", UnsafeInPrerendering] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow", UnsafeInPrerendering] void restore(); /** * Notify a default button is loaded on a dialog or a wizard. * defaultButton is the default button. */ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] void notifyDefaultButtonLoaded(Element defaultButton); [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] readonly attribute nsIMessageBroadcaster messageManager; /** * Returns the message manager identified by the given group name that * manages all frame loaders belonging to that group. */ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] nsIMessageBroadcaster getGroupMessageManager(DOMString aGroup); /** Loading @@ -443,7 +443,7 @@ partial interface Window { * * Throws NS_ERROR_NOT_IMPLEMENTED if the OS doesn't support this. */ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] void beginWindowMove(Event mouseDownEvent, optional Element? panel = null); [Func="IsChromeOrXBL"] Loading Loading @@ -478,10 +478,10 @@ partial interface Window { Window implements WindowOrWorkerGlobalScope; partial interface Window { [Throws, Func="nsGlobalWindow::IsRequestIdleCallbackEnabled"] [Throws, Func="nsGlobalWindowInner::IsRequestIdleCallbackEnabled"] unsigned long requestIdleCallback(IdleRequestCallback callback, optional IdleRequestOptions options); [Func="nsGlobalWindow::IsRequestIdleCallbackEnabled"] [Func="nsGlobalWindowInner::IsRequestIdleCallbackEnabled"] void cancelIdleCallback(unsigned long handle); }; Loading js/xpconnect/src/XPCJSContext.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -711,13 +711,13 @@ XPCJSContext::InterruptCallback(JSContext* cx) } // Show the prompt to the user, and kill if requested. nsGlobalWindow::SlowScriptResponse response = win->ShowSlowScriptDialog(addonId); if (response == nsGlobalWindow::KillSlowScript) { nsGlobalWindowInner::SlowScriptResponse response = win->ShowSlowScriptDialog(addonId); if (response == nsGlobalWindowInner::KillSlowScript) { if (Preferences::GetBool("dom.global_stop_script", true)) xpc::Scriptability::Get(global).Block(); return false; } if (response == nsGlobalWindow::KillScriptGlobal) { if (response == nsGlobalWindowInner::KillScriptGlobal) { nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService(); if (!IsSandbox(global) || !obs) Loading @@ -742,10 +742,10 @@ XPCJSContext::InterruptCallback(JSContext* cx) // The user chose to continue the script. Reset the timer, and disable this // machinery with a pref of the user opted out of future slow-script dialogs. if (response != nsGlobalWindow::ContinueSlowScriptAndKeepNotifying) if (response != nsGlobalWindowInner::ContinueSlowScriptAndKeepNotifying) self->mSlowScriptCheckpoint = TimeStamp::NowLoRes(); if (response == nsGlobalWindow::AlwaysContinueSlowScript) if (response == nsGlobalWindowInner::AlwaysContinueSlowScript) Preferences::SetInt(prefName, 0); return true; Loading layout/base/nsDocumentViewer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1224,7 +1224,7 @@ nsDocumentViewer::PermitUnloadInternal(bool *aShouldPrompt, // Never permit dialogs from the beforeunload handler nsGlobalWindowOuter* globalWindow = nsGlobalWindowOuter::Cast(window); dialogsAreEnabled = globalWindow->AreDialogsEnabled(); nsGlobalWindow::TemporarilyDisableDialogs disableDialogs(globalWindow); nsGlobalWindowOuter::TemporarilyDisableDialogs disableDialogs(globalWindow); nsIDocument::PageUnloadingEventTimeStamp timestamp(mDocument); Loading layout/build/nsLayoutStatics.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -166,7 +166,8 @@ nsLayoutStatics::Initialize() return rv; } nsGlobalWindow::Init(); // XXX: Arbitrarially choose inner window? nsGlobalWindowInner::Init(); Navigator::Init(); nsXBLService::Init(); Loading Loading @@ -380,7 +381,8 @@ nsLayoutStatics::Shutdown() RuleProcessorCache::Shutdown(); ShutdownJSEnvironment(); nsGlobalWindow::ShutDown(); // XXX: Arbitrarially choose inner window? nsGlobalWindowInner::ShutDown(); nsDOMClassInfo::ShutDown(); WebIDLGlobalNameHash::Shutdown(); nsListControlFrame::Shutdown(); Loading Loading
dom/base/test/gtest/TestParserDialogOptions.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ #include "gtest/gtest.h" #include "nsGlobalWindow.h" // XXX(nika): I can't find any non-test callers of this code, can we remove it? struct dialog_test { const char* input; const char* output; Loading @@ -25,7 +27,7 @@ void runTokenizeTest(dialog_test& test) nsAutoString result; nsAutoString token; while (nsGlobalWindow::TokenizeDialogOptions(token, iter, end)) { while (nsGlobalWindowInner::TokenizeDialogOptions(token, iter, end)) { if (!result.IsEmpty()) { result.Append(','); } Loading @@ -41,7 +43,7 @@ void runTest(dialog_test& test) NS_ConvertUTF8toUTF16 input(test.input); nsAutoString result; nsGlobalWindow::ConvertDialogOptions(input, result); nsGlobalWindowInner::ConvertDialogOptions(input, result); ASSERT_STREQ(test.output, NS_ConvertUTF16toUTF8(result).get()) << "Testing " << test.input; } Loading
dom/webidl/Window.webidl +19 −19 Original line number Diff line number Diff line Loading @@ -377,19 +377,19 @@ partial interface Window { // Mozilla extensions for Chrome windows. partial interface Window { // The STATE_* constants need to match the corresponding enum in nsGlobalWindow.cpp. [Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] const unsigned short STATE_MAXIMIZED = 1; [Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] const unsigned short STATE_MINIMIZED = 2; [Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] const unsigned short STATE_NORMAL = 3; [Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] const unsigned short STATE_FULLSCREEN = 4; [Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] readonly attribute unsigned short windowState; [Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] readonly attribute boolean isFullyOccluded; /** Loading @@ -397,40 +397,40 @@ partial interface Window { * utility functions implemented by chrome script. It will be null * for DOMWindows not corresponding to browsers. */ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] attribute nsIBrowserDOMWindow? browserDOMWindow; [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] void getAttention(); [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] void getAttentionWithCycleCount(long aCycleCount); [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] void setCursor(DOMString cursor); [Func="nsGlobalWindow::IsPrivilegedChromeWindow", UnsafeInPrerendering] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow", UnsafeInPrerendering] void maximize(); [Func="nsGlobalWindow::IsPrivilegedChromeWindow", UnsafeInPrerendering] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow", UnsafeInPrerendering] void minimize(); [Func="nsGlobalWindow::IsPrivilegedChromeWindow", UnsafeInPrerendering] [Func="nsGlobalWindowInner::IsPrivilegedChromeWindow", UnsafeInPrerendering] void restore(); /** * Notify a default button is loaded on a dialog or a wizard. * defaultButton is the default button. */ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] void notifyDefaultButtonLoaded(Element defaultButton); [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] readonly attribute nsIMessageBroadcaster messageManager; /** * Returns the message manager identified by the given group name that * manages all frame loaders belonging to that group. */ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] nsIMessageBroadcaster getGroupMessageManager(DOMString aGroup); /** Loading @@ -443,7 +443,7 @@ partial interface Window { * * Throws NS_ERROR_NOT_IMPLEMENTED if the OS doesn't support this. */ [Throws, Func="nsGlobalWindow::IsPrivilegedChromeWindow"] [Throws, Func="nsGlobalWindowInner::IsPrivilegedChromeWindow"] void beginWindowMove(Event mouseDownEvent, optional Element? panel = null); [Func="IsChromeOrXBL"] Loading Loading @@ -478,10 +478,10 @@ partial interface Window { Window implements WindowOrWorkerGlobalScope; partial interface Window { [Throws, Func="nsGlobalWindow::IsRequestIdleCallbackEnabled"] [Throws, Func="nsGlobalWindowInner::IsRequestIdleCallbackEnabled"] unsigned long requestIdleCallback(IdleRequestCallback callback, optional IdleRequestOptions options); [Func="nsGlobalWindow::IsRequestIdleCallbackEnabled"] [Func="nsGlobalWindowInner::IsRequestIdleCallbackEnabled"] void cancelIdleCallback(unsigned long handle); }; Loading
js/xpconnect/src/XPCJSContext.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -711,13 +711,13 @@ XPCJSContext::InterruptCallback(JSContext* cx) } // Show the prompt to the user, and kill if requested. nsGlobalWindow::SlowScriptResponse response = win->ShowSlowScriptDialog(addonId); if (response == nsGlobalWindow::KillSlowScript) { nsGlobalWindowInner::SlowScriptResponse response = win->ShowSlowScriptDialog(addonId); if (response == nsGlobalWindowInner::KillSlowScript) { if (Preferences::GetBool("dom.global_stop_script", true)) xpc::Scriptability::Get(global).Block(); return false; } if (response == nsGlobalWindow::KillScriptGlobal) { if (response == nsGlobalWindowInner::KillScriptGlobal) { nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService(); if (!IsSandbox(global) || !obs) Loading @@ -742,10 +742,10 @@ XPCJSContext::InterruptCallback(JSContext* cx) // The user chose to continue the script. Reset the timer, and disable this // machinery with a pref of the user opted out of future slow-script dialogs. if (response != nsGlobalWindow::ContinueSlowScriptAndKeepNotifying) if (response != nsGlobalWindowInner::ContinueSlowScriptAndKeepNotifying) self->mSlowScriptCheckpoint = TimeStamp::NowLoRes(); if (response == nsGlobalWindow::AlwaysContinueSlowScript) if (response == nsGlobalWindowInner::AlwaysContinueSlowScript) Preferences::SetInt(prefName, 0); return true; Loading
layout/base/nsDocumentViewer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1224,7 +1224,7 @@ nsDocumentViewer::PermitUnloadInternal(bool *aShouldPrompt, // Never permit dialogs from the beforeunload handler nsGlobalWindowOuter* globalWindow = nsGlobalWindowOuter::Cast(window); dialogsAreEnabled = globalWindow->AreDialogsEnabled(); nsGlobalWindow::TemporarilyDisableDialogs disableDialogs(globalWindow); nsGlobalWindowOuter::TemporarilyDisableDialogs disableDialogs(globalWindow); nsIDocument::PageUnloadingEventTimeStamp timestamp(mDocument); Loading
layout/build/nsLayoutStatics.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -166,7 +166,8 @@ nsLayoutStatics::Initialize() return rv; } nsGlobalWindow::Init(); // XXX: Arbitrarially choose inner window? nsGlobalWindowInner::Init(); Navigator::Init(); nsXBLService::Init(); Loading Loading @@ -380,7 +381,8 @@ nsLayoutStatics::Shutdown() RuleProcessorCache::Shutdown(); ShutdownJSEnvironment(); nsGlobalWindow::ShutDown(); // XXX: Arbitrarially choose inner window? nsGlobalWindowInner::ShutDown(); nsDOMClassInfo::ShutDown(); WebIDLGlobalNameHash::Shutdown(); nsListControlFrame::Shutdown(); Loading