[Gecko Bug 1823463] Support shape() for clip-path property in style.#45191
Merged
moz-wptsync-bot merged 2 commits intomasterfrom Mar 19, 2024
Merged
[Gecko Bug 1823463] Support shape() for clip-path property in style.#45191moz-wptsync-bot merged 2 commits intomasterfrom
moz-wptsync-bot merged 2 commits intomasterfrom
Conversation
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
wpt-pr-bot
approved these changes
Mar 19, 2024
Collaborator
wpt-pr-bot
left a comment
There was a problem hiding this comment.
The review process for this patch is being conducted in the Firefox project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
PathCommandto let it be a specialization ofGenericShapeCommandin 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