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 support for removing stylesheets from their document #14930
Conversation
highfive
commented
Jan 9, 2017
|
I don't see any handling for style elements? |
|
I was also surprised by it. Either the test is wrong or styles are recalculated in some other way, I hope you can help. |
|
r? @SimonSapin I don't know much about invalidation, I'm afraid. |
|
For Reviewed 3 of 3 files at r1, 5 of 5 files at r2, 3 of 3 files at r3. tests/wpt/mozilla/tests/mozilla/remove_link_styles.css, line 3 at r2 (raw file):
Unless you need multiple different colors, please stick to red for incorrect and green for correct, so that someone debugging the test visually doesn’t need to look at the reference to see what color is expected. tests/wpt/mozilla/tests/mozilla/remove_link_styles.html, line 5 at r2 (raw file):
Since tests/wpt/mozilla/tests/mozilla/remove_link_styles.html, line 9 at r2 (raw file):
The tests/wpt/mozilla/tests/mozilla/remove_style_styles.html, line 8 at r3 (raw file):
Nit: use red for incorrect test results. tests/wpt/mozilla/tests/mozilla/remove_style_styles_ref.html, line 4 at r3 (raw file):
Avoid completely empty/white test or reference files, since we can’t tell them apart from a potential bug where a screenshot is taken before anything is rendered. Please include at least some text, and while you’re at it make it descriptive. tests/wpt/mozilla/tests/mozilla/reparse_style_elements.html, line 14 at r1 (raw file):
Nit: this test works as-is, but since this is using the Comments from Reviewable |
|
@SimonSapin good call with using |
|
I was busy during the previous week. I will continue looking into this closer to the end of the current week. |
|
I think I need some help with figuring out how to remove stylesheet added by Some of my findings (doesn't mean they are relevant to the problem):
I will get back to this later (A)
Returning back to (A). When we receive new stylesheet in layout thread we The problem: I want to remove previously added stylesheet when
|
|
@zaynetro One piece you're missing is the implementation of |
|
As far as removing the stylesheet from unbind_from_tree, the important bit of |
|
Thanks for the explanations! I've just written a huge post that Sorry, it took me a while to find out the root cause. Hopefully, everything should be fine now. |
|
@bors-servo: try |
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 -->
|
|
Very nice. |
|
@bors-servo try |
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 -->
|
|
|
@bors-servo r+ Thanks a lot for these changes @zaynetro! :) |
|
|
|
|
|
|
|
@bors-servo try- retry |
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 -->
|
|
|
@bors-servo retry servo/saltfs#585 |
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 -->
|
|
zaynetro commentedJan 9, 2017
•
edited by larsbergstrom
This pull request implements removing styles from the document when
<link>element with associated styles is removed<style>element is removedAdditionally, it tests that when
<style>element is changed. Styles are being reapplied correctly../mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is