Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(902)

Unified Diff: Source/core/html/HTMLImageElement.cpp

Issue 233213003: Extend srcset's syntax to include 'w' descriptors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed nits and modified multiple descriptor layout test Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/html/parser/HTMLPreloadScanner.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLImageElement.cpp
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp
index ff90239a68388aead040d64d21e63c905971801b..398e78e63dd32c4cae4e7b5d529cc97d90653f20 100644
--- a/Source/core/html/HTMLImageElement.cpp
+++ b/Source/core/html/HTMLImageElement.cpp
@@ -155,7 +155,8 @@ void HTMLImageElement::parseAttribute(const QualifiedName& name, const AtomicStr
toRenderImage(renderer())->updateAltText();
} else if (name == srcAttr || name == srcsetAttr) {
if (RuntimeEnabledFeatures::srcsetEnabled()) {
- ImageCandidate candidate = bestFitSourceForImageAttributes(document().devicePixelRatio(), fastGetAttribute(srcAttr), fastGetAttribute(srcsetAttr));
+ int effectiveSize = -1; // FIXME - hook up the real value from `sizes`
+ ImageCandidate candidate = bestFitSourceForImageAttributes(document().devicePixelRatio(), effectiveSize, fastGetAttribute(srcAttr), fastGetAttribute(srcsetAttr));
m_bestFitImageURL = candidate.toAtomicString();
float candidateScaleFactor = candidate.scaleFactor();
if (candidateScaleFactor > 0)
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/html/parser/HTMLPreloadScanner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698