Chromium Code Reviews| Index: Source/core/paint/SVGForeignObjectPainter.cpp |
| diff --git a/Source/core/paint/SVGForeignObjectPainter.cpp b/Source/core/paint/SVGForeignObjectPainter.cpp |
| index 37e58373264d565e158680c17304a3bd69ac71f6..b19f8bad58feb7ad67c3fe1acefad7bf8f26df13 100644 |
| --- a/Source/core/paint/SVGForeignObjectPainter.cpp |
| +++ b/Source/core/paint/SVGForeignObjectPainter.cpp |
| @@ -23,6 +23,12 @@ void SVGForeignObjectPainter::paint(const PaintInfo& paintInfo) |
| GraphicsContextStateSaver stateSaver(*childPaintInfo.context); |
| childPaintInfo.applyTransform(m_renderSVGForeignObject.localTransform()); |
| + // When transitioning from SVG to block painters we need to keep the PaintInfo rect up-to-date |
| + // because it can be used for clipping. |
| + AffineTransform transformToRoot = m_renderSVGForeignObject.cachedPaintInvalidationTransform() * m_renderSVGForeignObject.localTransform(); |
|
fs
2014/12/17 10:16:10
Nit: Move this into the if-scope?
pdr.
2014/12/18 22:22:40
Done
|
| + if (childPaintInfo.rect != LayoutRect::infiniteRect()) |
| + childPaintInfo.rect = enclosingIntRect(transformToRoot.inverse().mapRect(FloatRect(childPaintInfo.rect))); |
| + |
| if (SVGRenderSupport::isOverflowHidden(&m_renderSVGForeignObject)) |
| childPaintInfo.context->clip(m_renderSVGForeignObject.viewportRect()); |