Closed Bug 1794975 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 36429 - Treat -webkit-line-clamp boxes as monolithic.

Categories

(Core :: Layout: Scrolling and Overflow, task, P4)

task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Morten Stenshorne <mstensho@chromium.org> wrote:

Treat -webkit-line-clamp boxes as monolithic.

It seems pointless to let them fragment, and our implementation didn't
behave when they fragmented anyway. Apart from counting lines
incorrectly in resumed fragments, we also had a stack overflow issue,
due to RelayoutIgnoringLineClamp() and RelayoutAndBreakEarlier()
invoking each other indefinitely.

RelayoutIgnoringLineClamp() would kick in if the number of lines was
equal to the -webkit-line-clamp value, regardless of whether there'd be
more lines to come in the next fragmentainer. When going back to
re-layout after having determined the orphans/widows requirements
(RelayoutAndBreakEarlier()) and set an early-break, this could trigger
RelayoutIgnoringLineClamp(), which would restart orphans/widows
calculation, since the early-break wasn't carried over (this could be
fixed, but it seems rather meaningless).

Making such boxes monolithic will disable fragmentation inside, so that
the two re-layout mechanisms never meet and therefore never get an
opportunity to start fighting each other. We used to crash when printing
youtube.com.

Bug: 1372637
Change-Id: I3c3a072d9d5025205e6d3600738329df8d3da0f8
Reviewed-on: https://chromium-review.googlesource.com/3948644
WPT-Export-Revision: 965b06f8d89ff6d92db439b525ef00c0ed209083

Component: web-platform-tests → Layout: Scrolling and Overflow
Product: Testing → Core

CI Results

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

Total 3 tests

Status Summary

Firefox

PASS : 2
FAIL : 1

Chrome

CRASH: 2
FAIL : 1

Safari

PASS : 2
FAIL : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/841a647a547b [wpt PR 36429] - Treat -webkit-line-clamp boxes as monolithic., a=testonly https://hg.mozilla.org/integration/autoland/rev/a7f4ead50d6c [wpt PR 36429] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.