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

Unified Diff: third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp

Issue 1819083004: Straighten out zoom and border-image (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix up test 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
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/css/border-image-zoomed-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp b/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
index 338b82cc71477d547df5f69dc73423c06ca45afa..51d82366c8513042c31c0e23ca7ca5ee4d94cca8 100644
--- a/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
+++ b/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
@@ -49,13 +49,15 @@ bool NinePieceImagePainter::paint(GraphicsContext& graphicsContext, const Layout
rectWithOutsets.expand(style.imageOutsets(ninePieceImage));
LayoutRect borderImageRect = rectWithOutsets;
- IntSize imageSize = roundedIntSize(styleImage->imageSize(m_layoutObject, 1, borderImageRect.size()));
+ LayoutSize defaultObjectSize = borderImageRect.size();
+ defaultObjectSize.scale(1 / style.effectiveZoom());
+ IntSize imageSize = roundedIntSize(styleImage->imageSize(m_layoutObject, 1, defaultObjectSize));
IntRectOutsets borderWidths(style.borderTopWidth(), style.borderRightWidth(),
style.borderBottomWidth(), style.borderLeftWidth());
NinePieceImageGrid grid(ninePieceImage, imageSize, pixelSnappedIntRect(borderImageRect), borderWidths);
- RefPtr<Image> image = styleImage->image(m_layoutObject, imageSize, style.effectiveZoom());
+ RefPtr<Image> image = styleImage->image(m_layoutObject, imageSize, 1);
fs 2016/03/22 14:07:23 Maybe add a comment (or two) about why the zoom/sc
davve 2016/03/22 14:29:00 I added two lines to the follow-up documentation p
InterpolationQuality interpolationQuality = BoxPainter::chooseInterpolationQuality(m_layoutObject, image.get(), 0, rectWithOutsets.size());
InterpolationQuality previousInterpolationQuality = graphicsContext.imageInterpolationQuality();
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/css/border-image-zoomed-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698