From 6d7dc0b905a2fbaa004d33039be2b0fda20200f1 Mon Sep 17 00:00:00 2001 From: Paul Rouget Date: Tue, 19 Jan 2016 06:54:36 +0100 Subject: [PATCH] Invalidate node style after style property removed --- components/script/dom/cssstyledeclaration.rs | 4 ++++ ...ective-containing-block-dynamic-1a.htm.ini | 3 --- ...nsform-containing-block-dynamic-1a.htm.ini | 3 --- tests/wpt/mozilla/meta/MANIFEST.json | 24 +++++++++++++++++++ .../wpt/mozilla/tests/css/removeproperty.html | 13 ++++++++++ .../mozilla/tests/css/removeproperty_ref.html | 2 ++ 6 files changed, 43 insertions(+), 6 deletions(-) delete mode 100644 tests/wpt/metadata-css/css-transforms-1_dev/html/perspective-containing-block-dynamic-1a.htm.ini delete mode 100644 tests/wpt/metadata-css/css-transforms-1_dev/html/transform-containing-block-dynamic-1a.htm.ini create mode 100644 tests/wpt/mozilla/tests/css/removeproperty.html create mode 100644 tests/wpt/mozilla/tests/css/removeproperty_ref.html diff --git a/components/script/dom/cssstyledeclaration.rs b/components/script/dom/cssstyledeclaration.rs index abf4b1310db..479d2e00f95 100644 --- a/components/script/dom/cssstyledeclaration.rs +++ b/components/script/dom/cssstyledeclaration.rs @@ -329,6 +329,10 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration { 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 Ok(value) } diff --git a/tests/wpt/metadata-css/css-transforms-1_dev/html/perspective-containing-block-dynamic-1a.htm.ini b/tests/wpt/metadata-css/css-transforms-1_dev/html/perspective-containing-block-dynamic-1a.htm.ini deleted file mode 100644 index 0e7559d6571..00000000000 --- a/tests/wpt/metadata-css/css-transforms-1_dev/html/perspective-containing-block-dynamic-1a.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[perspective-containing-block-dynamic-1a.htm] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-containing-block-dynamic-1a.htm.ini b/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-containing-block-dynamic-1a.htm.ini deleted file mode 100644 index 7ea19964831..00000000000 --- a/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-containing-block-dynamic-1a.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[transform-containing-block-dynamic-1a.htm] - type: reftest - expected: FAIL diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 44620f9b226..cf7bc1307ea 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -3948,6 +3948,18 @@ "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": [ { "path": "css/restyle_hints_attr.html", @@ -10016,6 +10028,18 @@ "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": [ { "path": "css/restyle_hints_attr.html", diff --git a/tests/wpt/mozilla/tests/css/removeproperty.html b/tests/wpt/mozilla/tests/css/removeproperty.html new file mode 100644 index 00000000000..64705e3984b --- /dev/null +++ b/tests/wpt/mozilla/tests/css/removeproperty.html @@ -0,0 +1,13 @@ + + + +
test
+ + + diff --git a/tests/wpt/mozilla/tests/css/removeproperty_ref.html b/tests/wpt/mozilla/tests/css/removeproperty_ref.html new file mode 100644 index 00000000000..c2f19ccd4ce --- /dev/null +++ b/tests/wpt/mozilla/tests/css/removeproperty_ref.html @@ -0,0 +1,2 @@ +
test
+