Closed Bug 1701665 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 28279 - Revert "Correct clip rectangle when block-fragmented."

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox89 fixed)

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Rushan Suleymanov <rushans@google.com>' wrote:

Revert "Correct clip rectangle when block-fragmented."

This reverts commit e8b81a3337c92e17a84b0798d1b673730a51e5eb.

Reason for revert: this CL is very likely causes test failure:
virtual/layout_ng_block_frag/external/wpt/css/css-multicol/multicol-overflow-clip-positioned.html

Original change's description:

Correct clip rectangle when block-fragmented.

We used to apply the whole stitched LayoutBox clip rectangle to every
fragment (we don't store clip rectangles per fragment). To fix this,
post-process the clip rectangle, to clip it against the bounds of the
fragment.

Fixes one test, but test coverage seemed low, so I added 3 more, one for
each writing mode.

This also fixes the following tests when CompositeAfterPaint +
LayoutNGBlockFragmentation are enabled:

external/wpt/css/css-multicol/composited-under-clip-under-multicol.html
fast/multicol/composited-relpos-clipped.html
fast/multicol/composited-relpos-in-clipped.html

.. but note that the expectation files for the latter two are wrong
(pre-CompositeAfterPaint behavior is expected), so they will show up as
failing still.

Long-term we should probably consider storing a clip rectangle per
fragment. There are callers of the original
NGPhysicalBoxFragment::OverflowClipRect() (the one that doesn't take an
incoming break token) in NGBoxFragmentPainter that still don't do the
right thing (no access to the incoming break token there, so no easy way
to fix).

Bug: 1191162, 829028
Change-Id: I7cbaeeb0fb2b8a34665b82da23a7581cde1771b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2780489
Reviewed-by: Xianzhu Wang \<wangxianzhu@chromium.org>
Reviewed-by: Koji Ishii \<kojii@chromium.org>
Commit-Queue: Morten Stenshorne \<mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#866531}

Bug: 1191162
Bug: 829028
Bug: 1193460
Change-Id: Iaa176ff605761f3cb2e90259313d66e67e37063f

Reviewed-on: https://chromium-review.googlesource.com/2791482
WPT-Export-Revision: 05cb761f2666d6dc76ecdb8164f1ab44172bf470

Test result changes from PR not available.
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d2dd430747e6
[wpt PR 28279] - Revert "Correct clip rectangle when block-fragmented.", a=testonly
Pushed by nbeleuzu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8eb1bd9b50c4
[wpt PR 28279] - Revert "Correct clip rectangle when block-fragmented.", a=testonly
Test result changes from PR not available.
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/182cc4ee7e92
[wpt PR 28279] - Revert "Correct clip rectangle when block-fragmented.", a=testonly
Test result changes from PR not available.
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/03daa9731dc6
[wpt PR 28279] - Revert "Correct clip rectangle when block-fragmented.", a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.