Title: [230276] branches/safari-605-branch/Source/WebCore
Revision
230276
Author
ryanhad...@apple.com
Date
2018-04-04 14:18:45 -0700 (Wed, 04 Apr 2018)

Log Message

Cherry-pick r230016. rdar://problem/38154623

Modified Paths

Diff

Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (230275 => 230276)


--- branches/safari-605-branch/Source/WebCore/ChangeLog	2018-04-04 21:15:54 UTC (rev 230275)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog	2018-04-04 21:18:45 UTC (rev 230276)
@@ -1,3 +1,20 @@
+2018-04-04  Ryan Haddad  <ryanhad...@apple.com>
+
+        Cherry-pick r230016. rdar://problem/38154623
+
+    2018-03-27  Daniel Bates  <daba...@apple.com>
+
+            Attempt to fix media control layout tests after <https://trac.webkit.org/changeset/230006/>
+            (https://bugs.webkit.org/show_bug.cgi?id=179983)
+
+            Exempt elements in user agent shadow DOM from having to perform a potentially CORS-
+            enabled fetch for a mask image to try to fix the following tests from timing out:
+                media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html
+                media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html
+
+            * style/StylePendingResources.cpp:
+            (WebCore::Style::loadPendingImage):
+
 2018-04-03  Jason Marcell  <jmarc...@apple.com>
 
         Cherry-pick r230063. rdar://problem/39155049

Modified: branches/safari-605-branch/Source/WebCore/style/StylePendingResources.cpp (230275 => 230276)


--- branches/safari-605-branch/Source/WebCore/style/StylePendingResources.cpp	2018-04-04 21:15:54 UTC (rev 230275)
+++ branches/safari-605-branch/Source/WebCore/style/StylePendingResources.cpp	2018-04-04 21:18:45 UTC (rev 230276)
@@ -48,10 +48,11 @@
     if (!styleImage || !styleImage->isPending())
         return;
 
+    bool isInUserAgentShadowTree = element && element->isInUserAgentShadowTree();
     ResourceLoaderOptions options = CachedResourceLoader::defaultCachedResourceOptions();
-    options.contentSecurityPolicyImposition = element && element->isInUserAgentShadowTree() ? ContentSecurityPolicyImposition::SkipPolicyCheck : ContentSecurityPolicyImposition::DoPolicyCheck;
+    options.contentSecurityPolicyImposition = isInUserAgentShadowTree ? ContentSecurityPolicyImposition::SkipPolicyCheck : ContentSecurityPolicyImposition::DoPolicyCheck;
 
-    if (loadPolicy == LoadPolicy::Anonymous && document.settings().useAnonymousModeWhenFetchingMaskImages()) {
+    if (loadPolicy == LoadPolicy::Anonymous && !isInUserAgentShadowTree && document.settings().useAnonymousModeWhenFetchingMaskImages()) {
         options.mode = FetchOptions::Mode::Cors;
         options.credentials = FetchOptions::Credentials::SameOrigin;
         options.storedCredentialsPolicy = StoredCredentialsPolicy::DoNotUse;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to