Closed Bug 1922855 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 48481 - [line-clamp] Fix bug when reusing line fragments with `line-clamp: auto`

Categories

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

task

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Andreu Botella <abotella@igalia.com> wrote:

[line-clamp] Fix bug when reusing line fragments with line-clamp: auto

The patch at https://crrev.com/c/5868971 refactored line-clamp: auto
to always do a first pass of layout to determine the number of lines
before clamp, and then a second pass that behaves the same as clamping
with a set number of lines.

However, this patch introduced a bug where, if line fragments were
reused from cache, the number of lines would decrease to match the
number of reused lines in the second layout pass, but it would not
increase by a corresponding amount in the first pass. This meant that
the clamp point would happen at an unexpected place.

This patch fixes this by adding a condition that checks whether we're
in the first layout pass and incrasing the number of lines in that
case.

Bug: 40336192
Change-Id: I7dd339cd37cec3dde79d989b5b49d373387b99eb
Reviewed-on: https://chromium-review.googlesource.com/5907101
WPT-Export-Revision: 085d86a71125775b3b9be91f37aa579d22f9ddff

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

Status Summary

Firefox

FAIL: 1

Chrome

PASS: 1

Safari

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/116705d30750 [wpt PR 48481] - [line-clamp] Fix bug when reusing line fragments with `line-clamp: auto`, a=testonly https://hg.mozilla.org/integration/autoland/rev/8bb8b17827d3 [wpt PR 48481] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.