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

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

Issue 1824003002: Document how effective zoom relates to StyleImage sizing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@straighten-out-zoom-and-border
Patch Set: Created 4 years, 9 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 6fcb113bb394e5d7c76b646b55e2c27e18905492..7e3192a31341f93d3bf1ea53d9a4e0a1409fcc22 100644
--- a/third_party/WebKit/Source/core/style/StyleImage.h
+++ b/third_party/WebKit/Source/core/style/StyleImage.h
@@ -57,12 +57,18 @@ public:
virtual bool canRender() const { return true; }
virtual bool isLoaded() const { return true; }
virtual bool errorOccurred() const { return false; }
+ // Note that the defaultObjectSize is assumed to be in the
+ // effective zoom level given by multiplier, i.e. if multiplier is
+ // the constant 1 the defaultObjectSize should be unzoomed.
virtual LayoutSize imageSize(const LayoutObject&, float multiplier, const LayoutSize& defaultObjectSize) const = 0;
virtual bool imageHasRelativeSize() const = 0;
virtual bool usesImageContainerSize() const = 0;
virtual void addClient(LayoutObject*) = 0;
virtual void removeClient(LayoutObject*) = 0;
- virtual PassRefPtr<Image> image(const LayoutObject&, const IntSize&, float) const = 0;
+ // Note that the containerSize is assumed to be in the effective
+ // zoom level given by multiplier, i.e if the multiplier is the
+ // constant 1 the containerSize should be unzoomed.
+ virtual PassRefPtr<Image> image(const LayoutObject&, const IntSize& containerSize, float multiplier) const = 0;
virtual WrappedImagePtr data() const = 0;
virtual float imageScaleFactor() const { return 1; }
virtual bool knownToBeOpaque(const LayoutObject&) const = 0;
« no previous file with comments | « third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp ('k') | third_party/WebKit/Source/core/svg/graphics/SVGImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698