Skip to content

Commit

Permalink
[WebKit] Ignore restrictions on window.focus and window.blur.
Browse files Browse the repository at this point in the history
Part of fixes for #34.
  • Loading branch information
zcbenz committed Sep 21, 2012
1 parent cd6f81e commit 8d442db
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions patches/webkit.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d442db

Please sign in to comment.