Closed Bug 1906751 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 47039 - [line-clamp] Make the sizes of line-clamped boxes account for margins

Categories

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

task

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Andreu Botella <abotella@igalia.com> wrote:

[line-clamp] Make the sizes of line-clamped boxes account for margins

Chromium's implementation of (-webkit-)line-clamp in LayoutNG, until
now, set the size of a clamped box to the logical block offset at
which the last inflow child before the clamp point ends, and it
cleared the end margin strut. This meant that if a clamp point was
nested in multiple block boxes, the bottom margins of those boxes
would be ignored.

With the collapse version of line-clamp, instead, the sizes of
clamped boxes should be the same as if they had no content after the
clamp point. To achieve this, rather than storing the intrinsic block
size offset at the clamp point, we store the PreviousInflowPosition.
Then, in BlockLayoutAlgorithm::FinishLayout, the size is determined
based on the previous inflow position at clamp point, rather than
based on the one at the end of the box's hidden children.

Bug: 40336192
Change-Id: I9810d2d1b00d4a9e28c0f5f92653f7d3cbed454c
Reviewed-on: https://chromium-review.googlesource.com/5683304
WPT-Export-Revision: 21276f3c3a63b2dce501ccc1244f60618b899ed4

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

CI Results

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

Total 4 tests

Status Summary

Firefox

FAIL: 4

Chrome

FAIL: 4

Safari

FAIL: 4

Links

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/8204a0123120 [wpt PR 47039] - [line-clamp] Make the sizes of line-clamped boxes account for margins, a=testonly https://hg.mozilla.org/integration/autoland/rev/16d879b232ef [wpt PR 47039] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
You need to log in before you can comment on or make changes to this bug.