Title: [255033] branches/safari-609-branch/Source/WebKit
Revision
255033
Author
[email protected]
Date
2020-01-23 13:44:52 -0800 (Thu, 23 Jan 2020)

Log Message

Cherry-pick r254880. rdar://problem/58816328

    [macOS] Add managed preference to allow synchronous XHR during page dismissal
    https://bugs.webkit.org/show_bug.cgi?id=206540
    <rdar://problem/58644447>

    Reviewed by Alex Christensen.

    Add managed preference to allow synchronous XHR during page dismissal. This is temporarily needed by some
    enterprise products until they can update their code.

    * Shared/WebPreferences.yaml:
    * Shared/WebPreferencesDefaultValues.cpp:
    (WebKit::defaultDisallowSyncXHRDuringPageDismissalEnabled):
    * Shared/WebPreferencesDefaultValues.h:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254880 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-609-branch/Source/WebKit/ChangeLog (255032 => 255033)


--- branches/safari-609-branch/Source/WebKit/ChangeLog	2020-01-23 21:44:49 UTC (rev 255032)
+++ branches/safari-609-branch/Source/WebKit/ChangeLog	2020-01-23 21:44:52 UTC (rev 255033)
@@ -1,5 +1,41 @@
 2020-01-23  Russell Epstein  <[email protected]>
 
+        Cherry-pick r254880. rdar://problem/58816328
+
+    [macOS] Add managed preference to allow synchronous XHR during page dismissal
+    https://bugs.webkit.org/show_bug.cgi?id=206540
+    <rdar://problem/58644447>
+    
+    Reviewed by Alex Christensen.
+    
+    Add managed preference to allow synchronous XHR during page dismissal. This is temporarily needed by some
+    enterprise products until they can update their code.
+    
+    * Shared/WebPreferences.yaml:
+    * Shared/WebPreferencesDefaultValues.cpp:
+    (WebKit::defaultDisallowSyncXHRDuringPageDismissalEnabled):
+    * Shared/WebPreferencesDefaultValues.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-01-21  Chris Dumez  <[email protected]>
+
+            [macOS] Add managed preference to allow synchronous XHR during page dismissal
+            https://bugs.webkit.org/show_bug.cgi?id=206540
+            <rdar://problem/58644447>
+
+            Reviewed by Alex Christensen.
+
+            Add managed preference to allow synchronous XHR during page dismissal. This is temporarily needed by some
+            enterprise products until they can update their code.
+
+            * Shared/WebPreferences.yaml:
+            * Shared/WebPreferencesDefaultValues.cpp:
+            (WebKit::defaultDisallowSyncXHRDuringPageDismissalEnabled):
+            * Shared/WebPreferencesDefaultValues.h:
+
+2020-01-23  Russell Epstein  <[email protected]>
+
         Cherry-pick r254874. rdar://problem/58816330
 
     macCatalyst: Two-finger click is dispatched to DOM as left click

Modified: branches/safari-609-branch/Source/WebKit/Shared/WebPreferences.yaml (255032 => 255033)


--- branches/safari-609-branch/Source/WebKit/Shared/WebPreferences.yaml	2020-01-23 21:44:49 UTC (rev 255032)
+++ branches/safari-609-branch/Source/WebKit/Shared/WebPreferences.yaml	2020-01-23 21:44:52 UTC (rev 255033)
@@ -20,7 +20,7 @@
 
 DisallowSyncXHRDuringPageDismissalEnabled:
   type: bool
-  defaultValue: true
+  defaultValue: defaultDisallowSyncXHRDuringPageDismissalEnabled()
   humanReadableName: "Disallow sync XHR during page dismissal"
   humanReadableDescription: "Disallow synchronous XMLHttpRequest during page dismissal"
   category: experimental

Modified: branches/safari-609-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (255032 => 255033)


--- branches/safari-609-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2020-01-23 21:44:49 UTC (rev 255032)
+++ branches/safari-609-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2020-01-23 21:44:52 UTC (rev 255033)
@@ -64,4 +64,15 @@
 
 #endif // ENABLE(TEXT_AUTOSIZING) && !PLATFORM(IOS_FAMILY)
 
+bool defaultDisallowSyncXHRDuringPageDismissalEnabled()
+{
+#if PLATFORM(MAC)
+    if (CFPreferencesGetAppBooleanValue(CFSTR("allowDeprecatedSynchronousXMLHttpRequestDuringUnload"), CFSTR("com.apple.WebKit"), nullptr)) {
+        WTFLogAlways("Allowing synchronous XHR during page unload due to managed preference");
+        return false;
+    }
+#endif
+    return true;
+}
+
 } // namespace WebKit

Modified: branches/safari-609-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h (255032 => 255033)


--- branches/safari-609-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2020-01-23 21:44:49 UTC (rev 255032)
+++ branches/safari-609-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2020-01-23 21:44:52 UTC (rev 255033)
@@ -310,6 +310,7 @@
 
 bool defaultPassiveTouchListenersAsDefaultOnDocument();
 bool defaultCSSOMViewScrollingAPIEnabled();
+bool defaultDisallowSyncXHRDuringPageDismissalEnabled();
 
 #if ENABLE(TEXT_AUTOSIZING)
 bool defaultTextAutosizingUsesIdempotentMode();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to