New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement support for removing stylesheets from their document. #14886
Comments
@zaynetro If you're interested in making some other contributions, this might be interesting! |
@jdm Thanks for mentioning me! I am definitely interested. Tomorrow I will take a look and ask questions. |
I will try listing my findings and steps that I think should be taken. Note, that I have a very poor knowledge of the code base. Although I am hoping to improve it with your help.
|
|
From reading HTMLStyleElement::parse_own_css, it looks like we may already handle modifying the children of a |
I can't believe I am so blind :) Thanks! Could you suggest the correct directory for the test? If I understand correctly then I can create one with:
|
tests/wpt/mozilla/tests/Mozilla is fine for now. You'll want a reference test, which requires a --reference argument to create-wpt too. |
Implement support for removing stylesheets from their document <!-- Please describe your changes on the following line: --> This pull request implements removing styles from the document when * `<link>` element with associated styles is removed * `<style>` element is removed Additionally, it tests that when `<style>` element is changed. Styles are being reapplied correctly. --- <!-- 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 #14886 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes <!-- 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/14930) <!-- Reviewable:end -->
Implement support for removing stylesheets from their document <!-- Please describe your changes on the following line: --> This pull request implements removing styles from the document when * `<link>` element with associated styles is removed * `<style>` element is removed Additionally, it tests that when `<style>` element is changed. Styles are being reapplied correctly. --- <!-- 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 #14886 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes <!-- 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/14930) <!-- Reviewable:end -->
Implement support for removing stylesheets from their document <!-- Please describe your changes on the following line: --> This pull request implements removing styles from the document when * `<link>` element with associated styles is removed * `<style>` element is removed Additionally, it tests that when `<style>` element is changed. Styles are being reapplied correctly. --- <!-- 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 #14886 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes <!-- 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/14930) <!-- Reviewable:end -->
Implement support for removing stylesheets from their document <!-- Please describe your changes on the following line: --> This pull request implements removing styles from the document when * `<link>` element with associated styles is removed * `<style>` element is removed Additionally, it tests that when `<style>` element is changed. Styles are being reapplied correctly. --- <!-- 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 #14886 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes <!-- 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/14930) <!-- Reviewable:end -->
This means we should add this behaviour when:
<style>
and<link>
elements are removed from documents (unbind_from_tree
)<style>
elements are modified (we should remove the associated stylesheet and reparse it)The text was updated successfully, but these errors were encountered: