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..ed8b6f9cb264370e3e1161a2437117c8e487c33e 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,42 @@ void RenderSVGModelObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads) |
quads.append(localToAbsoluteQuad(FloatQuad(repaintRectInLocalCoordinates()))); |
} |
+void RenderSVGModelObject::repaintTreeAfterLayout() |
+{ |
+ // Note: This is a reduced version of RenderBox::repaintTreeAfterLayout(). |
Julien - ping for review
2014/05/05 16:34:37
This should probably be a FIXME about sharing code
fs
2014/05/05 17:33:06
Added FIXME as well.
|
+ 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; |
+ } |
+ |
+ if (onlyNeededPositionedMovementLayout() && compositingState() != PaintsIntoOwnBacking) |
+ setShouldDoFullRepaintAfterLayout(true); |
Julien - ping for review
2014/05/05 16:34:37
Can we set positioned movement only flag on SVG re
fs
2014/05/05 17:33:06
Not AFAIK. Dropping these two lines. (Had kept the
|
+ |
+ const LayoutRect& newRepaintRect = previousRepaintRect(); |
+ const LayoutPoint& newPositionFromRepaintContainer = previousPositionFromRepaintContainer(); |
+ bool didFullRepaint = repaintAfterLayoutIfNeeded(containerForRepaint(), |
+ shouldDoFullRepaintAfterLayout(), oldRepaintRect, oldPositionFromRepaintContainer, &newRepaintRect, &newPositionFromRepaintContainer); |
+ |
+ if (!didFullRepaint) |
+ repaintOverflowIfNeeded(); |
Julien - ping for review
2014/05/05 16:34:37
Wouldn't this be a no-op for SVG?
fs
2014/05/05 17:33:06
Yes (same as above.) Dropping these two lines too.
|
+ |
+ repaintScrollbarsIfNeeded(); |
+ |
+ RenderObject::repaintTreeAfterLayout(); |
+} |
+ |
} // namespace WebCore |