Call PaintLayer::UpdateLayerPositionsAfterLayout only from layout roots.
Previously, it always called it from the LayoutView, regardless of what layout changed. This will be more efficient in typical cases of non-root layouts. It may be more inefficient in the following cases a. Two layout roots are present, of which one is an ancestor of the other (in this case, the new code will update the overlapping layout tree portions twice). b. Cases when LocalFrameview::UpdateLayout recurses, due to NeedsLayout being true after the first one. If we consider these cases sufficiently rare, then this CL is ok as-is. Handling (a) and (b) is possible but is harder to implement. Bug: 462719,970224 Change-Id: Ie65dc73a70bb9362dfa20ff9ad4070e3945d3c56 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1728717Reviewed-by:Stefan Zager <szager@chromium.org> Commit-Queue: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/master@{#683409}
Showing
Please register or sign in to comment