Closed Bug 1735336 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 31204 - Don't let lines affect SubtreeModifiedMarginStrut-ness.

Categories

(Core :: Layout: Block and Inline, task, P4)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Morten Stenshorne <mstensho@chromium.org> wrote:

Don't let lines affect SubtreeModifiedMarginStrut-ness.

Checking the child margin when the child is an inline node doesn't make
sense, since we'd then use the margin of the containing block node.

We'd get a DCHECK failure for the SubtreeModifiedMarginStrut flag not
being consistent between regular-ish [1] and simplified layout.

In the testcase, there's a (default) BODY margin that would cause the
problem. Initially, we'd set SubtreeModifiedMarginStrut of BODY to true
(because there's inline content inside), then we'll trigger a relayout,
by changing the width of an element on the last line inside BODY. In
this pass we'll get a NGLayoutCacheStatus::kCanReuseLines hit, which
will not set SubtreeModifiedMarginStrut. Then we'll trigger another
relayout by modifying an OOF. Because it's an OOF change, the simplified
layout machinery will be involved, and we'll
CheckSameForSimplifiedLayout(). But in this pass
SubtreeModifiedMarginStrut would be true again.

[1] With a NGLayoutCacheStatus::kCanReuseLines hit.

Bug: 1255718
Change-Id: Ib0bb1b56fbf41067f40544c89c026bf121cc7500

Reviewed-on: https://chromium-review.googlesource.com/3218972
WPT-Export-Revision: d4c3efba21a75e488a83762081e0cdc31c635707

Component: web-platform-tests → Layout: Block and Inline
Product: Testing → Core

CI Results

Ran 11 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

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8c317e30e472
[wpt PR 31204] - Don't let lines affect SubtreeModifiedMarginStrut-ness., a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.