Resize Observer: Observe Device Pixel Content Box
In order to correctly snap box sizes to pixels using SnapSizeToPixel, the function FragmentData::PaintOffset() needs to be used. This function provides an accurate location/offset of the box in question. However, this the paint offset is determined in the PrePaint lifecycle phase. To accommodate this, LocalFrameView::NotifyResizeObservers is moved to LocalFrameView::UpdateLifecyclePhasesInternal. In addition, UpdateLifecyclePhasesInternal is refactored so that all lifecycle steps prior to paint are run in a loop. The loop is broken when one of the following 3 conditions are met: 1) the target state < kPaintClean 2) No changes to layout are pending 3) Resize observer loop limit is reached Resize Observer can now observe changes to the device pixel content box. ResizeObserverEntry now reports the dimensions of the pixel snapped content box. Bug: 1055579 Change-Id: Ibc7b2e4e0a8468f9af74c8cfaadd02e4f0bcfc1f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2071575Reviewed-by:Philip Rogers <pdr@chromium.org> Reviewed-by:
Daniel Libby <dlibby@microsoft.com> Reviewed-by:
Stefan Zager <szager@chromium.org> Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com> Cr-Commit-Position: refs/heads/master@{#751159}
Showing
Please register or sign in to comment