From 8d442db358ff46537e5d623720d909b4a8416df2 Mon Sep 17 00:00:00 2001 From: Zhao Cheng Date: Fri, 21 Sep 2012 10:28:35 +0800 Subject: [PATCH] [WebKit] Ignore restrictions on window.focus and window.blur. Part of fixes for #34. --- patches/webkit.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/patches/webkit.patch b/patches/webkit.patch index 391784139a..5e4a4d8c78 100644 --- a/patches/webkit.patch +++ b/patches/webkit.patch @@ -143,6 +143,30 @@ index 668edbc..08eba45 100644 virtual bool allowScriptExtension(const String& extensionName, int extensionGroup, int worldId) = 0; #endif +diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp +index c4651d7..d7cc791 100644 +--- a/Source/WebCore/page/DOMWindow.cpp ++++ b/Source/WebCore/page/DOMWindow.cpp +@@ -908,6 +908,8 @@ void DOMWindow::focus(ScriptExecutionContext* context) + allowFocus = true; + } + ++ allowFocus = true; ++ + // If we're a top level window, bring the window to the front. + if (m_frame == page->mainFrame() && allowFocus) + page->chrome()->focus(); +@@ -928,8 +930,10 @@ void DOMWindow::blur() + if (!page) + return; + ++#if 0 + if (m_frame->settings()->windowFocusRestricted()) + return; ++#endif + + if (m_frame != page->mainFrame()) + return; diff --git a/Source/WebCore/page/SecurityOrigin.cpp b/Source/WebCore/page/SecurityOrigin.cpp index da15021..d015104 100644 --- a/Source/WebCore/page/SecurityOrigin.cpp