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

Unified Diff: Source/core/loader/cache/CachedImage.h

Issue 22482004: Add support for the object-fit CSS property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Oops, sorry! Forgot to update UseCounter.cpp Created 7 years, 4 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
Index: Source/core/loader/cache/CachedImage.h
diff --git a/Source/core/loader/cache/CachedImage.h b/Source/core/loader/cache/CachedImage.h
index 35abbf61b1e2e1cddba2b169123af06cd0c8b2b7..8aaf46bf7468848085ce02e5a3f4c0b09746df95 100644
--- a/Source/core/loader/cache/CachedImage.h
+++ b/Source/core/loader/cache/CachedImage.h
@@ -65,8 +65,12 @@ public:
bool imageHasRelativeWidth() const;
bool imageHasRelativeHeight() const;
+ enum SizeType {
+ NormalSize, // Report the size of the image associated with a certain renderer
+ IntrinsicSize // Report the intrinsic size, i.e. ignore whatever has been set extrinsically.
+ };
// This method takes a zoom multiplier that can be used to increase the natural size of the image by the zoom.
- LayoutSize imageSizeForRenderer(const RenderObject*, float multiplier); // returns the size of the complete image.
+ LayoutSize imageSizeForRenderer(const RenderObject*, float multiplier, SizeType = NormalSize); // returns the size of the complete image.
void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio);
virtual void didAddClient(ResourceClient*);

Powered by Google App Engine
This is Rietveld 408576698