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 upMissing MouseEvent attributes defined by CSSOM View #24248
Comments
|
I'd like to try working on this. @highfive assign me |
|
Hey @tigleym! Thanks for your interest in working on this issue. It's now assigned to you! |
|
@jdm the above pull request addresses specifically the As for tests, I added a simple one in servo/tests/wpt/metadata/css/cssom-view/idlharness.html.ini Lines 32 to 36 in b0b01b8 I believe I found the corresponding test at Uncommenting this line still doesn't seem to run the test at all. Perhaps I'm missing something here? |
|
Great question about the idlharness test! I dug into it, and it turns out the cssom-view.idl is failing the WebIDL validation tests because the partial interface for MouseEvent that it contains (https://github.com/web-platform-tests/wpt/blob/0d9fecceac869018c2b54b6251600f3d184d98c0/interfaces/cssom-view.idl#L141-L152) duplicates some properties from uievents.webidl (https://github.com/web-platform-tests/wpt/blob/0d9fecceac869018c2b54b6251600f3d184d98c0/interfaces/uievents.idl#L28-L31), and this prevents the MouseEvent interface from being tested. |
|
In a delightful twist, there is a known issue in that the CSSOM View spec redefines existing members that is called out at the top of https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface (w3c/csswg-drafts#4084). |
|
Thank you for looking into this! Glad to see the appropriate fix for testing these MouseEvent attributes was merged in: web-platform-tests/wpt#19611 |
|
We should pick those changes up automatically in tomorrow's sync. |
Implements pageX and pageY attributes on MouseEvent interface <!-- Please describe your changes on the following line: --> Implements missing pageX and pageY on MouseEvent interface. --- <!-- 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 #24248 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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/24409) <!-- Reviewable:end -->
|
@jdm for the rest of the missing attributes, would you prefer if I created another issue as a follow-up? Or can I make another PR against this same issue? |
|
Another PR against this one should be fine. |
Implement MouseEvent's x/y and offsetX/offsetY attributes <!-- Please describe your changes on the following line: --> Implement MouseEvent's x/y and offsetX/offsetY attributes --- <!-- 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 - [ ] These changes fix #24248 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
Implement MouseEvent's x/y and offsetX/offsetY attributes <!-- Please describe your changes on the following line: --> Implement MouseEvent's x/y and offsetX/offsetY attributes --- <!-- 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 - [ ] These changes fix #24248 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
Implement MouseEvent's x/y and offsetX/offsetY attributes <!-- Please describe your changes on the following line: --> Implement MouseEvent's x/y and offsetX/offsetY attributes --- <!-- 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 - [ ] These changes fix #24248 (GitHub issue number if applicable) <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface
In particular, the pageX/pageY attributes are used by three.js code in http://rawcdn.githack.com/mrdoob/three.js/r105/examples/js/controls/FirstPersonControls.js . This is likely to be a source of surprising web compat issues!
This will likely have an impact on #20931.