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

Unified Diff: Source/core/fetch/ImageResource.h

Issue 46313002: Support the DPR header for client hints. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: with cache tests 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 | « LayoutTests/http/tests/resources/dpr.php ('k') | Source/core/fetch/ImageResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ImageResource.h
diff --git a/Source/core/fetch/ImageResource.h b/Source/core/fetch/ImageResource.h
index 63b50b5e51b2d9a1f1c1612c241933068a6c9aff..2092d9f3a330eca255ce5acea17363df32812c4d 100644
--- a/Source/core/fetch/ImageResource.h
+++ b/Source/core/fetch/ImageResource.h
@@ -65,6 +65,9 @@ public:
bool usesImageContainerSize() const;
bool imageHasRelativeWidth() const;
bool imageHasRelativeHeight() const;
+ // The device pixel ratio we got from the server for this image, or 1.0.
+ float devicePixelRatioHeaderValue() const { return m_devicePixelRatioHeaderValue; }
+ bool hasDevicePixelRatioHeaderValue() const { return m_hasDevicePixelRatioHeaderValue; }
enum SizeType {
NormalSize, // Report the size of the image associated with a certain renderer
@@ -116,10 +119,12 @@ private:
typedef pair<IntSize, float> SizeAndZoom;
typedef HashMap<const ImageResourceClient*, SizeAndZoom> ContainerSizeRequests;
ContainerSizeRequests m_pendingContainerSizeRequests;
+ float m_devicePixelRatioHeaderValue;
RefPtr<WebCore::Image> m_image;
OwnPtr<SVGImageCache> m_svgImageCache;
bool m_loadingMultipartContent;
+ bool m_hasDevicePixelRatioHeaderValue;
};
}
« no previous file with comments | « LayoutTests/http/tests/resources/dpr.php ('k') | Source/core/fetch/ImageResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698