Title: [255628] branches/safari-610.1.1-branch/Source/WebKit
Revision
255628
Author
[email protected]
Date
2020-02-03 19:08:31 -0800 (Mon, 03 Feb 2020)

Log Message

Cherry-pick r255366. rdar://problem/58440111

    [iOS] Add managed preference to allow legacy sync XHRs during page dismissal
    https://bugs.webkit.org/show_bug.cgi?id=206944
    <rdar://problem/58440111>

    Reviewed by Alex Christensen.

    Add managed preference for iOS to allow enterprise customers to keep using legacy sync XHRs
    during page dismissal.

    * Shared/WebPreferencesDefaultValues.cpp:
    (WebKit::defaultDisallowSyncXHRDuringPageDismissalEnabled):
    * Shared/WebPreferencesDefaultValues.h:
    * Shared/ios/WebPreferencesDefaultValuesIOS.mm:
    (WebKit::allowsDeprecatedSynchronousXMLHttpRequestDuringUnload):

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

Modified Paths

Diff

Modified: branches/safari-610.1.1-branch/Source/WebKit/ChangeLog (255627 => 255628)


--- branches/safari-610.1.1-branch/Source/WebKit/ChangeLog	2020-02-04 03:08:29 UTC (rev 255627)
+++ branches/safari-610.1.1-branch/Source/WebKit/ChangeLog	2020-02-04 03:08:31 UTC (rev 255628)
@@ -1,5 +1,43 @@
 2020-02-03  Russell Epstein  <[email protected]>
 
+        Cherry-pick r255366. rdar://problem/58440111
+
+    [iOS] Add managed preference to allow legacy sync XHRs during page dismissal
+    https://bugs.webkit.org/show_bug.cgi?id=206944
+    <rdar://problem/58440111>
+    
+    Reviewed by Alex Christensen.
+    
+    Add managed preference for iOS to allow enterprise customers to keep using legacy sync XHRs
+    during page dismissal.
+    
+    * Shared/WebPreferencesDefaultValues.cpp:
+    (WebKit::defaultDisallowSyncXHRDuringPageDismissalEnabled):
+    * Shared/WebPreferencesDefaultValues.h:
+    * Shared/ios/WebPreferencesDefaultValuesIOS.mm:
+    (WebKit::allowsDeprecatedSynchronousXMLHttpRequestDuringUnload):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-01-29  Chris Dumez  <[email protected]>
+
+            [iOS] Add managed preference to allow legacy sync XHRs during page dismissal
+            https://bugs.webkit.org/show_bug.cgi?id=206944
+            <rdar://problem/58440111>
+
+            Reviewed by Alex Christensen.
+
+            Add managed preference for iOS to allow enterprise customers to keep using legacy sync XHRs
+            during page dismissal.
+
+            * Shared/WebPreferencesDefaultValues.cpp:
+            (WebKit::defaultDisallowSyncXHRDuringPageDismissalEnabled):
+            * Shared/WebPreferencesDefaultValues.h:
+            * Shared/ios/WebPreferencesDefaultValuesIOS.mm:
+            (WebKit::allowsDeprecatedSynchronousXMLHttpRequestDuringUnload):
+
+2020-02-03  Russell Epstein  <[email protected]>
+
         Cherry-pick r255226. rdar://problem/58780584
 
     REGRESSION (r253634): cricbuzz.com media controls vanish depending on page scale

Modified: branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (255627 => 255628)


--- branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2020-02-04 03:08:29 UTC (rev 255627)
+++ branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2020-02-04 03:08:31 UTC (rev 255628)
@@ -71,6 +71,11 @@
         WTFLogAlways("Allowing synchronous XHR during page unload due to managed preference");
         return false;
     }
+#elif PLATFORM(IOS_FAMILY)
+    if (allowsDeprecatedSynchronousXMLHttpRequestDuringUnload()) {
+        WTFLogAlways("Allowing synchronous XHR during page unload due to managed preference");
+        return false;
+    }
 #endif
     return true;
 }

Modified: branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h (255627 => 255628)


--- branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2020-02-04 03:08:29 UTC (rev 255627)
+++ branches/safari-610.1.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h	2020-02-04 03:08:31 UTC (rev 255628)
@@ -315,5 +315,8 @@
 #if ENABLE(TEXT_AUTOSIZING)
 bool defaultTextAutosizingUsesIdempotentMode();
 #endif
+#if PLATFORM(IOS_FAMILY)
+bool allowsDeprecatedSynchronousXMLHttpRequestDuringUnload();
+#endif
 
 } // namespace WebKit

Modified: branches/safari-610.1.1-branch/Source/WebKit/Shared/ios/WebPreferencesDefaultValuesIOS.mm (255627 => 255628)


--- branches/safari-610.1.1-branch/Source/WebKit/Shared/ios/WebPreferencesDefaultValuesIOS.mm	2020-02-04 03:08:29 UTC (rev 255627)
+++ branches/safari-610.1.1-branch/Source/WebKit/Shared/ios/WebPreferencesDefaultValuesIOS.mm	2020-02-04 03:08:31 UTC (rev 255628)
@@ -29,6 +29,8 @@
 #if PLATFORM(IOS_FAMILY)
 
 #import "UserInterfaceIdiom.h"
+#import <pal/ios/ManagedConfigurationSoftLink.h>
+#import <pal/spi/ios/ManagedConfigurationSPI.h>
 
 namespace WebKit {
 
@@ -41,6 +43,11 @@
 
 #endif
 
+bool allowsDeprecatedSynchronousXMLHttpRequestDuringUnload()
+{
+    return [[PAL::getMCProfileConnectionClass() sharedConnection] effectiveBoolValueForSetting:@"allowDeprecatedWebKitSynchronousXHRLoads"] == MCRestrictedBoolExplicitYes;
+}
+
 } // namespace WebKit
 
 #endif // PLATFORM(IOS_FAMILY)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to