diff options
-rw-r--r-- | components/script/dom/cssstyledeclaration.rs | 6 | ||||
-rw-r--r-- | components/script/lib.rs | 1 | ||||
-rw-r--r-- | tests/wpt/metadata/MANIFEST.json | 23 | ||||
-rw-r--r-- | tests/wpt/mozilla/meta/MANIFEST.json | 8 | ||||
-rw-r--r-- | tests/wpt/mozilla/tests/mozilla/style_no_trailing_space.html | 16 |
5 files changed, 49 insertions, 5 deletions
diff --git a/components/script/dom/cssstyledeclaration.rs b/components/script/dom/cssstyledeclaration.rs index 966826047bd..e882330b18b 100644 --- a/components/script/dom/cssstyledeclaration.rs +++ b/components/script/dom/cssstyledeclaration.rs @@ -20,6 +20,7 @@ use util::str::DOMString; use std::ascii::AsciiExt; use std::borrow::ToOwned; use std::cell::Ref; +use std::slice::SliceConcatExt; // http://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface #[dom_struct] @@ -50,9 +51,8 @@ macro_rules! css_properties( ); fn serialize_list(list: &[Ref<PropertyDeclaration>]) -> DOMString { - list.iter().fold(String::new(), |accum, ref declaration| { - accum + &declaration.value() + " " - }) + let strings: Vec<_> = list.iter().map(|d| d.value()).collect(); + strings.join(" ") } impl CSSStyleDeclaration { diff --git a/components/script/lib.rs b/components/script/lib.rs index c24da41687e..325e9cba1e0 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -30,6 +30,7 @@ #![feature(str_utf16)] #![feature(unicode)] #![feature(vec_push_all)] +#![feature(slice_concat_ext)] #![deny(unsafe_code)] #![allow(non_snake_case)] diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 4ba9d85640f..9b05804d9f9 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -29056,6 +29056,27 @@ "local_changes": { "deleted": [], "items": {}, + "deleted": [ + "shadow-dom/shadow-trees/hosting-multiple-shadow-trees-002.html", + "shadow-dom/shadow-trees/hosting-multiple-shadow-trees-006.html", + "shadow-dom/shadow-trees/hosting-multiple-shadow-trees-004.html", + "shadow-dom/shadow-trees/hosting-multiple-shadow-trees-003.html", + "2dcontext/transformations/canvas_transformations_reset_001.htm", + "shadow-dom/shadow-trees/hosting-multiple-shadow-trees-005.html" + ], + + "items": { + "testharness": { + "dom/nodes/CharacterData-surrogates.html": [ + { + "path": "dom/nodes/CharacterData-surrogates.html", + "url": "/dom/nodes/CharacterData-surrogates.html" + } + ] + } + }, + + "items": {}, "reftest_nodes": {} }, "reftest_nodes": { @@ -34463,4 +34484,4 @@ "rev": "cf8340b5fae7b820788ffc31f8cc6b6b04978002", "url_base": "/", "version": 2 -}
\ No newline at end of file +} diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 772bceec7d2..8ecca588469 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -737,6 +737,12 @@ "url": "/_mozilla/mozilla/storage.html" } ], + "mozilla/style_no_trailing_space.html": [ + { + "path": "mozilla/style_no_trailing_space.html", + "url": "/_mozilla/mozilla/style_no_trailing_space.html" + } + ], "mozilla/textcontent.html": [ { "path": "mozilla/textcontent.html", @@ -1064,4 +1070,4 @@ "rev": null, "url_base": "/_mozilla/", "version": 2 -} +}
\ No newline at end of file diff --git a/tests/wpt/mozilla/tests/mozilla/style_no_trailing_space.html b/tests/wpt/mozilla/tests/mozilla/style_no_trailing_space.html new file mode 100644 index 00000000000..7846d6066d5 --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/style_no_trailing_space.html @@ -0,0 +1,16 @@ +<html> +<head> + <title></title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> +<body> + <div id="foo" style="border-width: 1px"></div> + <script> + test(function() { + var border_width = document.getElementById("foo").style["borderWidth"]; + assert_equals(border_width, "1px 1px 1px 1px"); + }); + </script> +</body> +</html> |