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

Unified Diff: third_party/WebKit/Source/core/style/StyleImage.h

Issue 1732563007: [NOT FOR COMMIT] Pass defaultObjectSize to get image size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/core/style/StyleImage.h
diff --git a/third_party/WebKit/Source/core/style/StyleImage.h b/third_party/WebKit/Source/core/style/StyleImage.h
index 49a050c50ad72504e7272ff7a0b8809677b88724..053ccaff52e4a010fc6dbb94948ab8859c5e625b 100644
--- a/third_party/WebKit/Source/core/style/StyleImage.h
+++ b/third_party/WebKit/Source/core/style/StyleImage.h
@@ -56,7 +56,11 @@ public:
virtual bool canRender() const { return true; }
virtual bool isLoaded() const { return true; }
virtual bool errorOccurred() const { return false; }
- virtual LayoutSize imageSize(const LayoutObject*, float multiplier) const = 0;
+ virtual LayoutSize concreteObjectSize(const LayoutObject*, const FloatSize& defaultObjectSize, float multiplier) const = 0;
+ LayoutSize defaultConcreteObjectSize(const LayoutObject* layoutObject, float multiplier) const
+ {
+ return concreteObjectSize(layoutObject, FloatSize(300, 150), multiplier);
+ }
virtual void computeIntrinsicDimensions(const LayoutObject*, FloatSize& intrinsicSize, FloatSize& intrinsicRatio) = 0;
virtual bool imageHasRelativeSize() const = 0;
virtual bool usesImageContainerSize() const = 0;
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp ('k') | third_party/WebKit/Source/core/style/StyleInvalidImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698