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

Unified Diff: Source/core/rendering/RenderImage.h

Issue 25105004: Use srcset's resource pixel density to determine intrinsic size (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cleantests
Patch Set: Fixed crash+rebased Created 7 years, 2 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/html/parser/HTMLSrcsetParser.cpp ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderImage.h
diff --git a/Source/core/rendering/RenderImage.h b/Source/core/rendering/RenderImage.h
index 1204ea5ed79bd0ae5b6fd0ff4acbe8d51cfbfb96..bdd55666926e613e70c6e9213c79ce5e75683681 100644
--- a/Source/core/rendering/RenderImage.h
+++ b/Source/core/rendering/RenderImage.h
@@ -61,6 +61,9 @@ public:
String altText() const { return m_altText; }
+ inline void setImageDevicePixelRatio(float factor) { m_imageDevicePixelRatio = factor; }
+ float imageDevicePixelRatio() const { return m_imageDevicePixelRatio; }
+
protected:
virtual bool needsPreferredWidthsRecalculation() const OVERRIDE FINAL;
virtual RenderBox* embeddedContentBox() const OVERRIDE FINAL;
@@ -112,6 +115,7 @@ private:
bool m_needsToSetSizeForAltText;
bool m_didIncrementVisuallyNonEmptyPixelCount;
bool m_isGeneratedContent;
+ float m_imageDevicePixelRatio;
friend class RenderImageScaleObserver;
};
« no previous file with comments | « Source/core/html/parser/HTMLSrcsetParser.cpp ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698