Closed Bug 2072943 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 62431 - [line-clamp] Clip floats inside line-clamp containers

Categories

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

task

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Andreu Botella <abotella@igalia.com> wrote:

[line-clamp] Clip floats inside line-clamp containers

As per https://github.com/w3c/csswg-drafts/issues/12665, floats
inside a line-clamp container should be clipped to the container's
bottom-end content edge. A previous CL, https://crrev.com/c/8138462,
added PhysicalBoxFragment::IsLineClampClippedFloat to mark such
floats.

This CL implements the actual clipping by adding a new clip node,
LineClampFloatClip, which is set on clipped floats. To keep track of
the edge to clip at, we add a line_clamp_float_clip_state field to
PaintPropertyTreeBuilderFragmentContext::ContainingBlockContext,
storing a clip rect and the transform active at the line-clamp
container. We populate this field in
FragmentPaintPropertyTreeBuilder::UpdateForSelf when we reach a
line-clamp container, and we clear it whenever we enter a new
formatting context, since those floats won't be clipped to that
offset.

Bug: 40336192, 445688004, 543371829
Change-Id: I6d4e700efd3084af07b36c6a11653f9fba26c92a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8137283
Commit-Queue: Andreu Botella \<abotella@igalia.com>
Reviewed-by: Xianzhu Wang \<wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1693387}

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

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.