Closed Bug 1852323 Opened 10 months ago Closed 8 months ago

Firefox will fail css/css-masking/clip-path/clip-path-polygon-010.html after that test gets updated to match the spec

Categories

(Core :: Layout, defect)

defect

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: dholbert, Assigned: boris)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

As of this moment, we're alone in passing this WPT test:
https://wpt.fyi/results/css/css-masking/clip-path/clip-path-polygon-010.html

However, per https://github.com/web-platform-tests/interop/issues/409 , that test doesn't actually match the spec; and progers is likely updating the test to make it match. Hence, I'm preemptively filing this bug.

(Before a spec change 5 years ago, the spec said that the used value of clip-path's fill-box keyword was border-box, for elements with a CSS layout box (i.e. non-SVG conent).
That's what the test currently expects and what we seem to implement. However, as of that spec change, the used value is now supposed to be content-box.)

It looks like this is at least one of the spots that we need to update:
https://searchfox.org/mozilla-central/rev/c1fb133ca4901985070e519c92322b432fa254c5/layout/base/nsLayoutUtils.cpp#9641-9642,9655

Possibly other nearby usages of that StyleGeometryBox::FillBox enum as well.

Similar change is coming for another test:
https://github.com/web-platform-tests/interop/issues/410
wpt.fyi: https://wpt.fyi/results/css/css-masking/clip-path/clip-path-fillBox-1a.html

Same situation as in comment 0; and the same internal fix on our end should be sufficient to get us back to passing, once the test has been changed.

boris, could you take this masking fix when you've got cycles?

Flags: needinfo?(boris.chiou)

(The tests were updated and wpt.fyi is showing us as failing these tests now.)

Sure. I will take a look at this. This should be easy to fix.

Flags: needinfo?(boris.chiou)

It seems mask-origin/mask-clip/clip-path use different mapping for
geometry-box. We should specialize each one.

Also, make sure mask-origin/mask-clip follow the spec.

Assignee: nobody → boris.chiou
Blocks: 1856202
Attachment #9353023 - Attachment description: Bug 1852323 - Part 1: Update the mapping of geometry box for clip-path (wip, wait for wpt sync). → Bug 1852323 - Part 1: Update the mapping of geometry box for clip-path.
Attachment #9353328 - Attachment description: Bug 1852323 - Part 2: Refactor the mapping for StyleGeometryBox (wip). → Bug 1852323 - Part 2: Fix the mapping of StyleGeometryBox for mask-clip.
Pushed by bchiou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/46bb8c25b946
Part 1: Update the mapping of geometry box for clip-path. r=emilio
https://hg.mozilla.org/integration/autoland/rev/865e00dab584
Part 2: Fix the mapping of StyleGeometryBox for mask-clip. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/42468 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
Upstream PR merged by moz-wptsync-bot
Blocks: 1771782
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: