• Sahir Vellani's avatar
    Resize Observer: Observe Device Pixel Content Box · f2c6fed5
    Sahir Vellani authored
    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: default avatarPhilip Rogers <pdr@chromium.org>
    Reviewed-by: default avatarDaniel Libby <dlibby@microsoft.com>
    Reviewed-by: default avatarStefan Zager <szager@chromium.org>
    Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#751159}
    f2c6fed5
VirtualTestSuites 28.5 KB