Index: Source/core/rendering/svg/RenderSVGModelObject.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGModelObject.cpp b/Source/core/rendering/svg/RenderSVGModelObject.cpp |
index 15679791569f254950edbde84f9cc9cffea4ae77..64e1b84a1119d8eb390ebd76529ceb3613962b20 100644 |
--- a/Source/core/rendering/svg/RenderSVGModelObject.cpp |
+++ b/Source/core/rendering/svg/RenderSVGModelObject.cpp |
@@ -33,6 +33,7 @@ |
#include "core/rendering/svg/RenderSVGModelObject.h" |
#include "SVGNames.h" |
+#include "core/rendering/RenderView.h" |
#include "core/rendering/svg/RenderSVGRoot.h" |
#include "core/rendering/svg/SVGResourcesCache.h" |
#include "core/svg/SVGGraphicsElement.h" |
@@ -123,4 +124,35 @@ void RenderSVGModelObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads) |
quads.append(localToAbsoluteQuad(FloatQuad(repaintRectInLocalCoordinates()))); |
} |
+void RenderSVGModelObject::repaintTreeAfterLayout() |
+{ |
+ // Note: This is a reduced version of RenderBox::repaintTreeAfterLayout(). |
+ // FIXME: Should share code with RenderBox::repaintTreeAfterLayout(). |
+ LayoutStateDisabler layoutStateDisabler(*this); |
+ |
+ ASSERT(RuntimeEnabledFeatures::repaintAfterLayoutEnabled()); |
+ ASSERT(!needsLayout()); |
+ |
+ const LayoutRect oldRepaintRect = previousRepaintRect(); |
+ const LayoutPoint oldPositionFromRepaintContainer = previousPositionFromRepaintContainer(); |
+ RenderLayerModelObject* repaintContainer = containerForRepaint(); |
+ setPreviousRepaintRect(clippedOverflowRectForRepaint(repaintContainer)); |
+ setPreviousPositionFromRepaintContainer(positionFromRepaintContainer(repaintContainer)); |
+ |
+ // If we are set to do a full repaint that means the RenderView will be |
+ // invalidated. We can then skip issuing of invalidations for the child |
+ // renderers as they'll be covered by the RenderView. |
+ if (view()->doingFullRepaint()) { |
+ RenderObject::repaintTreeAfterLayout(); |
+ return; |
+ } |
+ |
+ const LayoutRect& newRepaintRect = previousRepaintRect(); |
+ const LayoutPoint& newPositionFromRepaintContainer = previousPositionFromRepaintContainer(); |
+ repaintAfterLayoutIfNeeded(containerForRepaint(), |
+ shouldDoFullRepaintAfterLayout(), oldRepaintRect, oldPositionFromRepaintContainer, &newRepaintRect, &newPositionFromRepaintContainer); |
+ |
+ RenderObject::repaintTreeAfterLayout(); |
+} |
+ |
} // namespace WebCore |