Title: [152348] trunk/Source
Revision
152348
Author
[email protected]
Date
2013-07-03 03:13:34 -0700 (Wed, 03 Jul 2013)

Log Message

H&R Block 2010 Help window can not be reopened.
https://bugs.webkit.org/show_bug.cgi?id=118342

Patch by Zalan Bujtas <[email protected]> on 2013-07-03
Reviewed by Antti Koivisto.

http://trac.webkit.org/changeset/118916 changed the window.focus() behaviour so that
only the opener can (re)focus() a particular window.
H&R Block app relies on the relaxed window.focus() rules.

Source/WebCore:

* WebCore.exp.in:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsHRBlock):
* platform/RuntimeApplicationChecks.h:

Source/WebKit/mac:

* WebView/WebView.mm:
(shouldRestrictWindowFocus):
(-[WebView _preferencesChanged:]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (152347 => 152348)


--- trunk/Source/WebCore/ChangeLog	2013-07-03 10:06:14 UTC (rev 152347)
+++ trunk/Source/WebCore/ChangeLog	2013-07-03 10:13:34 UTC (rev 152348)
@@ -1,3 +1,19 @@
+2013-07-03  Zalan Bujtas  <[email protected]>
+
+        H&R Block 2010 Help window can not be reopened.
+        https://bugs.webkit.org/show_bug.cgi?id=118342
+
+        Reviewed by Antti Koivisto.
+
+        http://trac.webkit.org/changeset/118916 changed the window.focus() behaviour so that
+        only the opener can (re)focus() a particular window.
+        H&R Block app relies on the relaxed window.focus() rules.
+
+        * WebCore.exp.in:
+        * platform/RuntimeApplicationChecks.cpp:
+        (WebCore::applicationIsHRBlock):
+        * platform/RuntimeApplicationChecks.h:
+
 2013-07-03  Zan Dobersek  <[email protected]>
 
         Further build fixing for build configurations that disable CSS regions support.

Modified: trunk/Source/WebCore/WebCore.exp.in (152347 => 152348)


--- trunk/Source/WebCore/WebCore.exp.in	2013-07-03 10:06:14 UTC (rev 152347)
+++ trunk/Source/WebCore/WebCore.exp.in	2013-07-03 10:13:34 UTC (rev 152348)
@@ -1843,6 +1843,7 @@
 __ZN7WebCore20PlatformEventFactory24createPlatformMouseEventEP7NSEventP6NSView
 __ZN7WebCore20PlatformEventFactory27createPlatformKeyboardEventEP7NSEvent
 __ZN7WebCore20builtInPDFPluginNameEv
+__ZN7WebCore20applicationIsHRBlockEv
 __ZN7WebCore21DeviceOrientationData6createEbdbdbdbb
 __ZN7WebCore21applicationIsApertureEv
 __ZN7WebCore21applicationIsVersionsEv

Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp (152347 => 152348)


--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp	2013-07-03 10:06:14 UTC (rev 152347)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.cpp	2013-07-03 10:13:34 UTC (rev 152348)
@@ -108,6 +108,12 @@
     return isVersions;
 }
 
+bool applicationIsHRBlock()
+{
+    static bool isHRBlock = mainBundleIsEqualTo("com.hrblock.tax.2010");
+    return isHRBlock;
+}
+
 bool applicationIsSolidStateNetworksDownloader()
 {
     static bool isSolidStateNetworksDownloader = mainBundleIsEqualTo("com.solidstatenetworks.awkhost");

Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (152347 => 152348)


--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2013-07-03 10:06:14 UTC (rev 152347)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2013-07-03 10:13:34 UTC (rev 152348)
@@ -38,6 +38,7 @@
 bool applicationIsSafari();
 bool applicationIsSolidStateNetworksDownloader();
 bool applicationIsVersions();
+bool applicationIsHRBlock();
 
 } // namespace WebCore
 

Modified: trunk/Source/WebKit/mac/ChangeLog (152347 => 152348)


--- trunk/Source/WebKit/mac/ChangeLog	2013-07-03 10:06:14 UTC (rev 152347)
+++ trunk/Source/WebKit/mac/ChangeLog	2013-07-03 10:13:34 UTC (rev 152348)
@@ -1,3 +1,18 @@
+2013-07-03  Zalan Bujtas  <[email protected]>
+
+        H&R Block 2010 Help window can not be reopened.
+        https://bugs.webkit.org/show_bug.cgi?id=118342
+
+        Reviewed by Antti Koivisto.
+
+        http://trac.webkit.org/changeset/118916 changed the window.focus() behaviour so that
+        only the opener can (re)focus() a particular window.
+        H&R Block app relies on the relaxed window.focus() rules.
+
+        * WebView/WebView.mm:
+        (shouldRestrictWindowFocus):
+        (-[WebView _preferencesChanged:]):
+
 2013-07-01  Timothy Hatcher  <[email protected]>
 
         Link to WebInspectorUI.framework at build time instead of soft linking.

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (152347 => 152348)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2013-07-03 10:06:14 UTC (rev 152347)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2013-07-03 10:13:34 UTC (rev 152348)
@@ -623,6 +623,11 @@
     return !applicationIsAdobeInstaller();
 }
 
+static bool shouldRestrictWindowFocus()
+{
+    return !applicationIsHRBlock();
+}
+
 - (void)_dispatchPendingLoadRequests
 {
     resourceLoadScheduler()->servePendingRequests();
@@ -1499,6 +1504,7 @@
     settings->setWebGLEnabled([preferences webGLEnabled]);
     settings->setAccelerated2dCanvasEnabled([preferences accelerated2dCanvasEnabled]);
     settings->setLoadDeferringEnabled(shouldEnableLoadDeferring());
+    settings->setWindowFocusRestricted(shouldRestrictWindowFocus());
     settings->setFrameFlatteningEnabled([preferences isFrameFlatteningEnabled]);
     settings->setSpatialNavigationEnabled([preferences isSpatialNavigationEnabled]);
     settings->setPaginateDuringLayoutEnabled([preferences paginateDuringLayoutEnabled]);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to