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

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

Issue 2276783002: Fix incorrect invalidation of foreign objects under window zoom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/LayoutTests/TestExpectations ('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/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index d83f1633504c0f04c338ede0370b2395be6c27fd..97ca0109a4b73d1ff9319a710179ff80c480fca2 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -411,6 +411,20 @@ void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
&& (hasOverflowClip() || isLayoutView()))
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()
wkorman 2016/08/23 23:13:10 This is just a minor adaptation of your patch: htt
pdr. 2016/08/24 18:12:19 I am not sure if my original patch was on the righ
Xianzhu 2016/08/24 18:19:48 I think the zoom case works because we layout the
fs 2016/08/24 19:11:44 Like Xianzhu say, zoom ought to trigger layout for
pdr. 2016/08/24 19:55:23 I see, that makes sense. Would something like the
+ && isSVGForeignObject()
+ && !styleRef().isOverflowVisible()) {
+ // We'd like to only force subtree invalidation if the paint
+ // invalidation rect changes, but on window zoom for foreign objects we
+ // have to invalidate regardless.
+ newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinContainer();
+ }
+
newPaintInvalidationState.updateForChildren(reason);
invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698