Remove OffsetForInFlowPosition() from PaintLayer::location_ The reason to omit OffsetForInFlowPosition is that it can depend on sticky position constraints and scroll offset. Depending on sticky position constraints is illogical, because those constraints are updated during the CompositingInputsUpdater. Depending on scroll is bad because it means we have to update location_ every time scroll offset changes, for sticky elements. OffsetForInFlowPosition can instead be computed dynamically in all callsites of PaintLayer::Location(). The computational cost of doing so should be cheap relative to the algorithms that call Location(). One side-effect is that this patch entails a partial revert of https://chromium-review.googlesource.com/c/chromium/src/+/1686597. This is because we need to cache OffsetForInFlowPosition for rel-pos elements, in order to detect their movement and invalidate compositing inputs if so (the location of a composited layer depends on its PaintLayer's position). It should be possible to keep track of whether OffsetForInFlowPosition changed during layout itself, but that is left for a future patch. And now UpdateLayerPositionsAfterOverflowScroll is not needed so that method is removed. Bug: 980767 Change-Id: I4ebc54846ddc041713d9571f17c4f6add97f4cba Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1700337 Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/master@{#677360}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .