Skip to content

[Gecko Bug 1823463] Support shape() for clip-path property in style.#45191

Merged
moz-wptsync-bot merged 2 commits intomasterfrom
gecko/1823463
Mar 19, 2024
Merged

[Gecko Bug 1823463] Support shape() for clip-path property in style.#45191
moz-wptsync-bot merged 2 commits intomasterfrom
gecko/1823463

Conversation

@moz-wptsync-bot
Copy link
Copy Markdown
Collaborator

Implement the style part for shape(). Besides, update some issues in the
test file, e.g. avoid using viewport height so we get the fixed result
on different devices.

I will refactor PathCommand to let it be a specialization of
GenericShapeCommand in the following path.

Differential Revision: https://phabricator.services.mozilla.com/D202882

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1823463
gecko-commit: 7f73d7224fdc21459ff0a92654fc2b8b2ae691df
gecko-reviewers: emilio

Implement the style part for shape(). Besides, update some issues in the
test file, e.g. avoid using viewport height so we get the fixed result
on different devices.

I will refactor `PathCommand` to let it be a specialization of
`GenericShapeCommand` in the following path.

Differential Revision: https://phabricator.services.mozilla.com/D202882

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1823463
gecko-commit: 7f73d7224fdc21459ff0a92654fc2b8b2ae691df
gecko-reviewers: emilio
Update clip-path-shape-003.html and clip-path-shape-004.html because
1. Per SVG2 spec, we don't accept comma among commands, so I remove them.
2. Basically, these two tests want to test the result of `shape()`
   should be identical to the result of `path()`. However, I noticed the
   original tests which put a `clip-path:path()` with `position:absolutely`
   may have a fuzzy result if the path has some curves there. This may be
   caused by anti-alias together with absoultely positioned element
   (note: perhaps there are some floating point calculation in layout for
   this, so the final rendering coordinates may have some fractions).
   Therefore, I drop the absolutely positioned element, and just test
   that if the result of `shape()` is identical to the result of `path()`.

Also, add two more tests for different reference-boxes together with
the usage of `shape()` (to make sure we resolve percentage values properly).

Differential Revision: https://phabricator.services.mozilla.com/D202884

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1823463
gecko-commit: 27f7a56246fb95d10fb9df851d1b13cbdcfced87
gecko-reviewers: emilio
Copy link
Copy Markdown
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Firefox project.

@moz-wptsync-bot moz-wptsync-bot merged commit 3e1bf21 into master Mar 19, 2024
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1823463 branch March 19, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants