[scroll-timeline] only resolve scroll source at construction
Previously scroll source was resolved anytime it was accessed. However this is problematic in two ways: - The Document.scrollingElement can change so we could resolve to a different node if that happens. However Attach/Detach process expect the resolved node to be the same and violating this invariant can cause unexpected behavior. - Resolution process can trigger layout which may not be allowed during detachment (see issue 890143) This patch changes this behavior so that the scroll source is only resolved at ScrollTimeline construction and the resolved node is used for the lifetime of scroll timeline. Bug: 890143 Change-Id: I8a745385e22e2c0718a5f9cade763f5eb2174c83 Reviewed-on: https://chromium-review.googlesource.com/c/1342677Reviewed-by:Stephen McGruer <smcgruer@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#610187}
Showing
Please register or sign in to comment