Closed Bug 1856471 Opened 9 months ago Closed 8 months ago

WPT css/css-masking/clip-path/clip-path-viewBox-1b.html fails in Firefox (after adjustment in interop issue #509)

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

(1 file)

This interop issue is changing a clip-path test to match the spec, and it looks like our behavior disagrees with the spec, so we'll start failing that test when the change is merged:
https://github.com/web-platform-tests/interop/issues/509

Test:
https://wpt.fyi/results/css/css-masking/clip-path/clip-path-viewBox-1b.html

Filing this bug on fixing our implementation to match the spec and the updated expectations.

shot-in-the-dark -- we might want to use 0,0 for our x and y value here:
https://searchfox.org/mozilla-central/rev/630d2c45fc127a44756e3cca8cef51c35654a4b4/layout/base/nsLayoutUtils.cpp#9594-9595

WebKit's is our "reference" for the new behavior here; I think they match the spec, as discussed in that interop github issue. (Chromium doesn't seem to do any clipping at all for me right now, but I imagine that's because they've got a fix of some sort that's in-flight.)

(In reply to Daniel Holbert [:dholbert] from comment #1)

shot-in-the-dark -- we might want to use 0,0 for our x and y value here:
https://searchfox.org/mozilla-central/rev/630d2c45fc127a44756e3cca8cef51c35654a4b4/layout/base/nsLayoutUtils.cpp#9594-9595

I pushed to try to see if there are any other issues: https://treeherder.mozilla.org/jobs?repo=try&revision=9a3069f20393d963fee361c8778fae32e72c28b8

OK. I guess we may also have to update:

  1. mask-clip-2.html
  2. mask-origin-3.html

Both use view-box and the tests have non-zero x and y in viewBox.

Per https://github.com/web-platform-tests/interop/issues/509, we update
the coordinate to match the spec, i.e. When the viewBox includes non-zero min-x
or min-y offsets, this origin box does not actually correspond to the visible
region rectangle defined by the viewBox.
https://drafts.csswg.org/css-box-3/#valdef-box-view-box

Also tweak mask-clip-2.html and mask-origin-3.html to make sure we use
the proper view-box.

Assignee: nobody → boris.chiou
Attachment #9357118 - Attachment description: Bug 1856471 - Ignore min-x and min-y when computing view-box. → Bug 1856471 - Ignore min-x and min-y when computing view-box (so we return origin box).
Pushed by bchiou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fd4d600a8884
Ignore min-x and min-y when computing view-box (so we return origin box). r=dholbert
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/42443 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
Regressions: 1858093
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: