mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Remove styles when link node is removed from document
This commit is contained in:
parent
9760ea2953
commit
b3ce08f1b5
5 changed files with 68 additions and 1 deletions
|
@ -6462,6 +6462,18 @@
|
|||
"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/reparse_style_elements.html": [
|
||||
{
|
||||
"path": "mozilla/reparse_style_elements.html",
|
||||
|
@ -21852,6 +21864,18 @@
|
|||
"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/reparse_style_elements.html": [
|
||||
{
|
||||
"path": "mozilla/reparse_style_elements.html",
|
||||
|
|
4
tests/wpt/mozilla/tests/mozilla/remove_link_styles.css
Normal file
4
tests/wpt/mozilla/tests/mozilla/remove_link_styles.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
body {
|
||||
background-color: red;
|
||||
color: white !important;
|
||||
}
|
19
tests/wpt/mozilla/tests/mozilla/remove_link_styles.html
Normal file
19
tests/wpt/mozilla/tests/mozilla/remove_link_styles.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Removing link tag should remove associated styles</title>
|
||||
<link rel="stylesheet" type="text/css" href="remove_link_styles.css">
|
||||
<link rel="match" href="remove_link_styles_ref.html">
|
||||
<body>
|
||||
<style>
|
||||
body {
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
This text should be green and the background should not be red.
|
||||
|
||||
<script>
|
||||
var l = document.querySelector('link[rel="stylesheet"]');
|
||||
l.parentNode.removeChild(l);
|
||||
</script>
|
||||
</body>
|
11
tests/wpt/mozilla/tests/mozilla/remove_link_styles_ref.html
Normal file
11
tests/wpt/mozilla/tests/mozilla/remove_link_styles_ref.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<body>
|
||||
<style>
|
||||
body {
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
|
||||
This text should be green and the background should not be red.
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue