Chromium Code Reviews| 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); |
| } |