Title: [219234] trunk/Source/WebCore
Revision
219234
Author
y...@yoav.ws
Date
2017-07-06 20:37:17 -0700 (Thu, 06 Jul 2017)

Log Message

[preload] Avoid reflecting "video" and "audio" when they are not supported `as` value
https://bugs.webkit.org/show_bug.cgi?id=174199

Reviewed by Youenn Fablet.

No new tests as video/audio is supported in tests. I tested this manually.

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::as): Make sure "video" and "audio" will not be reflected when they are not supported.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (219233 => 219234)


--- trunk/Source/WebCore/ChangeLog	2017-07-07 03:35:27 UTC (rev 219233)
+++ trunk/Source/WebCore/ChangeLog	2017-07-07 03:37:17 UTC (rev 219234)
@@ -1,3 +1,15 @@
+2017-07-06  Yoav Weiss  <y...@yoav.ws>
+
+        [preload] Avoid reflecting "video" and "audio" when they are not supported `as` value
+        https://bugs.webkit.org/show_bug.cgi?id=174199
+
+        Reviewed by Youenn Fablet.
+
+        No new tests as video/audio is supported in tests. I tested this manually.
+
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::as): Make sure "video" and "audio" will not be reflected when they are not supported.
+
 2017-07-06  Chris Dumez  <cdu...@apple.com>
 
         Drop unused ResourceLoadStatistics members

Modified: trunk/Source/WebCore/html/HTMLLinkElement.cpp (219233 => 219234)


--- trunk/Source/WebCore/html/HTMLLinkElement.cpp	2017-07-07 03:35:27 UTC (rev 219233)
+++ trunk/Source/WebCore/html/HTMLLinkElement.cpp	2017-07-07 03:37:17 UTC (rev 219234)
@@ -48,6 +48,7 @@
 #include "MediaQueryEvaluator.h"
 #include "MouseEvent.h"
 #include "RenderStyle.h"
+#include "RuntimeEnabledFeatures.h"
 #include "SecurityOrigin.h"
 #include "Settings.h"
 #include "StyleInheritedData.h"
@@ -231,8 +232,9 @@
         || equalLettersIgnoringASCIICase(as, "image")
         || equalLettersIgnoringASCIICase(as, "script")
         || equalLettersIgnoringASCIICase(as, "style")
-        || equalLettersIgnoringASCIICase(as, "video")
-        || equalLettersIgnoringASCIICase(as, "audio")
+        || (RuntimeEnabledFeatures::sharedFeatures().mediaPreloadingEnabled()
+            && (equalLettersIgnoringASCIICase(as, "video")
+                || equalLettersIgnoringASCIICase(as, "audio")))
 #if ENABLE(VIDEO_TRACK)
         || equalLettersIgnoringASCIICase(as, "track")
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to