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 StyleSheet.ownerNode #23082
Comments
|
@sbansal3096 maybe you'd be interested in this one? |
|
Yeah, sure. I am.willing to give it a shot. |
|
@CYBAI Do I have to implement the new ownerNode function in the same fashion that is been used for other properties like title? If so, then where should I use the new function that I created in my last pull request? servo/components/script/dom/stylesheet.rs Line 48 in 0ff87c8 |
|
@sbansal3096 Yes. When you uncomment the property in WebIDL, compiler will give you the hint ;) In this case, you'll need to implement If my explanation is not clear, feel free to let me know :) |
implement stylesheet.ownerNode <!-- Please describe your changes on the following line: --> Implemented GetOwnerNode for StyleSheetMethods by using get_owner method --- <!-- 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 - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #23082 <!-- Either: --> - [ ] 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/23096) <!-- Reviewable:end -->
implement stylesheet.ownerNode <!-- Please describe your changes on the following line: --> Implemented GetOwnerNode for StyleSheetMethods by using get_owner method --- <!-- 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 #23082 <!-- Either: --> - [ ] 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/23096) <!-- Reviewable:end -->
implement stylesheet.ownerNode <!-- Please describe your changes on the following line: --> Implemented GetOwnerNode for StyleSheetMethods by using get_owner method --- <!-- 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 #23082 - [x] There are tests for these changes that will be a new test for nullable owner. <!-- 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/23096) <!-- Reviewable:end -->
implement stylesheet.ownerNode <!-- Please describe your changes on the following line: --> Implemented GetOwnerNode for StyleSheetMethods by using get_owner method --- <!-- 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 #23082 - [x] There are tests for these changes that will be a new test for nullable owner. <!-- 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/23096) <!-- Reviewable:end -->
implement stylesheet.ownerNode <!-- Please describe your changes on the following line: --> Implemented GetOwnerNode for StyleSheetMethods by using get_owner method --- <!-- 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 #23082 - [x] There are tests for these changes that will be a new test for nullable owner. <!-- 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/23096) <!-- Reviewable:end -->
|
The work in #23096 is almost there and only need to address @emilio 's suggestions in #23096 (comment) and #23096 (comment). @sbansal3096 Feel free to reopen and finish that PR if this is not fixed when you have time! |
As @emilio mentioned in #23073 (review) , we don't support
ownerNodeyet.Spec: https://drafts.csswg.org/cssom/#dom-stylesheet-ownernode
servo/components/script/dom/webidls/StyleSheet.webidl
Line 11 in 0ff87c8
We need to uncomment it and implement it in
components/script/dom/stylesheet.rs(basically just need to reuse the method added in #23073 ).(But somehow I'm confused that the spec said it's an🤔 )
Element or ProcessingInstructionbut we only haveElementinCSSStyleSheet. Maybe we can only always return anElementfor now?