From 557dccd0a078ffd17d77f832b8affa23d965e596 Mon Sep 17 00:00:00 2001 From: Chris Harrelson Date: Wed, 5 Sep 2018 21:21:14 +0000 Subject: [PATCH] Remove over-invalidation of LayoutView on overflow recomputation. r581008 added a call to SetNeedsCompositingInputsUpdate in LayoutView whenever overflow needed to be recomputed. It actually only needs to do that when overflow actually changes. This regresses any site which causes LayoutView overflow recomputation during animations. The call to SetNeedsCompositingInputsUpdate already exists in LayoutBlock::ComputeOverflow, and correctly only does it when overflow changes. An example is tools/perf/page_sets/key_silk_cases/pushState.html, which was one of the key silk sites that regressed in issue 872172. In that case, main frame times approximately doubled, because of the extra work to compute compositing inputs. crbug.com/872172 TBR=chrishtr@chromium.org (cherry picked from commit d1042cc805130a5ed959f06593787dd0021106dc) Change-Id: Iaf4780c0e3ed4d8df67d16d836486df6df0d2f43 Reviewed-on: https://chromium-review.googlesource.com/1200315 Reviewed-by: vmpstr Commit-Queue: Chris Harrelson Cr-Original-Commit-Position: refs/heads/master@{#588205} Reviewed-on: https://chromium-review.googlesource.com/1208436 Reviewed-by: Chris Harrelson Cr-Commit-Position: refs/branch-heads/3538@{#66} Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811} --- third_party/blink/renderer/core/layout/layout_view.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/third_party/blink/renderer/core/layout/layout_view.cc b/third_party/blink/renderer/core/layout/layout_view.cc index 03c6967822a0..73ed54a073ac 100644 --- a/third_party/blink/renderer/core/layout/layout_view.cc +++ b/third_party/blink/renderer/core/layout/layout_view.cc @@ -891,8 +891,6 @@ bool LayoutView::RecalcOverflowAfterStyleChange() { SetShouldCheckForPaintInvalidation(); GetFrameView()->AdjustViewSize(); SetNeedsPaintPropertyUpdate(); - if (Layer()) - Layer()->SetNeedsCompositingInputsUpdate(); } return result; }