data: URLs should not be preloaded
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Oct 2015 22:59:15 +0000 (22:59 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Oct 2015 22:59:15 +0000 (22:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149829

Reviewed by Darin Adler.

Fix review comments after r190605:
Use protocolIs() instead of String::startsWith().

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):

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

Source/WebCore/ChangeLog
Source/WebCore/html/parser/HTMLPreloadScanner.cpp

index 5cfdec9..84085c3 100644 (file)
@@ -1,5 +1,18 @@
 2015-10-08  Chris Dumez  <cdumez@apple.com>
 
+        data: URLs should not be preloaded
+        https://bugs.webkit.org/show_bug.cgi?id=149829
+
+        Reviewed by Darin Adler.
+
+        Fix review comments after r190605:
+        Use protocolIs() instead of String::startsWith().
+
+        * html/parser/HTMLPreloadScanner.cpp:
+        (WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
+
+2015-10-08  Chris Dumez  <cdumez@apple.com>
+
         Revert r187626 (and r188025) as it caused a PLT regression
         https://bugs.webkit.org/show_bug.cgi?id=149898
         <rdar://problem/22657123>
index a89f108..b47732d 100644 (file)
@@ -237,7 +237,7 @@ private:
         if (m_urlToLoad.isEmpty())
             return false;
 
-        if (m_urlToLoad.startsWith("data:", false))
+        if (protocolIs(m_urlToLoad, "data"))
             return false;
 
         if (m_tagId == TagId::Link && !m_linkIsStyleSheet)