Commit 22374c68 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

Don't invalidate z-order list when creating a ScrollableArea

This fixes performance regression caused by crrev.com/c/2547435 by
avoiding z-order list refresh when there will be no overlay scroll
controls. The invalidation is not necessary because we'll invalidate
z-order list when the ScrollableArea actually creates an overlay
scroll control.

TEST=Existing tests

Bug: 1149793, 1150795
Change-Id: Ifc380b891b9c9155b706c0d5c24c02685bf18a32
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2550586Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829545}
parent 3f60737e
......@@ -1610,8 +1610,8 @@ void PaintLayer::UpdateScrollableArea() {
}
GetLayoutObject().SetNeedsPaintPropertyUpdate();
// Need to update z-ordering of overlay overflow controls.
if (!scrollable_area_ || NeedsReorderOverlayOverflowControls())
// To clear z-ordering information of overlay overflow controls.
if (NeedsReorderOverlayOverflowControls())
DirtyStackingContextZOrderLists();
if (auto* compositor = Compositor())
compositor->SetNeedsCompositingUpdate(kCompositingUpdateRebuildTree);
......
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