Closed Bug 1677131 Opened 8 months ago Closed 8 months ago

[wpt-sync] Sync PR 26525 - [LayoutNG] Do not examine sibling nodes when walking break tokens.

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Morten Stenshorne <mstensho@chromium.org>' wrote:

[LayoutNG] Do not examine sibling nodes when walking break tokens.

When processing incoming break tokens as part of block child layout, do
not call NGLayoutInputNode::NextSibling(), because:

1: We're not going to use the result
2: It would trigger a DCHECK failure in some cases

If we're resuming at a float in an inline formatting context, we'll do
this directly from the block layout algorithm. However, the float may
have inline-level siblings, and those should be handled by the inline
layout algorithm, not the block layout algorithm.
NGBlockNode::NextSibling() (rightly) chokes on inline-level boxes, so
just avoid it. There will always be an inline break token which will
take care of this correctly for us.

The attached test used to DCHECK-fail (but otherwise pass) without this
fix.

Change-Id: I826c30b362f2ae40af12f1b7cf1b0a9e8cd9ccfb
Reviewed-on: https://chromium-review.googlesource.com/2537675
WPT-Export-Revision: 72cb6a65e2621ef25e2ffe22257e492ee939a5c4

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 1 tests

Status Summary

Firefox

PASS: 1

Chrome

PASS: 1

Safari

PASS: 1

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b6282c984816
[wpt PR 26525] - [LayoutNG] Do not examine sibling nodes when walking break tokens., a=testonly
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.