[root-scroller] Select implicit from scrollable elements
To make implicit root scrollers promote and demote more reliably we need to separate the notion of being a valid candidate from being a valid root scroller. Currently, we build a list of candidates at layout that we restrict to only valid implicit root scrollers. When layout is finished we evaluate this list to determine which of the elements will be promoted. Those that are no longer valid are removed from the list. Unfortunately this doesn't work too well since validity can change for non-local reasons. For example, a parent may change its transform, making its child viewport-filling. Thus, to make this work we'd have to reevaluate candidates and validity everytime virtually anything on the page changes. This patch changes this method to make any currently scrollable element a valid candidate. The list of candidates is maintained by listening to PaintLayerScrollableAreas for when they become scrollable (allow scrolling and have overflow), rather than hooking into layout for every object. This list should be fairly small but it's more stable over the life of a page so we can be more confident it truly contains all the candidates we care about when we get to reevaluating which, if any, should be promoted. Bug: 838683 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I6d5c3d876d885fec638b46e992f3026e418737b7 Reviewed-on: https://chromium-review.googlesource.com/1038648 Commit-Queue: David Bokan <bokan@chromium.org> Reviewed-by:Chris Harrelson <chrishtr@chromium.org> Reviewed-by:
Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/master@{#559495}
Showing
This diff is collapsed.
Please register or sign in to comment