[Refactor] Remove redundant scrolling state
Since https://crrev.com/c/1980984 has decoupled latching from scroll animation state, we can now simply use the latched node for sending of scrollend and overscroll events to DOM. We simply require that the latched node be preserved past the GSE so that in the next commit we can pass it along for dispatching the scrollend event. This CL removes |scroll_animating_latched_element_id_| (which was actually unused since the previous CL) and |scroll_animating_overscroll_target_element_id_|. The latter was previously needed since ScrollAnimated would clear the latched node if an animation wasn't created (e.g. at the extent). Since the latch is now maintained, it can be used in its place. This CL renames |last_scroller_element_id_| to |last_latched_scroller_| and makes it match the |CurrentlyScrollingNode|, with the only exception being that it gets cleared only after the first commit after the CurrentlyScrollingNode is cleared. Bug: 940508 Change-Id: I2d0c63bd97c3bc1a9bd0158a08b3352b09bfb1f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1981195 Commit-Queue: David Bokan <bokan@chromium.org> Reviewed-by:Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/master@{#728278}
Showing
Please register or sign in to comment