Do not push the reseted needs_show_scrollbars to active tree
This issue is caused by couple reasons: 1. aura overlay scrollbars are visible (opacity=1) at initial state. 2. page is a not scrollable, then become scrollable. 3. SetScrollable and ScrollbarAnimationController creation may come from separate commit and no promising order. We use needs_show_scrollbars in layerImpl to indicate the layer need to call SAC::DidRequestShowFromMainThread. If the SetScrollable call happens before SAC and from separate commit then: - first commit: 1. In TreeSynchronizer::PushLayerProperties, pending tree push to active tree SetScrollable, set needs_show_scrollbars because bounds change or scrollable flag change. then reset needs_show_scrollbars in the layer of pending tree. [1] 2. In HandleScrollbarShowRequestsFromMain, skip because SAC not found. - second commit: 1. In TS::PushLayerProperties, pending tree set the needs_show_scrollbars(false) to active tree, then call SetScrollable and quick return because no bounds change or scrollable flag change. 2. In HandleScrollbarShowRequestsFromMain, skip because needs_show_scrollbars is false. In this patch, we only push needs_show_scrollbars to active tree when needs_show_scrollbars is true. So we do not use the reseted value to override the value we keep for next pick up. [1] https://chromium.googlesource.com/chromium/src/+/a7c2ee628552ec6a9d624dcd1b78442991615715/cc/layers/layer_impl.cc#329 Bug: 740795 Change-Id: I15089ba357a67b3336bb251ce19cb2f7bf5953ba Reviewed-on: https://chromium-review.googlesource.com/568815Reviewed-by:Weiliang Chen <weiliangc@chromium.org> Reviewed-by:
David Bokan <bokan@chromium.org> Commit-Queue: Jianpeng Chao <chaopeng@chromium.org> Cr-Commit-Position: refs/heads/master@{#487089}
Showing
Please register or sign in to comment