Index: Source/core/paint/SVGForeignObjectPainter.cpp |
diff --git a/Source/core/paint/SVGForeignObjectPainter.cpp b/Source/core/paint/SVGForeignObjectPainter.cpp |
index 37e58373264d565e158680c17304a3bd69ac71f6..90aaf3302b71cf55277bce697019a4c70a2f84ea 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 HTML painters we need to keep the PaintInfo rect up-to-date |
+ // because it can be used for clipping. |
+ // FIXME: We need to find an approach that's not O(n^2). |
+ const AffineTransform& transform = SVGRenderSupport::transformToRootBorderBox(m_renderSVGForeignObject, m_renderSVGForeignObject.localTransform()); |
pdr.
2014/12/15 05:02:21
How can we cache this from paint invalidation? (si
fs
2014/12/15 10:28:16
Add:
m_cachedRootTransform = paintInvalidationSta
pdr.
2014/12/16 06:29:56
Thank you! This worked a charm.
I'm not /too/ wor
fs
2014/12/16 09:43:55
I'm not too worried either - let's just hope that
|
+ childPaintInfo.rect = enclosingIntRect(transform.inverse().mapRect(FloatRect(childPaintInfo.rect))); |
fs
2014/12/15 10:28:16
One inverse() too many (since transformToRootBorde
|
+ |
chrishtr
2014/12/15 16:36:24
Maybe just use an infinite rect here to turn off c
|
if (SVGRenderSupport::isOverflowHidden(&m_renderSVGForeignObject)) |
childPaintInfo.context->clip(m_renderSVGForeignObject.viewportRect()); |