Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up"perspective" property must reject negative values #15449
Comments
|
The perspective matrix uses the parameter, d, to compute the matrix [1]: "-1/d", so zero should be unacceptable. However, IIRC, in Gecko, we treat prespective(0) as prespective(inf), so we still works on zero. [1] https://drafts.csswg.org/css-transforms-2/#PerspectiveDefined |
|
We treat |
|
I see. Thanks for clarification. |
|
Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the If you intend to work on this issue, then add |
|
We just need to add parse_non_negative as the predefined type parse function there. |
|
@highfive: assign me! |
|
Hey @ioctaptceb! Thanks for your interest in working on this issue. It's now assigned to you! |
|
Sorry if I'm missing something obvious, but what's the policy for PR timeouts? If nobody is actually working on this I'd like to try implementing it. |
|
It is good form to ask the person directly before starting to work on somethng. @ioctaptceb have you made any progress? |
|
ping? |
|
It seems @ioctaptceb doesn't respond after a whole week... This issue is now yours, @dcci :) |
|
@dcci please go ahead! |
|
I was unsure how to test this one, so I asked on IRC.
|
|
@dcci What's the status of this? |
|
@highfive: assign me |
|
Hey @n0max! Thanks for your interest in working on this issue. It's now assigned to you! |
|
cc @emilio |
|
@n0max Did you start working on this? Need help? |
|
I have already changed the parsing to non negative and created some test cases. |
|
Ah, just revert the manifest to the previous commit, |
|
You will need to remove the the mozresource.pyc file before running update-manifest again. |
|
Thank you, that worked. |
Parse perspective property as non negative and add tests <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15449 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16157) <!-- Reviewable:end -->
Spec: https://drafts.csswg.org/css-transforms-2/#perspective-property
(The spec says positive, but it should be non-negative... which is an issue of the spec.)
Relevant code: https://github.com/servo/servo/blob/master/components/style/properties/longhand/box.mako.rs#L1642-L1648
(Should be an easy one, but not clear what is the best way to fix. cc @Manishearth)