Commit 3c0ef7a5 authored by Tien-Ren Chen's avatar Tien-Ren Chen Committed by Commit Bot

[Blink] Invalidate clip path cache if mask layer is mutated

This is a speculative fix for https://crbug.com/856818 .

It is speculated that the clip path of an element become valid without
invalidating its cache, resulting in the associated clip nodes not
being created, and the newly created mask layer having bad layer state.

BUG=856818

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iab7acc4eb8007d03b259e6dab4f036e2b11bd900
Reviewed-on: https://chromium-review.googlesource.com/1130596Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Tien-Ren Chen <trchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574425}
parent 06af0aaf
...@@ -804,6 +804,12 @@ bool CompositedLayerMapping::UpdateGraphicsLayerConfiguration( ...@@ -804,6 +804,12 @@ bool CompositedLayerMapping::UpdateGraphicsLayerConfiguration(
bool has_clip_path = bool has_clip_path =
ClipPathClipper::LocalClipPathBoundingBox(GetLayoutObject()).has_value(); ClipPathClipper::LocalClipPathBoundingBox(GetLayoutObject()).has_value();
if (UpdateMaskLayer(has_mask || has_clip_path)) { if (UpdateMaskLayer(has_mask || has_clip_path)) {
// TODO(crbug.com/856818): Remove this speculative fix.
// It is speculated that the clip path of an element become valid without
// invalidating its cache, resulting in the associated clip nodes not
// being created, and the newly created mask layer having bad layer state.
GetLayoutObject().InvalidateClipPathCache();
graphics_layer_->SetMaskLayer(mask_layer_.get()); graphics_layer_->SetMaskLayer(mask_layer_.get());
layer_config_changed = true; layer_config_changed = true;
} }
......
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