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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Issue 1835843002: WIP: Fix foreignObject cullrect Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index af2bed6fa3b128e709ace02be291992f5c2867c9..04a7bd266bf003d6744d286ae00055b7421f1216 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -390,6 +390,18 @@ void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
&& hasOverflowClip())
newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinContainer();
+ // SVGForeignObject clips descendants and needs to over-invalidate to ensure
+ // newly exposed content repaints.
+ // TODO(pdr): SVGForeignObject supports overflow clipping using a different
+ // approach than LayoutBlock (see LayoutSVGBlock::allowsOverflowClip). This
+ // over-invalidation should be removed when overflow is unified.
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()
+ && isSVGForeignObject()
+ && !styleRef().isOverflowVisible()
+ && previousPaintInvalidationRect != this->previousPaintInvalidationRect()) {
+ newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer();
+ }
+
newPaintInvalidationState.updatePaintOffsetAndClipForChildren();
invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutScrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698