Closed Bug 1657453 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 24898 - Reland again "Use border box or layout overflow rect for layout shift tracking"

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox81 fixed)

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 24898 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/24898
Details from upstream follow.

Xianzhu Wang <wangxianzhu@chromium.org> wrote:

Reland again "Use border box or layout overflow rect for layout shift tracking"

Original patch: crrev.com/c/2319538
First reland: crrev.com/c/2333648

Changes in this patch (https://chromium-review.googlesource.com/c/chromium/src/+/2336301/1..10)

  1. Fixed use-after-free of ContainingBlockScope. Similar to the first
    revert, the issue was because it was allocated in
    PaintInvalidatorContext which is in a vector replacing the real stack.
    ContainingBlockScope::outer_ might point to an invalid address if the
    vector was reallocated. Now use std::unique_ptr\<ContainingBlockScope>
    in PaintInvalidatorContext. This increases the cost a bit but not much
    because ContainingBlockScope is created for LayoutBlockFlow with
    inline children only.
  2. Rebased on crrev.com/c/2335647 which avoids memory regression caused
    by the original CL, and enables LayoutShiftTracker to use more
    accurate previous rects for shifted boxes.
  3. Simplify LayoutShiftTracker::ReattachHook[::Scope].

Bug: 1108622
Change-Id: I7b4a85675483f7006ade8925c159a7882f08ec27

Reviewed-on: https://chromium-review.googlesource.com/2336301
WPT-Export-Revision: 25ab0f8c04fb19f41fda5d16f3a9d7bb53013500

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 5 tests and 1 subtests

Status Summary

Firefox

OK : 5
FAIL: 5

Chrome

OK : 5
PASS: 2
FAIL: 3

Safari

OK : 5
FAIL: 5

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/layout-instability/outline.html
Outline.: FAIL (Chrome: FAIL, Safari: FAIL)
/layout-instability/inline-flow-shift.html
Inline flow movement.: FAIL (Chrome: FAIL, Safari: FAIL)
/layout-instability/child-shift-with-parent.html
Parent/child movement.: FAIL (Chrome: PASS, Safari: FAIL)
/layout-instability/inline-flow-shift-vertical-rl.html
Vertical-rl inline flow movement.: FAIL (Chrome: FAIL, Safari: FAIL)
/layout-instability/child-shift-with-parent-overflow-hidden.html
Parent (with overflow:hidden) and child moved together.: FAIL (Chrome: PASS, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/188b7425b7c4
[wpt PR 24898] - Reland again "Use border box or layout overflow rect for layout shift tracking", a=testonly
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/571458658bac
[wpt PR 24898] - Reland again "Use border box or layout overflow rect for layout shift tracking", a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
Regressions: 1659299
You need to log in before you can comment on or make changes to this bug.