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

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

Issue 1477393003: Use LayoutUnit in NinePieceImage drawing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of leviw's sub-pixel changes Created 5 years 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/Source/core/paint/NinePieceImageGridTest.cpp ('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 402aed20b53aa622d3d1edf95f8ebac134add22d..b9a9ead1e4e40ed518dacf76b72aea83508aed7e 100644
--- a/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
+++ b/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
@@ -50,14 +50,14 @@ bool NinePieceImagePainter::paint(GraphicsContext* graphicsContext, const Layout
rectWithOutsets.expand(style.imageOutsets(ninePieceImage));
LayoutRect borderImageRect = rectWithOutsets;
- IntSize imageSize = roundedIntSize(m_layoutObject.calculateImageIntrinsicDimensions(styleImage, borderImageRect.size(),
- LayoutBoxModelObject::DoNotScaleByEffectiveZoom));
+ LayoutSize imageSize = m_layoutObject.calculateImageIntrinsicDimensions(styleImage, borderImageRect.size(),
+ LayoutBoxModelObject::DoNotScaleByEffectiveZoom);
IntRectOutsets borderWidths(style.borderTopWidth(), style.borderRightWidth(),
style.borderBottomWidth(), style.borderLeftWidth());
- NinePieceImageGrid grid(ninePieceImage, imageSize, pixelSnappedIntRect(borderImageRect), borderWidths);
+ NinePieceImageGrid grid(ninePieceImage, imageSize, borderImageRect, borderWidths);
- RefPtr<Image> image = styleImage->image(&m_layoutObject, imageSize, style.effectiveZoom());
+ RefPtr<Image> image = styleImage->image(&m_layoutObject, flooredIntSize(imageSize), style.effectiveZoom());
InterpolationQuality interpolationQuality = BoxPainter::chooseInterpolationQuality(m_layoutObject,
graphicsContext, image.get(), 0, rectWithOutsets.size());
« no previous file with comments | « third_party/WebKit/Source/core/paint/NinePieceImageGridTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698