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

Unified Diff: sky/engine/core/rendering/RenderImage.cpp

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/rendering/RenderHTMLCanvas.cpp ('k') | sky/engine/core/rendering/RenderImageResource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderImage.cpp
diff --git a/sky/engine/core/rendering/RenderImage.cpp b/sky/engine/core/rendering/RenderImage.cpp
index 6557a5edaa65d341352da62a50fa6375448d5042..033986f3bbab4f24ce0c00c9f966ecd6406d1513 100644
--- a/sky/engine/core/rendering/RenderImage.cpp
+++ b/sky/engine/core/rendering/RenderImage.cpp
@@ -107,7 +107,7 @@ IntSize RenderImage::imageSizeForError(ImageResource* newImage) const
// imageSize() returns 0 for the error image. We need the true size of the
// error image, so we have to get it by grabbing image() directly.
- return IntSize(paddingWidth + imageSize.width() * style()->effectiveZoom(), paddingHeight + imageSize.height() * style()->effectiveZoom());
+ return IntSize(paddingWidth + imageSize.width(), paddingHeight + imageSize.height());
}
// Sets the image height and width to fit the alt text. Returns true if the
@@ -185,7 +185,7 @@ void RenderImage::updateInnerContentRect()
void RenderImage::paintInvalidationOrMarkForLayout(bool imageSizeChangedToAccomodateAltText, const IntRect* rect)
{
LayoutSize oldIntrinsicSize = intrinsicSize();
- LayoutSize newIntrinsicSize = m_imageResource->intrinsicSize(style()->effectiveZoom());
+ LayoutSize newIntrinsicSize = m_imageResource->intrinsicSize();
updateIntrinsicSizeIfNeeded(newIntrinsicSize);
// In the case of generated image content using :before/:after/content, we might not be
@@ -225,7 +225,7 @@ void RenderImage::paintInvalidationOrMarkForLayout(bool imageSizeChangedToAccomo
if (rect) {
// The image changed rect is in source image coordinates (without zoom),
// so map from the bounds of the image to the contentsBox.
- const LayoutSize imageSizeWithoutZoom = m_imageResource->imageSize(1 / style()->effectiveZoom());
+ const LayoutSize imageSizeWithoutZoom = m_imageResource->imageSize();
paintInvalidationRect = enclosingIntRect(mapRect(*rect, FloatRect(FloatPoint(), imageSizeWithoutZoom), contentBoxRect()));
// Guard against too-large changed rects.
paintInvalidationRect.intersect(contentBoxRect());
« no previous file with comments | « sky/engine/core/rendering/RenderHTMLCanvas.cpp ('k') | sky/engine/core/rendering/RenderImageResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698