Commit f9c2cf42 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

[PE] Fix missing InvalidateClipPathCache in a corner case

InvalidateClipPathCache should be called whenever style.ClipPath()
changes. Previously it missed a branch.

Bug: 835828
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ifd178ac2b2b695239a7aa0b69cdbe4f41cad5af2
Reviewed-on: https://chromium-review.googlesource.com/1038425
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarTien-Ren Chen <trchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555312}
parent 40eebf19
......@@ -1306,6 +1306,7 @@ crbug.com/796768 fast/pagination/repeating-thead-tfoot-paged-x.html [ Crash ]
crbug.com/796768 fast/pagination/repeating-thead-tfoot-paged-y.html [ Crash ]
crbug.com/796768 fast/pagination/short-pages-tall-content.html [ Crash ]
crbug.com/796768 fast/text-autosizing/constrained-and-overflow-paged-x-ancestor.html [ Crash ]
crbug.com/796768 paint/clipath/change-mask-clip-path-multicol-crash.html [ Crash ]
crbug.com/796768 paint/invalidation/overflow/paged-with-overflowing-block-rl.html [ Crash ]
crbug.com/796768 paint/pagination/composited-paginated-outlined-box.html [ Crash ]
......
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script>
async_test(t => {
runAfterLayoutAndPaint(t.step_func_done(() => {
target.textContent = '12345';
target.style.webkitMask = 'url(#bar)';
target.style.clipPath = 'url(#foo)';
}));
});
</script>
<div style="columns: 2">
<a id="target" style="clip-path: circle(70%); border-bottom: 2px solid"></a>
</div>
......@@ -2040,11 +2040,13 @@ void LayoutObject::SetStyle(scoped_refptr<ComputedStyle> style) {
SetShouldDoFullPaintInvalidation();
else
SetShouldDoFullPaintInvalidationWithoutGeometryChange();
if (old_style && !old_style->ClipPathDataEquivalent(*style_))
InvalidateClipPathCache();
}
if ((diff.NeedsPaintInvalidationObject() ||
diff.NeedsPaintInvalidationSubtree()) &&
old_style && !old_style->ClipPathDataEquivalent(*style_))
InvalidateClipPathCache();
if (diff.NeedsVisualRectUpdate())
SetMayNeedPaintInvalidation();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment