No need to guard the sizes attribute against PICTURE_SIZES in preload scanner.
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Jun 2015 22:23:36 +0000 (22:23 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Jun 2015 22:23:36 +0000 (22:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=145573
<rdar://problem/21210038>

Reviewed by Myles Maxfield.

The PICTURE_SIZES feature flag doesn't need to be used to
guard preloading of the sizes attribute.

* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): Deleted.
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Deleted.

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

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

index 3ff8e03..27d2353 100644 (file)
@@ -1,3 +1,18 @@
+2015-06-02  Dean Jackson  <dino@apple.com>
+
+        No need to guard the sizes attribute against PICTURE_SIZES in preload scanner.
+        https://bugs.webkit.org/show_bug.cgi?id=145573
+        <rdar://problem/21210038>
+
+        Reviewed by Myles Maxfield.
+
+        The PICTURE_SIZES feature flag doesn't need to be used to
+        guard preloading of the sizes attribute.
+
+        * html/parser/HTMLPreloadScanner.cpp:
+        (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): Deleted.
+        (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Deleted.
+
 2015-06-02  Anders Carlsson  <andersca@apple.com>
 
         Use UUIDs for WebSQL database filenames instead of a sequential number
index e3f1da5..275a9d3 100644 (file)
@@ -112,11 +112,7 @@ public:
         // Resolve between src and srcSet if we have them and the tag is img.
         if (m_tagId == TagId::Img && !m_srcSetAttribute.isEmpty()) {
             float sourceSize = 0;
-#if ENABLE(PICTURE_SIZES)
             sourceSize = parseSizesAttribute(m_sizesAttribute, document.renderView(), document.frame());
-#else
-            UNUSED_PARAM(document);
-#endif
             ImageCandidate imageCandidate = bestFitSourceForImageAttributes(m_deviceScaleFactor, m_urlToLoad, m_srcSetAttribute, sourceSize);
             setUrlToLoad(imageCandidate.string.toString(), true);
         }
@@ -155,10 +151,8 @@ private:
                 setUrlToLoad(attributeValue);
             else if (match(attributeName, srcsetAttr) && m_srcSetAttribute.isNull())
                 m_srcSetAttribute = attributeValue;
-#if ENABLE(PICTURE_SIZES)
             else if (match(attributeName, sizesAttr) && m_sizesAttribute.isNull())
                 m_sizesAttribute = attributeValue;
-#endif
             else if (match(attributeName, crossoriginAttr) && !attributeValue.isNull())
                 m_crossOriginMode = stripLeadingAndTrailingHTMLSpaces(attributeValue);
         } else if (m_tagId == TagId::Link) {