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

Unified Diff: Source/core/rendering/svg/RenderSVGModelObject.cpp

Issue 260963012: Override repaintTreeAfterLayout for RenderSVGModelObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adjust TC again for increased resilience to platform differences. Created 6 years, 7 months 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
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698