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

Unified Diff: third_party/WebKit/Source/platform/graphics/Image.h

Issue 1694263003: Add Image::updateConcreteSize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-size-calculation-in
Patch Set: Add some documentation and polish title of test. Created 4 years, 10 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: third_party/WebKit/Source/platform/graphics/Image.h
diff --git a/third_party/WebKit/Source/platform/graphics/Image.h b/third_party/WebKit/Source/platform/graphics/Image.h
index 8ee032c702e3be9aff661e5eae7a7ceb75a163d7..08470bae57d818d3cc359021af2a86383a87f9ee 100644
--- a/third_party/WebKit/Source/platform/graphics/Image.h
+++ b/third_party/WebKit/Source/platform/graphics/Image.h
@@ -98,6 +98,16 @@ public:
// images it can be the dimensions defined by the 'viewBox'.)
virtual void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio);
+ // "The concrete object size is the result of combining an
+ // object’s intrinsic dimensions and specified size with the
fs 2016/02/23 11:44:23 Is that U+2019? Might want to avoid that and go wi
davve 2016/02/23 13:15:31 Yes, I c&p from spec text... Good old U+0027 comin
+ // default object size of the context it’s used in, producing a
+ // rectangle with a definite width and height."
+ //
+ // https://drafts.csswg.org/css-images-3/#concrete-object-size
+ //
+ // Updates the image size to a new default object size.
+ virtual void updateConcreteObjectSize(const LayoutSize& defaultObjectSize) {}
+
virtual IntSize size() const = 0;
IntRect rect() const { return IntRect(IntPoint(), size()); }
int width() const { return size().width(); }

Powered by Google App Engine
This is Rietveld 408576698