Title: [211036] trunk/Source
Revision
211036
Author
[email protected]
Date
2017-01-23 01:54:59 -0800 (Mon, 23 Jan 2017)

Log Message

Remove allowWindowOpenWithoutUserGesture setting
https://bugs.webkit.org/show_bug.cgi?id=167301

Patch by Joseph Pecoraro <[email protected]> on 2017-01-23
Reviewed by Darin Adler.

Source/WebCore:

* page/DOMWindow.cpp:
(WebCore::DOMWindow::allowPopUp):
* page/Settings.in:

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Use the equivalent existing setting.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (211035 => 211036)


--- trunk/Source/WebCore/ChangeLog	2017-01-23 07:28:48 UTC (rev 211035)
+++ trunk/Source/WebCore/ChangeLog	2017-01-23 09:54:59 UTC (rev 211036)
@@ -1,3 +1,14 @@
+2017-01-23  Joseph Pecoraro  <[email protected]>
+
+        Remove allowWindowOpenWithoutUserGesture setting
+        https://bugs.webkit.org/show_bug.cgi?id=167301
+
+        Reviewed by Darin Adler.
+
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::allowPopUp):
+        * page/Settings.in:
+
 2017-01-22  Carlos Garcia Campos  <[email protected]>
 
         Database file not removed for origins after deleting all databases

Modified: trunk/Source/WebCore/page/DOMWindow.cpp (211035 => 211036)


--- trunk/Source/WebCore/page/DOMWindow.cpp	2017-01-23 07:28:48 UTC (rev 211035)
+++ trunk/Source/WebCore/page/DOMWindow.cpp	2017-01-23 09:54:59 UTC (rev 211036)
@@ -363,10 +363,8 @@
 
 bool DOMWindow::allowPopUp(Frame& firstFrame)
 {
-    auto& settings = firstFrame.settings();
     return ScriptController::processingUserGesture()
-        || settings.allowWindowOpenWithoutUserGesture()
-        || settings._javascript_CanOpenWindowsAutomatically();
+        || firstFrame.settings()._javascript_CanOpenWindowsAutomatically();
 }
 
 bool DOMWindow::allowPopUp()

Modified: trunk/Source/WebCore/page/Settings.in (211035 => 211036)


--- trunk/Source/WebCore/page/Settings.in	2017-01-23 07:28:48 UTC (rev 211035)
+++ trunk/Source/WebCore/page/Settings.in	2017-01-23 09:54:59 UTC (rev 211036)
@@ -265,8 +265,6 @@
 
 allowContentSecurityPolicySourceStarToMatchAnyProtocol initial=false
 
-allowWindowOpenWithoutUserGesture initial=false
-
 selectionPaintingWithoutSelectionGapsEnabled initial=false
 
 shouldConvertInvalidURLsToBlank initial=true

Modified: trunk/Source/WebKit/mac/ChangeLog (211035 => 211036)


--- trunk/Source/WebKit/mac/ChangeLog	2017-01-23 07:28:48 UTC (rev 211035)
+++ trunk/Source/WebKit/mac/ChangeLog	2017-01-23 09:54:59 UTC (rev 211036)
@@ -1,3 +1,14 @@
+2017-01-23  Joseph Pecoraro  <[email protected]>
+
+        Remove allowWindowOpenWithoutUserGesture setting
+        https://bugs.webkit.org/show_bug.cgi?id=167301
+
+        Reviewed by Darin Adler.
+
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+        Use the equivalent existing setting.
+
 2017-01-20  Darin Adler  <[email protected]>
 
         Remove PassRefPtr from "page" directory of WebCore, also deploy references

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (211035 => 211036)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2017-01-23 07:28:48 UTC (rev 211035)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2017-01-23 09:54:59 UTC (rev 211036)
@@ -2638,7 +2638,6 @@
     settings.setAllowUniversalAccessFromFileURLs([preferences allowUniversalAccessFromFileURLs]);
     settings.setAllowFileAccessFromFileURLs([preferences allowFileAccessFromFileURLs]);
     settings.setNeedsStorageAccessFromFileURLsQuirk([preferences needsStorageAccessFromFileURLsQuirk]);
-    settings.setJavaScriptCanOpenWindowsAutomatically([preferences _javascript_CanOpenWindowsAutomatically]);
     settings.setMinimumFontSize([preferences minimumFontSize]);
     settings.setMinimumLogicalFontSize([preferences minimumLogicalFontSize]);
     settings.setPictographFontFamily([preferences pictographFontFamily]);
@@ -2732,6 +2731,8 @@
     settings.setAllowDisplayOfInsecureContent(shouldAllowDisplayAndRunningOfInsecureContent());
     settings.setAllowRunningOfInsecureContent(shouldAllowDisplayAndRunningOfInsecureContent());
 
+    settings.setJavaScriptCanOpenWindowsAutomatically([preferences _javascript_CanOpenWindowsAutomatically] || shouldAllowWindowOpenWithoutUserGesture());
+
     settings.setVisualViewportEnabled([preferences visualViewportEnabled]);
 
     switch ([preferences storageBlockingPolicy]) {
@@ -2927,8 +2928,6 @@
 
     settings.setAllowContentSecurityPolicySourceStarToMatchAnyProtocol(shouldAllowContentSecurityPolicySourceStarToMatchAnyProtocol());
 
-    settings.setAllowWindowOpenWithoutUserGesture(shouldAllowWindowOpenWithoutUserGesture());
-
     settings.setShouldConvertInvalidURLsToBlank(shouldConvertInvalidURLsToBlank());
 
     settings.setLargeImageAsyncDecodingEnabled([preferences largeImageAsyncDecodingEnabled]);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to