mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Auto merge of #9378 - paulrouget:removeProperty, r=KiChjang
Invalidate node style after style property removed Fix #9377 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9378) <!-- Reviewable:end -->
This commit is contained in:
commit
8c0736211b
6 changed files with 43 additions and 6 deletions
|
@ -329,6 +329,10 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
||||||
None => elem.remove_inline_style_property(&property),
|
None => elem.remove_inline_style_property(&property),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let document = document_from_node(elem);
|
||||||
|
let node = elem.upcast();
|
||||||
|
document.content_changed(node, NodeDamage::NodeStyleDamaged);
|
||||||
|
|
||||||
// Step 6
|
// Step 6
|
||||||
Ok(value)
|
Ok(value)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[perspective-containing-block-dynamic-1a.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[transform-containing-block-dynamic-1a.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -3948,6 +3948,18 @@
|
||||||
"url": "/_mozilla/css/quotes_simple_a.html"
|
"url": "/_mozilla/css/quotes_simple_a.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"css/removeproperty.html": [
|
||||||
|
{
|
||||||
|
"path": "css/removeproperty.html",
|
||||||
|
"references": [
|
||||||
|
[
|
||||||
|
"/_mozilla/css/removeproperty_ref.html",
|
||||||
|
"=="
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"url": "/_mozilla/css/removeproperty.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
"css/restyle_hints_attr.html": [
|
"css/restyle_hints_attr.html": [
|
||||||
{
|
{
|
||||||
"path": "css/restyle_hints_attr.html",
|
"path": "css/restyle_hints_attr.html",
|
||||||
|
@ -10016,6 +10028,18 @@
|
||||||
"url": "/_mozilla/css/quotes_simple_a.html"
|
"url": "/_mozilla/css/quotes_simple_a.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"css/removeproperty.html": [
|
||||||
|
{
|
||||||
|
"path": "css/removeproperty.html",
|
||||||
|
"references": [
|
||||||
|
[
|
||||||
|
"/_mozilla/css/removeproperty_ref.html",
|
||||||
|
"=="
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"url": "/_mozilla/css/removeproperty.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
"css/restyle_hints_attr.html": [
|
"css/restyle_hints_attr.html": [
|
||||||
{
|
{
|
||||||
"path": "css/restyle_hints_attr.html",
|
"path": "css/restyle_hints_attr.html",
|
||||||
|
|
13
tests/wpt/mozilla/tests/css/removeproperty.html
Normal file
13
tests/wpt/mozilla/tests/css/removeproperty.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<link rel=match href=removeproperty_ref.html>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div style="width:10px;height:10px;background:red;border:2px solid blue;color:green;">test</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.onload = function() {
|
||||||
|
var div = document.querySelector("div");
|
||||||
|
div.style.removeProperty("background");
|
||||||
|
div.style.color = "";
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
2
tests/wpt/mozilla/tests/css/removeproperty_ref.html
Normal file
2
tests/wpt/mozilla/tests/css/removeproperty_ref.html
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<div style="width:10px;height:10px;border:2px solid blue;">test</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue