| 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 334f02980b47c39a88489c4b1315bd2ded3de0d3..a0e7b2453c53feec5985b831a87f3926a835da59 100644
|
| --- a/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/NinePieceImagePainter.cpp
|
| @@ -42,15 +42,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();
|
|
|