Closed Bug 1767444 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 33908 - Simplify fragment / break token copying when adding OOFs.

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Morten Stenshorne <mstensho@chromium.org> wrote:

Simplify fragment / break token copying when adding OOFs.

There were two known problems, that the code didn't handle.

  1. We may have generated a fragment for a node which is preceded by a
    node that generated a break token. See
    break-after-oof-before-preceding-pushed-float-crash.html

  2. Clearance may push a node past multiple fragmentainers (with a
    break-before break token in each fragmentainer). The code would get
    confused when it found these break tokens while expecting an incoming
    OOF break token.

I started by fixing these separately, but realized that we might just as
well remove the special child fragment / break token iteration code. All
we need is making sure that we keep the order of child fragments and
break tokens from the original fragment intact. Furthermore, we don't
need to add any break tokens for OOFs that break, since
NGOutOfFlowLayoutPart will resume them correctly anyay.

Add a flag to the container builder, to prevent outgoing break tokens
from being added automatically when adding child fragments. Perform
these two steps separately in NGSimplifiedOOFLayoutAlgorithm().

Bug: 1318455
Change-Id: I8930a78754f0695fd5f99a74e0a5f7ef363fb0f7
Reviewed-on: https://chromium-review.googlesource.com/3622335
WPT-Export-Revision: c9a23ea7e2931dbd762cef473b147a82531721fb

Component: web-platform-tests → Layout
Product: Testing → Core

CI Results

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

Total 3 tests

Status Summary

Firefox

PASS: 3

Chrome

PASS: 3

Safari

PASS: 3

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/272c4ab91164
[wpt PR 33908] - Simplify fragment / break token copying when adding OOFs., a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.