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

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

Issue 236753003: Remove the srcset Runtime Enabled Flag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 | « no previous file | Source/core/html/HTMLImageElement.idl » ('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 398e78e63dd32c4cae4e7b5d529cc97d90653f20..205e0bad15aaee7c3d0ede62c4664317799e9b9a 100644
--- a/Source/core/html/HTMLImageElement.cpp
+++ b/Source/core/html/HTMLImageElement.cpp
@@ -154,16 +154,14 @@ void HTMLImageElement::parseAttribute(const QualifiedName& name, const AtomicStr
if (renderer() && renderer()->isImage())
toRenderImage(renderer())->updateAltText();
} else if (name == srcAttr || name == srcsetAttr) {
- if (RuntimeEnabledFeatures::srcsetEnabled()) {
- 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)
- m_imageDevicePixelRatio = 1 / candidateScaleFactor;
- if (renderer() && renderer()->isImage())
- toRenderImage(renderer())->setImageDevicePixelRatio(m_imageDevicePixelRatio);
- }
+ 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)
+ m_imageDevicePixelRatio = 1 / candidateScaleFactor;
+ if (renderer() && renderer()->isImage())
+ toRenderImage(renderer())->setImageDevicePixelRatio(m_imageDevicePixelRatio);
m_imageLoader.updateFromElementIgnoringPreviousError();
} else if (name == usemapAttr) {
setIsLink(!value.isNull());
« no previous file with comments | « no previous file | Source/core/html/HTMLImageElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698