Skip to content

Commit

Permalink
Avoid calling MarkAncestorChainForFlagsUpdate() if NeedsLayout is true
Browse files Browse the repository at this point in the history
This is a change in PaintLayer::StyleDidChange().
Right now if diff.NeedsLayout() is true
we're calling MarkAncestorChainForFlagsUpdate().
This patch will avoid doing such call, as it doesn't seem to be needed.

Change-Id: I5612ae677e6a7c199f8050e89ac84c6fd6b5fdef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3592832
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Manuel Rego <rego@igalia.com>
Cr-Commit-Position: refs/heads/main@{#994773}
  • Loading branch information
mrego authored and Chromium LUCI CQ committed Apr 21, 2022
1 parent 1298232 commit 973a630
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions third_party/blink/renderer/core/paint/paint_layer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2439,9 +2439,6 @@ void PaintLayer::StyleDidChange(StyleDifference diff,
// to recompute the bit once scrollbars have been updated.
UpdateSelfPaintingLayer();

if (diff.NeedsLayout())
MarkAncestorChainForFlagsUpdate();

// A scroller that changes background color might become opaque or not
// opaque, which in turn affects whether it can be composited on low-DPI
// screens.
Expand Down

0 comments on commit 973a630

Please sign in to comment.