Title: [230016] trunk/Source/WebCore
Revision
230016
Author
[email protected]
Date
2018-03-27 16:54:24 -0700 (Tue, 27 Mar 2018)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (230015 => 230016)


--- trunk/Source/WebCore/ChangeLog	2018-03-27 23:39:40 UTC (rev 230015)
+++ trunk/Source/WebCore/ChangeLog	2018-03-27 23:54:24 UTC (rev 230016)
@@ -1,3 +1,16 @@
+2018-03-27  Daniel Bates  <[email protected]>
+
+        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-03-27  Per Arne Vollan  <[email protected]>
 
         The layout test fast/canvas/webgl/read-pixels-test.html is timing out.

Modified: trunk/Source/WebCore/style/StylePendingResources.cpp (230015 => 230016)


--- trunk/Source/WebCore/style/StylePendingResources.cpp	2018-03-27 23:39:40 UTC (rev 230015)
+++ trunk/Source/WebCore/style/StylePendingResources.cpp	2018-03-27 23:54:24 UTC (rev 230016)
@@ -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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to