Auto merge of #14930 - zaynetro:remove-stylesheets, r=emilio

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 commit is contained in:
bors-servo 2017-01-24 09:40:07 -08:00 committed by GitHub
commit f3c102d2fe
11 changed files with 180 additions and 24 deletions

View file

@ -6474,6 +6474,42 @@
"url": "/_mozilla/mozilla/iframe/resize_after_load.html"
}
],
"mozilla/remove_link_styles.html": [
{
"path": "mozilla/remove_link_styles.html",
"references": [
[
"/_mozilla/mozilla/remove_link_styles_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/remove_link_styles.html"
}
],
"mozilla/remove_style_styles.html": [
{
"path": "mozilla/remove_style_styles.html",
"references": [
[
"/_mozilla/mozilla/remove_style_styles_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/remove_style_styles.html"
}
],
"mozilla/reparse_style_elements.html": [
{
"path": "mozilla/reparse_style_elements.html",
"references": [
[
"/_mozilla/mozilla/reparse_style_elements_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/reparse_style_elements.html"
}
],
"mozilla/restyle-out-of-document.html": [
{
"path": "mozilla/restyle-out-of-document.html",
@ -21876,6 +21912,42 @@
"url": "/_mozilla/mozilla/iframe/resize_after_load.html"
}
],
"mozilla/remove_link_styles.html": [
{
"path": "mozilla/remove_link_styles.html",
"references": [
[
"/_mozilla/mozilla/remove_link_styles_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/remove_link_styles.html"
}
],
"mozilla/remove_style_styles.html": [
{
"path": "mozilla/remove_style_styles.html",
"references": [
[
"/_mozilla/mozilla/remove_style_styles_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/remove_style_styles.html"
}
],
"mozilla/reparse_style_elements.html": [
{
"path": "mozilla/reparse_style_elements.html",
"references": [
[
"/_mozilla/mozilla/reparse_style_elements_ref.html",
"=="
]
],
"url": "/_mozilla/mozilla/reparse_style_elements.html"
}
],
"mozilla/restyle-out-of-document.html": [
{
"path": "mozilla/restyle-out-of-document.html",