diff --git a/Cargo.lock b/Cargo.lock index 36328d939da..1ff9042e300 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1123,7 +1123,7 @@ dependencies = [ "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "webrender_api 0.52.0 (git+https://github.com/servo/webrender)", "xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "xml5ever 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "xml5ever 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1286,12 +1286,12 @@ dependencies = [ [[package]] name = "html5ever" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "markup5ever 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "markup5ever 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1510,7 +1510,7 @@ dependencies = [ "gfx 0.0.1", "gfx_traits 0.0.1", "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "html5ever 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "html5ever 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1558,7 +1558,7 @@ dependencies = [ "gfx 0.0.1", "gfx_traits 0.0.1", "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "html5ever 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "html5ever 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "layout 0.0.1", "layout_traits 0.0.1", @@ -1753,7 +1753,7 @@ dependencies = [ [[package]] name = "markup5ever" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2603,7 +2603,7 @@ dependencies = [ "half 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_derive 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "html5ever 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "html5ever 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", "hyper_serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2654,7 +2654,7 @@ dependencies = [ "uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "webrender_api 0.52.0 (git+https://github.com/servo/webrender)", "webvr_traits 0.0.1", - "xml5ever 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "xml5ever 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2669,7 +2669,7 @@ dependencies = [ "gfx_traits 0.0.1", "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_derive 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "html5ever 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "html5ever 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3150,7 +3150,7 @@ dependencies = [ "hashglobe 0.1.0", "heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_derive 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "html5ever 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "html5ever 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3206,7 +3206,7 @@ dependencies = [ "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)", - "html5ever 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "html5ever 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3769,12 +3769,12 @@ dependencies = [ [[package]] name = "xml5ever" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "markup5ever 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "markup5ever 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3892,7 +3892,7 @@ dependencies = [ "checksum heapsize_derive 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "46f96d52fb1564059fc97b85ef6165728cc30198ab60073bf114c66c4c89bb5d" "checksum heartbeats-simple 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9ad003ce233955e9d95f2c69cde84e68302ba9ba4a673d351c9bff93c738aadc" "checksum heartbeats-simple-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e1a408c0011427cc0e0049f7861c70377819aedfc006e8c901b1c70fd98fb1a4" -"checksum html5ever 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba0806f17ce2ea657c67cd28d03941166638c05153fb644aac6d5156b3033d0" +"checksum html5ever 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5bfb46978eb757a603b7dfe2dafb1c62cb4dee3428d8ac1de734d83d6b022d06" "checksum httparse 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a6e7a63e511f9edffbab707141fbb8707d1a3098615fb2adbd5769cdfcc9b17d" "checksum hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)" = "368cb56b2740ebf4230520e2b90ebb0461e69034d85d1945febd9b3971426db2" "checksum hyper-openssl 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "85a372eb692590b3fe014c196c30f9f52d4c42f58cd49dd94caeee1593c9cc37" @@ -3925,7 +3925,7 @@ dependencies = [ "checksum lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" "checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" "checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -"checksum markup5ever 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8c787ec52b50a2ee0f15db7c18e628528964f71e113ceb864177abe866d169c9" +"checksum markup5ever 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "047150a0e03b57e638fc45af33a0b63a0362305d5b9f92ecef81df472a4cceb0" "checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1" "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" "checksum metadeps 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829fffe7ea1d747e23f64be972991bc516b2f1ac2ae4a3b33d8bea150c410151" @@ -4082,4 +4082,4 @@ dependencies = [ "checksum xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a66b7c2281ebde13cf4391d70d4c7e5946c3c25e72a7b859ca8f677dcd0b0c61" "checksum xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "12ea8eda4b1eb72f02d148402e23832d56a33f55d8c1b2d5bcdde91d79d47cb1" "checksum xml-rs 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7ec6c39eaa68382c8e31e35239402c0a9489d4141a8ceb0c716099a0b515b562" -"checksum xml5ever 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05d24ca1124fc3e7112b10d1979b5054bf599fcd9327da36dace83f1652d110f" +"checksum xml5ever 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96c7cd8dc08b951f7b42d88c1b9e7aaedacddb82f815f83f554b9f354190e1f8" diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index 7282dc797a0..3d7aea1b59f 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -55,7 +55,7 @@ freetype = "0.3" servo-fontconfig = "0.2.1" [target.'cfg(target_os = "android")'.dependencies] -xml5ever = {version = "0.9"} +xml5ever = {version = "0.10"} [target.'cfg(any(target_feature = "sse2", target_feature = "neon"))'.dependencies] simd = "0.2.0" diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index e5991736eab..273a1446a75 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -19,7 +19,7 @@ fnv = "1.0" gfx = {path = "../gfx"} gfx_traits = {path = "../gfx_traits"} heapsize = "0.4" -html5ever = "0.19" +html5ever = "0.20.0" ipc-channel = "0.8" libc = "0.2" log = "0.3.5" diff --git a/components/layout_thread/Cargo.toml b/components/layout_thread/Cargo.toml index cc99e3e22b8..b83c648b0a6 100644 --- a/components/layout_thread/Cargo.toml +++ b/components/layout_thread/Cargo.toml @@ -17,7 +17,7 @@ fnv = "1.0" gfx = {path = "../gfx"} gfx_traits = {path = "../gfx_traits"} heapsize = "0.4" -html5ever = "0.19" +html5ever = "0.20.0" ipc-channel = "0.8" layout = {path = "../layout"} layout_traits = {path = "../layout_traits"} diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index 1f1300b1cce..e4ffedc09b8 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -45,7 +45,7 @@ gleam = "0.4" half = "1.0" heapsize = "0.4" heapsize_derive = "0.1" -html5ever = {version = "0.19", features = ["heap_size"]} +html5ever = {version = "0.20", features = ["heap_size"]} hyper = "0.10" hyper_serde = "0.7" image = "0.14" @@ -90,7 +90,7 @@ unicode-segmentation = "1.1.0" url = {version = "1.2", features = ["heap_size", "query_encoding"]} utf-8 = "0.7" uuid = {version = "0.5", features = ["v4"]} -xml5ever = {version = "0.9"} +xml5ever = {version = "0.10"} webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]} webvr_traits = {path = "../webvr_traits"} diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 3e8dd5f95b3..6c69b09d1f7 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -2050,7 +2050,10 @@ impl ElementMethods for Element { /// https://w3c.github.io/DOM-Parsing/#widl-Element-innerHTML fn GetInnerHTML(&self) -> Fallible { // XXX TODO: XML case - self.serialize(ChildrenOnly) + let qname = QualName::new(self.prefix().clone(), + self.namespace().clone(), + self.local_name().clone()); + self.serialize(ChildrenOnly(Some(qname))) } /// https://w3c.github.io/DOM-Parsing/#widl-Element-innerHTML diff --git a/components/script/dom/servoparser/html.rs b/components/script/dom/servoparser/html.rs index 86c2b551940..f6857fcd198 100644 --- a/components/script/dom/servoparser/html.rs +++ b/components/script/dom/servoparser/html.rs @@ -21,7 +21,7 @@ use html5ever::QualName; use html5ever::buffer_queue::BufferQueue; use html5ever::serialize::{AttrRef, Serialize, Serializer}; use html5ever::serialize::TraversalScope; -use html5ever::serialize::TraversalScope::ChildrenOnly; +use html5ever::serialize::TraversalScope::IncludeNode; use html5ever::tokenizer::{Tokenizer as HtmlTokenizer, TokenizerOpts, TokenizerResult}; use html5ever::tree_builder::{Tracer as HtmlTracer, TreeBuilder, TreeBuilderOpts}; use js::jsapi::JSTracer; @@ -202,7 +202,7 @@ impl<'a> Serialize for &'a Node { let node = *self; - let iter = SerializationIterator::new(node, traversal_scope == ChildrenOnly); + let iter = SerializationIterator::new(node, traversal_scope != IncludeNode); for cmd in iter { match cmd { diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml index ef885c5fc37..322bdc857b5 100644 --- a/components/script_layout_interface/Cargo.toml +++ b/components/script_layout_interface/Cargo.toml @@ -18,7 +18,7 @@ euclid = "0.15" gfx_traits = {path = "../gfx_traits"} heapsize = "0.4" heapsize_derive = "0.1" -html5ever = "0.19" +html5ever = "0.20.0" ipc-channel = "0.8" libc = "0.2" log = "0.3.5" diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index 1d22a23dff7..786373c399f 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -46,7 +46,7 @@ heapsize = {version = "0.4", optional = true} heapsize_derive = {version = "0.1", optional = true} itertools = "0.5" itoa = "0.3" -html5ever = {version = "0.19", optional = true} +html5ever = {version = "0.20", optional = true} lazy_static = "0.2" lru_cache = { path = "../lru_cache" } log = "0.3" diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml index 29a04be4202..8d60edc64d3 100644 --- a/tests/unit/style/Cargo.toml +++ b/tests/unit/style/Cargo.toml @@ -14,7 +14,7 @@ byteorder = "1.0" app_units = "0.5" cssparser = "0.21.1" euclid = "0.15" -html5ever = "0.19" +html5ever = "0.20" parking_lot = "0.4" rayon = "0.8" rustc-serialize = "0.3" diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index ff6334f4d99..f0b9c4c9bfc 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -590465,7 +590465,7 @@ "testharness" ], "html/syntax/serializing-html-fragments/serializing.html": [ - "cd9e3b8412231aa393081a6234efc7476e00c48e", + "37b4cbb9a06e43943847be64ece1881c45d3684f", "testharness" ], "html/syntax/serializing-xml-fragments/outerHTML.html": [ diff --git a/tests/wpt/metadata/domparsing/innerhtml-03.xhtml.ini b/tests/wpt/metadata/domparsing/innerhtml-03.xhtml.ini index 970eccfa590..f2b043ad4bf 100644 --- a/tests/wpt/metadata/domparsing/innerhtml-03.xhtml.ini +++ b/tests/wpt/metadata/domparsing/innerhtml-03.xhtml.ini @@ -6,6 +6,10 @@ [innerHTML in XHTML 1] expected: FAIL + [innerHTML in XHTML 2] + expected: FAIL + bug: https://github.com/servo/servo/issues/18776 + [innerHTML in XHTML 3] expected: FAIL diff --git a/tests/wpt/metadata/html/syntax/serializing-html-fragments/serializing.html.ini b/tests/wpt/metadata/html/syntax/serializing-html-fragments/serializing.html.ini index ce7d1a63f3f..3aa97242608 100644 --- a/tests/wpt/metadata/html/syntax/serializing-html-fragments/serializing.html.ini +++ b/tests/wpt/metadata/html/syntax/serializing-html-fragments/serializing.html.ini @@ -6,33 +6,6 @@ [outerHTML Attribute in non-standard namespace] expected: FAIL - [innerHTML
 non-context starting with U+000A]
-    expected: FAIL
-
-  [innerHTML