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 upImplement DOMMatrix. #8509
Implement DOMMatrix. #8509
Comments
|
can i work on this? |
|
Yep! |
|
Still working on this @wenderen? |
|
@wenderen Let us know if you want to pick this up again. In the meantime, I'm unassigning this issue. |
|
I would like to pick this one up please. |
|
Go for it! Let us know if you run into any issues |
|
@frewsxcv I'm sure I will! I'm looking at this PR for DOMQuads, and it looks like a good reference for the |
|
The euclid library has matrix implementations: http://doc.servo.org/servo/euclid/struct.Matrix2D.html and http://doc.servo.org/servo/euclid/struct.Matrix4.html . The DOMQuads PR looks like a valid reference. |
|
@jdm Is it a problem that euclid matrices use |
|
Probably! Maybe create a new one? |
|
Perhaps it would be better to make generic versions of the euclid objects and then make the existing ones aliases for those? |
|
Seems reasonable to me! |
|
I get an error when implementing a method that uses a Float32Array or Float64Array: "Can't handle SpiderMonkey interface arguments yet". This is coming from here. Is it something I can fix easily, or should I just skip these for now? |
|
We currently don't support any sort of |
|
I have a query about the existing test: The test is failing because I don't throw a TypeError here. But this looks to be correct according to the spec. A 6 element sequence as the argument should represent a 2D array, and there is no mention of throwing errors based on the values themselves: |
|
It seems to test that you can't construct a DOMMatrixReadOnly at all, which seems wrong. Feel free to ignore those tests. |
|
Any updates on this issue? :) |
|
Nope, @peterjoel is actively working on it. There are just a bunch of moving pieces in other repositories which have ended up being necessary. |
|
@peterjoel How's this progressing? Anything we can help with? |
|
@jdm I've been busy with my job. But the feature is mostly done. Outstanding is just tests and the CSS-style initialisers. There is a 3-day weekend coming up this weekend, and I should get the PR in. |
DOMMatrix and DOMMatrixReadOnly <!-- 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 #8509. <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12202) <!-- Reviewable:end -->
DOMMatrix and DOMMatrixReadOnly <!-- 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 #8509. <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12202) <!-- Reviewable:end -->
DOMMatrix and DOMMatrixReadOnly <!-- 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 #8509. <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12202) <!-- Reviewable:end -->
DOMMatrix and DOMMatrixReadOnly <!-- 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 #8509. <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12202) <!-- Reviewable:end -->
DOMMatrix and DOMMatrixReadOnly <!-- 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 #8509. <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12202) <!-- Reviewable:end -->
Blocks #6097, #8822.
components/script/dom/dommatrix.rs,components/script/dom/webidls/DOMMatrix.webidl) and amod dommatrix;incomponents/script/dom/mod.rs../tests/wpt/css-tests/geometry-1_dev/html/DOMMatrix-001.htm(metadata:./tests/wpt/metadata-css/geometry-1_dev/html/DOMMatrix-001.htm.ini; seetests/wpt/README.mdfor more information).