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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp

Issue 2062533002: Disable incremental invalidation for SVG (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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 | « third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp
index 20f85b72058b07df8205b8436e7aeb0437f1d06f..d79f02b59511e53229332f91924c7fd288ad2246 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp
@@ -88,6 +88,20 @@ void LayoutSVGModelObject::willBeDestroyed()
LayoutObject::willBeDestroyed();
}
+PaintInvalidationReason LayoutSVGModelObject::getPaintInvalidationReason(const PaintInvalidationState& paintInvalidationState,
+ const LayoutRect& oldBounds, const LayoutPoint& oldLocation, const LayoutRect& newBounds, const LayoutPoint& newLocation) const
+{
+ PaintInvalidationReason invalidationReason = LayoutObject::getPaintInvalidationReason(paintInvalidationState, oldBounds, oldLocation, newBounds, newLocation);
+
+ // Disable incremental invalidation for SVG objects to prevent under-
+ // invalidation. Unlike boxes, it is non-trivial (and rare) for SVG objects
+ // to be able to be incrementally invalidated (e.g., on height changes).
+ if (invalidationReason == PaintInvalidationIncremental)
+ return PaintInvalidationFull;
+
+ return invalidationReason;
+}
+
void LayoutSVGModelObject::computeLayerHitTestRects(LayerHitTestRects& rects) const
{
// Using just the rect for the SVGRoot is good enough for now.
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698