| 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 0e03e044ce169039589504608e2be43310d50145..be5547f5501d13139dd6f1c96918f7d927a06766 100644
|
| --- a/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
|
| @@ -51,15 +51,19 @@ bool NinePieceImagePainter::paint(GraphicsContext& graphicsContext, const Layout
|
|
|
| // NinePieceImage returns the image slices without effective zoom applied and thus we compute
|
| // the nine piece grid on top of the image in unzoomed coordinates.
|
| - LayoutSize defaultObjectSize = borderImageRect.size();
|
| - defaultObjectSize.scale(1 / style.effectiveZoom());
|
| - IntSize imageSize = roundedIntSize(styleImage->imageSize(m_layoutObject, 1, defaultObjectSize));
|
| + //
|
| + // FIXME: The default object size passed to imageSize() should be scaled by the zoom factor
|
| + // passed in. In this case it means that borderImageRect should be passed in compensated by
|
| + // effective zoom, since the scale factor is one. For generated images, the actual image data
|
| + // (gradient stops, etc.) are scaled to effective zoom instead so we must take care not to cause
|
| + // scale of them again.
|
| + IntSize imageSize = roundedIntSize(styleImage->imageSize(m_layoutObject, 1, borderImageRect.size()));
|
|
|
| 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, 1);
|
| + RefPtr<Image> image = styleImage->image(m_layoutObject, imageSize, style.effectiveZoom());
|
|
|
| InterpolationQuality interpolationQuality = BoxPainter::chooseInterpolationQuality(m_layoutObject, image.get(), 0, rectWithOutsets.size());
|
| InterpolationQuality previousInterpolationQuality = graphicsContext.imageInterpolationQuality();
|
|
|