diff --git a/components/script/dom/cssstyledeclaration.rs b/components/script/dom/cssstyledeclaration.rs index 974f7bc6d52..73787cd4c72 100644 --- a/components/script/dom/cssstyledeclaration.rs +++ b/components/script/dom/cssstyledeclaration.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use cssparser::CssStringWriter; use dom_struct::dom_struct; use html5ever::local_name; use servo_arc::Arc; @@ -15,7 +14,7 @@ use style::properties::{ use style::selector_parser::PseudoElement; use style::shared_lock::Locked; use style::stylesheets::{CssRuleType, Origin}; -use style_traits::{CssWriter, ParsingMode, ToCss}; +use style_traits::ParsingMode; use crate::dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyleDeclarationMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; @@ -432,11 +431,7 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration { fn IndexedGetter(&self, index: u32) -> Option { self.owner.with_block(|pdb| { let declaration = pdb.declarations().get(index as usize)?; - let mut dest = String::new(); - let mut writer = CssStringWriter::new(&mut dest); - let mut writer = CssWriter::new(&mut writer); - declaration.id().to_css(&mut writer).ok()?; - Some(DOMString::from(dest)) + Some(DOMString::from(declaration.id().name())) }) } diff --git a/tests/wpt/meta-legacy-layout/css/cssom/variable-names.html.ini b/tests/wpt/meta-legacy-layout/css/cssom/variable-names.html.ini deleted file mode 100644 index c26e46f5522..00000000000 --- a/tests/wpt/meta-legacy-layout/css/cssom/variable-names.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[variable-names.html] - [custom property '--a;b'] - expected: FAIL - - [custom property '--\\'] - expected: FAIL diff --git a/tests/wpt/meta/css/cssom/variable-names.html.ini b/tests/wpt/meta/css/cssom/variable-names.html.ini deleted file mode 100644 index c26e46f5522..00000000000 --- a/tests/wpt/meta/css/cssom/variable-names.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[variable-names.html] - [custom property '--a;b'] - expected: FAIL - - [custom property '--\\'] - expected: FAIL