REGRESSION(r173464): It broke the !ENABLE(PICTURE_SIZES) build
authorevab.u-szeged@partner.samsung.com <evab.u-szeged@partner.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Sep 2014 18:48:38 +0000 (18:48 +0000)
committerevab.u-szeged@partner.samsung.com <evab.u-szeged@partner.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Sep 2014 18:48:38 +0000 (18:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=136942

Reviewed by Simon Fraser.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):

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

Source/WebCore/ChangeLog
Source/WebCore/html/HTMLImageElement.cpp

index 8248760..b6b51ab 100644 (file)
@@ -1,3 +1,13 @@
+2014-09-19  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
+
+        REGRESSION(r173464): It broke the !ENABLE(PICTURE_SIZES) build
+        https://bugs.webkit.org/show_bug.cgi?id=136942
+
+        Reviewed by Simon Fraser.
+
+        * html/HTMLImageElement.cpp:
+        (WebCore::HTMLImageElement::parseAttribute):
+
 2014-09-19  Simon Fraser  <simon.fraser@apple.com>
 
         Provide a default argument for the most commonly used HitTestRequest variant
index c011ff7..738a919 100644 (file)
@@ -143,11 +143,11 @@ void HTMLImageElement::parseAttribute(const QualifiedName& name, const AtomicStr
         if (renderer() && renderer()->isRenderImage())
             toRenderImage(renderer())->updateAltText();
     } else if (name == srcAttr || name == srcsetAttr) {
-        ImageCandidate candidate = bestFitSourceForImageAttributes(document().deviceScaleFactor(), fastGetAttribute(srcAttr), fastGetAttribute(srcsetAttr)
+        unsigned sourceSize = 0;
 #if ENABLE(PICTURE_SIZES)
-            , SourceSizeList::parseSizesAttribute(fastGetAttribute(sizesAttr), document().renderView(), document().frame())
+        sourceSize = SourceSizeList::parseSizesAttribute(fastGetAttribute(sizesAttr), document().renderView(), document().frame());
 #endif
-        );
+        ImageCandidate candidate = bestFitSourceForImageAttributes(document().deviceScaleFactor(), fastGetAttribute(srcAttr), fastGetAttribute(srcsetAttr), sourceSize);
         setBestFitURLAndDPRFromImageCandidate(candidate);
         m_imageLoader.updateFromElementIgnoringPreviousError();
     } else if (name == usemapAttr) {