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

Unified Diff: Source/core/paint/SVGForeignObjectPainter.cpp

Issue 802833003: Remove the SVG paint culling optimization (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove spurious lines Created 6 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
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());

Powered by Google App Engine
This is Rietveld 408576698