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 upAdd f64 version of transform.to_transform_3d_matrix #23622
Comments
|
@emilio Any opinion on this question? |
|
cc @emilio |
|
@saschanaz fwiw you can edit that code directly in Firefox, I'd file a bug in the "CSS Parsing and Computation" component. I'm happy to help out or write the patch. |
|
That being said we parse matrix as a matrix of |
In that case the parser should support f64 first... So this Number should be modified to use f64, right? servo/components/style/values/specified/mod.rs Lines 158 to 168 in b4fb2cd Looks like it will cause a large downstream changes. |
|
Presumably, and yes, not only that but also will double memory usage in most places. We store a lot of these... |
Support DOMMatrix string constructor <!-- Please describe your changes on the following line: --> Implemented DOMMatrix string constructor per [the spec](https://drafts.fxtf.org/geometry/#dom-dommatrixreadonly-dommatrixreadonly). --- <!-- 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 #23664, fix #23622 <!-- 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/23665) <!-- Reviewable:end -->
Support DOMMatrix string constructor <!-- Please describe your changes on the following line: --> Implemented DOMMatrix string constructor per [the spec](https://drafts.fxtf.org/geometry/#dom-dommatrixreadonly-dommatrixreadonly). --- <!-- 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 #23664, fix #23622 <!-- 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/23665) <!-- Reviewable:end -->
DOMMatrix on Firefox 69 now uses
double, but when parsing CSS throughnew DOMMatrix("matrix(...)")it depends ontransform.to_transform_3d_matrix()and then loses precision. (And thus failing relevant WPT tests.)https://github.com/mozilla/gecko-dev/blob/da14c413ef663eb1ba246799e94a240f81c42488/dom/base/DOMMatrix.cpp#L778
https://github.com/mozilla/gecko-dev/blob/a7a4c4c9df4b7b96c8d35b9f642c8b00a041092f/layout/style/ServoCSSParser.cpp#L55
https://github.com/mozilla/gecko-dev/blob/ea4843bd849cef3ecf281f8826626eea42550bda/servo/ports/geckolib/glue.rs#L6329
servo/components/style/values/generics/transform.rs
Lines 525 to 561 in b4fb2cd
Could we add a f64 version of the API so that we won't lose precision?
Example:
Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1560705