mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Removing style element's styles when elements is removed from dom
This commit is contained in:
parent
b3ce08f1b5
commit
f0c72cb7fd
4 changed files with 59 additions and 1 deletions
|
@ -6474,6 +6474,18 @@
|
|||
"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",
|
||||
|
@ -21876,6 +21888,18 @@
|
|||
"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",
|
||||
|
|
20
tests/wpt/mozilla/tests/mozilla/remove_style_styles.html
Normal file
20
tests/wpt/mozilla/tests/mozilla/remove_style_styles.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Removing style element should remove all associated styles</title>
|
||||
<link rel="match" href="remove_style_styles_ref.html">
|
||||
<body>
|
||||
<style>
|
||||
body {
|
||||
background-color: red;
|
||||
}
|
||||
</style>
|
||||
|
||||
This text should be black and the background should not be red.
|
||||
|
||||
<script>
|
||||
// Force restyling
|
||||
window.getComputedStyle(document.body);
|
||||
var s = document.querySelector('style');
|
||||
s.parentNode.removeChild(s);
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1,5 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<body>
|
||||
This text should be black and the background should not be red.
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue