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

Unified Diff: sky/engine/core/fetch/ImageResource.h

Issue 711203002: Remove zoom() and effectiveZoom(). (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/dom/Element.cpp ('k') | sky/engine/core/fetch/ImageResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/fetch/ImageResource.h
diff --git a/sky/engine/core/fetch/ImageResource.h b/sky/engine/core/fetch/ImageResource.h
index 629b5771b6c6ab1f2523ce5b641cbe1f45cfd8c4..0c0394b1f93804fa0ef7952062ca1bab58864911 100644
--- a/sky/engine/core/fetch/ImageResource.h
+++ b/sky/engine/core/fetch/ImageResource.h
@@ -61,9 +61,9 @@ public:
static std::pair<blink::Image*, float> brokenImage(float deviceScaleFactor); // Returns an image and the image's resolution scale factor.
bool willPaintBrokenImage() const;
- bool canRender(const RenderObject& renderer, float multiplier) { return !errorOccurred() && !imageSizeForRenderer(&renderer, multiplier).isEmpty(); }
+ bool canRender(const RenderObject& renderer) { return !errorOccurred() && !imageSizeForRenderer(&renderer).isEmpty(); }
- void setContainerSizeForRenderer(const ImageResourceClient*, const IntSize&, float);
+ void setContainerSizeForRenderer(const ImageResourceClient*, const IntSize&);
bool usesImageContainerSize() const;
bool imageHasRelativeWidth() const;
bool imageHasRelativeHeight() const;
@@ -75,8 +75,7 @@ public:
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, SizeType = NormalSize); // returns the size of the complete image.
+ LayoutSize imageSizeForRenderer(const RenderObject*, SizeType = NormalSize); // returns the size of the complete image.
void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio);
virtual void didAddClient(ResourceClient*) override;
@@ -119,8 +118,7 @@ private:
virtual void switchClientsToRevalidatedResource() override;
- typedef pair<IntSize, float> SizeAndZoom;
- typedef HashMap<const ImageResourceClient*, SizeAndZoom> ContainerSizeRequests;
+ typedef HashMap<const ImageResourceClient*, IntSize> ContainerSizeRequests;
ContainerSizeRequests m_pendingContainerSizeRequests;
float m_devicePixelRatioHeaderValue;
« no previous file with comments | « sky/engine/core/dom/Element.cpp ('k') | sky/engine/core/fetch/ImageResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698