mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #19073 - servo:encoding-rs, r=SimonSapin
Use encoding-rs instead of rust-encoding <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19073) <!-- Reviewable:end -->
This commit is contained in:
commit
994ff4b66e
29 changed files with 165 additions and 516 deletions
112
Cargo.lock
generated
112
Cargo.lock
generated
|
@ -324,7 +324,7 @@ version = "0.1.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -788,62 +788,13 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "encoding"
|
name = "encoding_rs"
|
||||||
version = "0.2.33"
|
version = "0.7.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "encoding-index-japanese"
|
|
||||||
version = "1.20141219.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
dependencies = [
|
|
||||||
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "encoding-index-korean"
|
|
||||||
version = "1.20141219.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
dependencies = [
|
|
||||||
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "encoding-index-simpchinese"
|
|
||||||
version = "1.20141219.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
dependencies = [
|
|
||||||
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "encoding-index-singlebyte"
|
|
||||||
version = "1.20141219.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
dependencies = [
|
|
||||||
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "encoding-index-tradchinese"
|
|
||||||
version = "1.20141219.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
dependencies = [
|
|
||||||
"encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "encoding_index_tests"
|
|
||||||
version = "0.1.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "energy-monitor"
|
name = "energy-monitor"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
|
@ -1284,7 +1235,7 @@ dependencies = [
|
||||||
"traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1317,12 +1268,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "idna"
|
name = "idna"
|
||||||
version = "0.1.2"
|
version = "0.1.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1734,7 +1685,7 @@ dependencies = [
|
||||||
"smallbitvec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"smallbitvec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"string_cache 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"string_cache 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
|
"webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
|
||||||
"xml5ever 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"xml5ever 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
@ -1965,7 +1916,7 @@ dependencies = [
|
||||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tinyfiledialogs 2.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tinyfiledialogs 2.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
|
"webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
|
||||||
]
|
]
|
||||||
|
@ -2001,7 +1952,7 @@ dependencies = [
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2022,7 +1973,7 @@ dependencies = [
|
||||||
"serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"servo_config 0.0.1",
|
"servo_config 0.0.1",
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
|
"webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
|
||||||
]
|
]
|
||||||
|
@ -2571,7 +2522,7 @@ dependencies = [
|
||||||
"devtools_traits 0.0.1",
|
"devtools_traits 0.0.1",
|
||||||
"dom_struct 0.0.1",
|
"dom_struct 0.0.1",
|
||||||
"domobject_derive 0.0.1",
|
"domobject_derive 0.0.1",
|
||||||
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
"encoding_rs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"euclid 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"euclid 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gleam 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gleam 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2626,7 +2577,7 @@ dependencies = [
|
||||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tinyfiledialogs 2.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tinyfiledialogs 2.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
|
"webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
|
||||||
|
@ -2705,7 +2656,7 @@ dependencies = [
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
"style_traits 0.0.1",
|
"style_traits 0.0.1",
|
||||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
|
"webrender_api 0.53.1 (git+https://github.com/servo/webrender)",
|
||||||
"webvr_traits 0.0.1",
|
"webvr_traits 0.0.1",
|
||||||
]
|
]
|
||||||
|
@ -2901,7 +2852,7 @@ dependencies = [
|
||||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -2945,7 +2896,7 @@ dependencies = [
|
||||||
"serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"servo_geometry 0.0.1",
|
"servo_geometry 0.0.1",
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -2999,7 +2950,7 @@ dependencies = [
|
||||||
"malloc_size_of_derive 0.0.1",
|
"malloc_size_of_derive 0.0.1",
|
||||||
"serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"servo_rand 0.0.1",
|
"servo_rand 0.0.1",
|
||||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
@ -3118,7 +3069,7 @@ dependencies = [
|
||||||
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"cssparser 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cssparser 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
"encoding_rs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"euclid 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"euclid 0.15.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"fallible 0.0.1",
|
"fallible 0.0.1",
|
||||||
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -3376,7 +3327,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-normalization"
|
name = "unicode-normalization"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -3412,11 +3363,10 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "url"
|
name = "url"
|
||||||
version = "1.5.1"
|
version = "1.6.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
"idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"idna 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
@ -3427,7 +3377,7 @@ version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -3518,7 +3468,7 @@ dependencies = [
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
"servo_config 0.0.1",
|
"servo_config 0.0.1",
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"uuid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webdriver 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"webdriver 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
@ -3623,7 +3573,7 @@ dependencies = [
|
||||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -3771,13 +3721,7 @@ dependencies = [
|
||||||
"checksum dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07c4c7cc7b396419bc0a4d90371d0cee16cb5053b53647d287c0b728000c41fe"
|
"checksum dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07c4c7cc7b396419bc0a4d90371d0cee16cb5053b53647d287c0b728000c41fe"
|
||||||
"checksum dwrote 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "36e3b27cd0b8a68e00f07e8d8e1e4f4d8a6b8b873290a734f63bd56d792d23e1"
|
"checksum dwrote 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "36e3b27cd0b8a68e00f07e8d8e1e4f4d8a6b8b873290a734f63bd56d792d23e1"
|
||||||
"checksum either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18785c1ba806c258137c937e44ada9ee7e69a37e3c72077542cd2f069d78562a"
|
"checksum either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18785c1ba806c258137c937e44ada9ee7e69a37e3c72077542cd2f069d78562a"
|
||||||
"checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec"
|
"checksum encoding_rs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f5215aabf22b83153be3ee44dfe3f940214541b2ce13d419c55e7a115c8c51a9"
|
||||||
"checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91"
|
|
||||||
"checksum encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81"
|
|
||||||
"checksum encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7"
|
|
||||||
"checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a"
|
|
||||||
"checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18"
|
|
||||||
"checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569"
|
|
||||||
"checksum energy-monitor 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe872d0664f1cc60db36349af245d892ee67d3c8f78055df0ebc43271fd4e05c"
|
"checksum energy-monitor 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe872d0664f1cc60db36349af245d892ee67d3c8f78055df0ebc43271fd4e05c"
|
||||||
"checksum energymon 0.3.0 (git+https://github.com/energymon/energymon-rust.git)" = "<none>"
|
"checksum energymon 0.3.0 (git+https://github.com/energymon/energymon-rust.git)" = "<none>"
|
||||||
"checksum energymon-builder 0.3.0 (git+https://github.com/energymon/energymon-sys.git)" = "<none>"
|
"checksum energymon-builder 0.3.0 (git+https://github.com/energymon/energymon-sys.git)" = "<none>"
|
||||||
|
@ -3819,7 +3763,7 @@ dependencies = [
|
||||||
"checksum hyper-openssl 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "85a372eb692590b3fe014c196c30f9f52d4c42f58cd49dd94caeee1593c9cc37"
|
"checksum hyper-openssl 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "85a372eb692590b3fe014c196c30f9f52d4c42f58cd49dd94caeee1593c9cc37"
|
||||||
"checksum hyper_serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cbe43f514f80494e9329c9fc47d61b85b167d245685424637a0f4a409177e444"
|
"checksum hyper_serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cbe43f514f80494e9329c9fc47d61b85b167d245685424637a0f4a409177e444"
|
||||||
"checksum ident_case 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa"
|
"checksum ident_case 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa"
|
||||||
"checksum idna 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2233d4940b1f19f0418c158509cd7396b8d70a5db5705ce410914dc8fa603b37"
|
"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d"
|
||||||
"checksum image 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e70634e5518ee89975b43c4bbd1667c4012c0313392aa2dfa2db5563c28e34c2"
|
"checksum image 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e70634e5518ee89975b43c4bbd1667c4012c0313392aa2dfa2db5563c28e34c2"
|
||||||
"checksum immeta 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0b9260463a221bfe3f02100c56e2d14c050d5ffe7e44a43d0a1b2b1f2b523502"
|
"checksum immeta 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0b9260463a221bfe3f02100c56e2d14c050d5ffe7e44a43d0a1b2b1f2b523502"
|
||||||
"checksum inflate 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10ec05638adf7c5c788bc0cfa608cd479a13572beda20feb4898fe1d85d2c64b"
|
"checksum inflate 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10ec05638adf7c5c788bc0cfa608cd479a13572beda20feb4898fe1d85d2c64b"
|
||||||
|
@ -3964,13 +3908,13 @@ dependencies = [
|
||||||
"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887"
|
"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887"
|
||||||
"checksum unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764"
|
"checksum unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764"
|
||||||
"checksum unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a6a2c4e3710edd365cd7e78383153ed739fa31af19f9172f72d3575060f5a43a"
|
"checksum unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a6a2c4e3710edd365cd7e78383153ed739fa31af19f9172f72d3575060f5a43a"
|
||||||
"checksum unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e28fa37426fceeb5cf8f41ee273faa7c82c47dc8fba5853402841e665fcd86ff"
|
"checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f"
|
||||||
"checksum unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e5430ae21ef212551680d0021fc7dbd936e8b268c5ea8fdae8814e0b2496d80f"
|
"checksum unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e5430ae21ef212551680d0021fc7dbd936e8b268c5ea8fdae8814e0b2496d80f"
|
||||||
"checksum unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8083c594e02b8ae1654ae26f0ade5158b119bd88ad0e8227a5d8fcd72407946"
|
"checksum unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8083c594e02b8ae1654ae26f0ade5158b119bd88ad0e8227a5d8fcd72407946"
|
||||||
"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
|
"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
|
||||||
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
|
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
|
||||||
"checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91"
|
"checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91"
|
||||||
"checksum url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb819346883532a271eb626deb43c4a1bb4c4dd47c519bd78137c3e72a4fe27"
|
"checksum url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa35e768d4daf1d85733418a49fb42e10d7f633e394fccab4ab7aba897053fe2"
|
||||||
"checksum url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e7d099f1ee52f823d4bdd60c93c3602043c728f5db3b97bdb548467f7bddea"
|
"checksum url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e7d099f1ee52f823d4bdd60c93c3602043c728f5db3b97bdb548467f7bddea"
|
||||||
"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47"
|
"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47"
|
||||||
"checksum utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6f923c601c7ac48ef1d66f7d5b5b2d9a7ba9c51333ab75a3ddf8d0309185a56"
|
"checksum utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6f923c601c7ac48ef1d66f7d5b5b2d9a7ba9c51333ab75a3ddf8d0309185a56"
|
||||||
|
|
|
@ -39,7 +39,7 @@ deny_public_fields = {path = "../deny_public_fields"}
|
||||||
devtools_traits = {path = "../devtools_traits"}
|
devtools_traits = {path = "../devtools_traits"}
|
||||||
dom_struct = {path = "../dom_struct"}
|
dom_struct = {path = "../dom_struct"}
|
||||||
domobject_derive = {path = "../domobject_derive"}
|
domobject_derive = {path = "../domobject_derive"}
|
||||||
encoding = "0.2"
|
encoding_rs = "0.7"
|
||||||
euclid = "0.15"
|
euclid = "0.15"
|
||||||
fnv = "1.0"
|
fnv = "1.0"
|
||||||
gleam = "0.4"
|
gleam = "0.4"
|
||||||
|
@ -90,7 +90,7 @@ style_traits = {path = "../style_traits"}
|
||||||
swapper = "0.1"
|
swapper = "0.1"
|
||||||
time = "0.1.12"
|
time = "0.1.12"
|
||||||
unicode-segmentation = "1.1.0"
|
unicode-segmentation = "1.1.0"
|
||||||
url = {version = "1.2", features = ["query_encoding"]}
|
url = "1.6"
|
||||||
utf-8 = "0.7"
|
utf-8 = "0.7"
|
||||||
uuid = {version = "0.5", features = ["v4"]}
|
uuid = {version = "0.5", features = ["v4"]}
|
||||||
xml5ever = {version = "0.11"}
|
xml5ever = {version = "0.11"}
|
||||||
|
|
|
@ -46,7 +46,7 @@ use dom::bindings::root::{Dom, DomRoot};
|
||||||
use dom::bindings::str::{DOMString, USVString};
|
use dom::bindings::str::{DOMString, USVString};
|
||||||
use dom::bindings::utils::WindowProxyHandler;
|
use dom::bindings::utils::WindowProxyHandler;
|
||||||
use dom::document::PendingRestyle;
|
use dom::document::PendingRestyle;
|
||||||
use encoding::types::EncodingRef;
|
use encoding_rs::Encoding;
|
||||||
use euclid::{Transform2D, Transform3D, Point2D, Vector2D, Rect, TypedSize2D, ScaleFactor};
|
use euclid::{Transform2D, Transform3D, Point2D, Vector2D, Rect, TypedSize2D, ScaleFactor};
|
||||||
use euclid::Length as EuclidLength;
|
use euclid::Length as EuclidLength;
|
||||||
use html5ever::{Prefix, LocalName, Namespace, QualName};
|
use html5ever::{Prefix, LocalName, Namespace, QualName};
|
||||||
|
@ -122,7 +122,7 @@ pub unsafe trait JSTraceable {
|
||||||
|
|
||||||
unsafe_no_jsmanaged_fields!(CSSError);
|
unsafe_no_jsmanaged_fields!(CSSError);
|
||||||
|
|
||||||
unsafe_no_jsmanaged_fields!(EncodingRef);
|
unsafe_no_jsmanaged_fields!(&'static Encoding);
|
||||||
|
|
||||||
unsafe_no_jsmanaged_fields!(Reflector);
|
unsafe_no_jsmanaged_fields!(Reflector);
|
||||||
|
|
||||||
|
|
|
@ -90,8 +90,7 @@ use dom::webglcontextevent::WebGLContextEvent;
|
||||||
use dom::window::{ReflowReason, Window};
|
use dom::window::{ReflowReason, Window};
|
||||||
use dom::windowproxy::WindowProxy;
|
use dom::windowproxy::WindowProxy;
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
use encoding::EncodingRef;
|
use encoding_rs::{Encoding, UTF_8};
|
||||||
use encoding::all::UTF_8;
|
|
||||||
use euclid::Point2D;
|
use euclid::Point2D;
|
||||||
use html5ever::{LocalName, Namespace, QualName};
|
use html5ever::{LocalName, Namespace, QualName};
|
||||||
use hyper::header::{Header, SetCookie};
|
use hyper::header::{Header, SetCookie};
|
||||||
|
@ -240,7 +239,7 @@ pub struct Document {
|
||||||
implementation: MutNullableDom<DOMImplementation>,
|
implementation: MutNullableDom<DOMImplementation>,
|
||||||
content_type: DOMString,
|
content_type: DOMString,
|
||||||
last_modified: Option<String>,
|
last_modified: Option<String>,
|
||||||
encoding: Cell<EncodingRef>,
|
encoding: Cell<&'static Encoding>,
|
||||||
has_browsing_context: bool,
|
has_browsing_context: bool,
|
||||||
is_html_document: bool,
|
is_html_document: bool,
|
||||||
activity: Cell<DocumentActivity>,
|
activity: Cell<DocumentActivity>,
|
||||||
|
@ -576,11 +575,11 @@ impl Document {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn encoding(&self) -> EncodingRef {
|
pub fn encoding(&self) -> &'static Encoding {
|
||||||
self.encoding.get()
|
self.encoding.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_encoding(&self, encoding: EncodingRef) {
|
pub fn set_encoding(&self, encoding: &'static Encoding) {
|
||||||
self.encoding.set(encoding);
|
self.encoding.set(encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2828,34 +2827,7 @@ impl DocumentMethods for Document {
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#dom-document-characterset
|
// https://dom.spec.whatwg.org/#dom-document-characterset
|
||||||
fn CharacterSet(&self) -> DOMString {
|
fn CharacterSet(&self) -> DOMString {
|
||||||
DOMString::from(match self.encoding.get().name() {
|
DOMString::from(self.encoding.get().name())
|
||||||
"utf-8" => "UTF-8",
|
|
||||||
"ibm866" => "IBM866",
|
|
||||||
"iso-8859-2" => "ISO-8859-2",
|
|
||||||
"iso-8859-3" => "ISO-8859-3",
|
|
||||||
"iso-8859-4" => "ISO-8859-4",
|
|
||||||
"iso-8859-5" => "ISO-8859-5",
|
|
||||||
"iso-8859-6" => "ISO-8859-6",
|
|
||||||
"iso-8859-7" => "ISO-8859-7",
|
|
||||||
"iso-8859-8" => "ISO-8859-8",
|
|
||||||
"iso-8859-8-i" => "ISO-8859-8-I",
|
|
||||||
"iso-8859-10" => "ISO-8859-10",
|
|
||||||
"iso-8859-13" => "ISO-8859-13",
|
|
||||||
"iso-8859-14" => "ISO-8859-14",
|
|
||||||
"iso-8859-15" => "ISO-8859-15",
|
|
||||||
"iso-8859-16" => "ISO-8859-16",
|
|
||||||
"koi8-r" => "KOI8-R",
|
|
||||||
"koi8-u" => "KOI8-U",
|
|
||||||
"gbk" => "GBK",
|
|
||||||
"big5" => "Big5",
|
|
||||||
"euc-jp" => "EUC-JP",
|
|
||||||
"iso-2022-jp" => "ISO-2022-JP",
|
|
||||||
"shift_jis" => "Shift_JIS",
|
|
||||||
"euc-kr" => "EUC-KR",
|
|
||||||
"utf-16be" => "UTF-16BE",
|
|
||||||
"utf-16le" => "UTF-16LE",
|
|
||||||
name => name
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#dom-document-charset
|
// https://dom.spec.whatwg.org/#dom-document-charset
|
||||||
|
|
|
@ -21,9 +21,7 @@ use dom::eventtarget::EventTarget;
|
||||||
use dom::globalscope::GlobalScope;
|
use dom::globalscope::GlobalScope;
|
||||||
use dom::progressevent::ProgressEvent;
|
use dom::progressevent::ProgressEvent;
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
use encoding::all::UTF_8;
|
use encoding_rs::{Encoding, UTF_8};
|
||||||
use encoding::label::encoding_from_whatwg_label;
|
|
||||||
use encoding::types::{DecoderTrap, EncodingRef};
|
|
||||||
use hyper::mime::{Attr, Mime};
|
use hyper::mime::{Attr, Mime};
|
||||||
use js::jsapi::Heap;
|
use js::jsapi::Heap;
|
||||||
use js::jsapi::JSAutoCompartment;
|
use js::jsapi::JSAutoCompartment;
|
||||||
|
@ -223,8 +221,8 @@ impl FileReader {
|
||||||
//https://w3c.github.io/FileAPI/#encoding-determination
|
//https://w3c.github.io/FileAPI/#encoding-determination
|
||||||
// Steps 1 & 2 & 3
|
// Steps 1 & 2 & 3
|
||||||
let mut encoding = blob_label.as_ref()
|
let mut encoding = blob_label.as_ref()
|
||||||
.map(|string| &**string)
|
.map(|string| string.as_bytes())
|
||||||
.and_then(encoding_from_whatwg_label);
|
.and_then(Encoding::for_label);
|
||||||
|
|
||||||
// Step 4 & 5
|
// Step 4 & 5
|
||||||
encoding = encoding.or_else(|| {
|
encoding = encoding.or_else(|| {
|
||||||
|
@ -232,16 +230,16 @@ impl FileReader {
|
||||||
resultmime.and_then(|Mime(_, _, ref parameters)| {
|
resultmime.and_then(|Mime(_, _, ref parameters)| {
|
||||||
parameters.iter()
|
parameters.iter()
|
||||||
.find(|&&(ref k, _)| &Attr::Charset == k)
|
.find(|&&(ref k, _)| &Attr::Charset == k)
|
||||||
.and_then(|&(_, ref v)| encoding_from_whatwg_label(&v.to_string()))
|
.and_then(|&(_, ref v)| Encoding::for_label(v.as_str().as_bytes()))
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
// Step 6
|
// Step 6
|
||||||
let enc = encoding.unwrap_or(UTF_8 as EncodingRef);
|
let enc = encoding.unwrap_or(UTF_8);
|
||||||
|
|
||||||
let convert = blob_bytes;
|
let convert = blob_bytes;
|
||||||
// Step 7
|
// Step 7
|
||||||
let output = enc.decode(convert, DecoderTrap::Replace).unwrap();
|
let (output, _, _) = enc.decode(convert);
|
||||||
*result.borrow_mut() = Some(FileReaderResult::String(DOMString::from(output)));
|
*result.borrow_mut() = Some(FileReaderResult::String(DOMString::from(output)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,7 @@ use dom::node::{document_from_node, window_from_node};
|
||||||
use dom::validitystate::ValidationFlags;
|
use dom::validitystate::ValidationFlags;
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
use encoding::EncodingRef;
|
use encoding_rs::{Encoding, UTF_8};
|
||||||
use encoding::all::UTF_8;
|
|
||||||
use encoding::label::encoding_from_whatwg_label;
|
|
||||||
use html5ever::{LocalName, Prefix};
|
use html5ever::{LocalName, Prefix};
|
||||||
use hyper::header::{Charset, ContentDisposition, ContentType, DispositionParam, DispositionType};
|
use hyper::header::{Charset, ContentDisposition, ContentType, DispositionParam, DispositionType};
|
||||||
use hyper::method::Method;
|
use hyper::method::Method;
|
||||||
|
@ -56,6 +54,8 @@ use std::cell::Cell;
|
||||||
use style::attr::AttrValue;
|
use style::attr::AttrValue;
|
||||||
use style::str::split_html_space_chars;
|
use style::str::split_html_space_chars;
|
||||||
use task_source::TaskSource;
|
use task_source::TaskSource;
|
||||||
|
use url::UrlQuery;
|
||||||
|
use url::form_urlencoded::Serializer;
|
||||||
|
|
||||||
#[derive(Clone, Copy, JSTraceable, MallocSizeOf, PartialEq)]
|
#[derive(Clone, Copy, JSTraceable, MallocSizeOf, PartialEq)]
|
||||||
pub struct GenerationId(u32);
|
pub struct GenerationId(u32);
|
||||||
|
@ -250,14 +250,15 @@ pub enum ResetFrom {
|
||||||
|
|
||||||
impl HTMLFormElement {
|
impl HTMLFormElement {
|
||||||
// https://html.spec.whatwg.org/multipage/#picking-an-encoding-for-the-form
|
// https://html.spec.whatwg.org/multipage/#picking-an-encoding-for-the-form
|
||||||
fn pick_encoding(&self) -> EncodingRef {
|
fn pick_encoding(&self) -> &'static Encoding {
|
||||||
// Step 2
|
// Step 2
|
||||||
if self.upcast::<Element>().has_attribute(&local_name!("accept-charset")) {
|
if self.upcast::<Element>().has_attribute(&local_name!("accept-charset")) {
|
||||||
// Substep 1
|
// Substep 1
|
||||||
let input = self.upcast::<Element>().get_string_attribute(&local_name!("accept-charset"));
|
let input = self.upcast::<Element>().get_string_attribute(&local_name!("accept-charset"));
|
||||||
|
|
||||||
// Substep 2, 3, 4
|
// Substep 2, 3, 4
|
||||||
let mut candidate_encodings = split_html_space_chars(&*input).filter_map(encoding_from_whatwg_label);
|
let mut candidate_encodings = split_html_space_chars(&*input)
|
||||||
|
.filter_map(|c| Encoding::for_label(c.as_bytes()));
|
||||||
|
|
||||||
// Substep 5, 6
|
// Substep 5, 6
|
||||||
return candidate_encodings.next().unwrap_or(UTF_8);
|
return candidate_encodings.next().unwrap_or(UTF_8);
|
||||||
|
@ -276,7 +277,7 @@ impl HTMLFormElement {
|
||||||
let encoding = self.pick_encoding();
|
let encoding = self.pick_encoding();
|
||||||
|
|
||||||
// Step 3
|
// Step 3
|
||||||
let charset = &*encoding.whatwg_name().unwrap();
|
let charset = encoding.name();
|
||||||
|
|
||||||
for entry in form_data.iter_mut() {
|
for entry in form_data.iter_mut() {
|
||||||
// Step 4, 5
|
// Step 4, 5
|
||||||
|
@ -375,13 +376,11 @@ impl HTMLFormElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#submit-mutate-action
|
// https://html.spec.whatwg.org/multipage/#submit-mutate-action
|
||||||
fn mutate_action_url(&self, form_data: &mut Vec<FormDatum>, mut load_data: LoadData, encoding: EncodingRef) {
|
fn mutate_action_url(&self, form_data: &mut Vec<FormDatum>, mut load_data: LoadData, encoding: &'static Encoding) {
|
||||||
let charset = &*encoding.whatwg_name().unwrap();
|
let charset = encoding.name();
|
||||||
|
|
||||||
load_data.url
|
self.set_encoding_override(load_data.url.as_mut_url().query_pairs_mut())
|
||||||
.as_mut_url()
|
.clear()
|
||||||
.query_pairs_mut().clear()
|
|
||||||
.encoding_override(Some(self.pick_encoding()))
|
|
||||||
.extend_pairs(form_data.into_iter()
|
.extend_pairs(form_data.into_iter()
|
||||||
.map(|field| (field.name.clone(), field.replace_value(charset))));
|
.map(|field| (field.name.clone(), field.replace_value(charset))));
|
||||||
|
|
||||||
|
@ -390,17 +389,15 @@ impl HTMLFormElement {
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#submit-body
|
// https://html.spec.whatwg.org/multipage/#submit-body
|
||||||
fn submit_entity_body(&self, form_data: &mut Vec<FormDatum>, mut load_data: LoadData,
|
fn submit_entity_body(&self, form_data: &mut Vec<FormDatum>, mut load_data: LoadData,
|
||||||
enctype: FormEncType, encoding: EncodingRef) {
|
enctype: FormEncType, encoding: &'static Encoding) {
|
||||||
let boundary = generate_boundary();
|
let boundary = generate_boundary();
|
||||||
let bytes = match enctype {
|
let bytes = match enctype {
|
||||||
FormEncType::UrlEncoded => {
|
FormEncType::UrlEncoded => {
|
||||||
let charset = &*encoding.whatwg_name().unwrap();
|
let charset = encoding.name();
|
||||||
load_data.headers.set(ContentType::form_url_encoded());
|
load_data.headers.set(ContentType::form_url_encoded());
|
||||||
|
|
||||||
load_data.url
|
self.set_encoding_override(load_data.url.as_mut_url().query_pairs_mut())
|
||||||
.as_mut_url()
|
.clear()
|
||||||
.query_pairs_mut().clear()
|
|
||||||
.encoding_override(Some(self.pick_encoding()))
|
|
||||||
.extend_pairs(form_data.into_iter()
|
.extend_pairs(form_data.into_iter()
|
||||||
.map(|field| (field.name.clone(), field.replace_value(charset))));
|
.map(|field| (field.name.clone(), field.replace_value(charset))));
|
||||||
|
|
||||||
|
@ -421,6 +418,13 @@ impl HTMLFormElement {
|
||||||
self.plan_to_navigate(load_data);
|
self.plan_to_navigate(load_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn set_encoding_override<'a>(&self, mut serializer: Serializer<UrlQuery<'a>>)
|
||||||
|
-> Serializer<UrlQuery<'a>> {
|
||||||
|
let encoding = self.pick_encoding();
|
||||||
|
serializer.custom_encoding_override(move |s| encoding.encode(s).0);
|
||||||
|
serializer
|
||||||
|
}
|
||||||
|
|
||||||
/// [Planned navigation](https://html.spec.whatwg.org/multipage/#planned-navigation)
|
/// [Planned navigation](https://html.spec.whatwg.org/multipage/#planned-navigation)
|
||||||
fn plan_to_navigate(&self, load_data: LoadData) {
|
fn plan_to_navigate(&self, load_data: LoadData) {
|
||||||
let window = window_from_node(self);
|
let window = window_from_node(self);
|
||||||
|
@ -1109,12 +1113,12 @@ impl FormControlElementHelpers for Element {
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#multipart/form-data-encoding-algorithm
|
// https://html.spec.whatwg.org/multipage/#multipart/form-data-encoding-algorithm
|
||||||
pub fn encode_multipart_form_data(form_data: &mut Vec<FormDatum>,
|
pub fn encode_multipart_form_data(form_data: &mut Vec<FormDatum>,
|
||||||
boundary: String, encoding: EncodingRef) -> Vec<u8> {
|
boundary: String, encoding: &'static Encoding) -> Vec<u8> {
|
||||||
// Step 1
|
// Step 1
|
||||||
let mut result = vec![];
|
let mut result = vec![];
|
||||||
|
|
||||||
// Step 2
|
// Step 2
|
||||||
let charset = &*encoding.whatwg_name().unwrap_or("UTF-8");
|
let charset = encoding.name();
|
||||||
|
|
||||||
// Step 3
|
// Step 3
|
||||||
for entry in form_data.iter_mut() {
|
for entry in form_data.iter_mut() {
|
||||||
|
|
|
@ -23,8 +23,7 @@ use dom::node::{ChildrenMutation, CloneChildrenFlag, Node};
|
||||||
use dom::node::{document_from_node, window_from_node};
|
use dom::node::{document_from_node, window_from_node};
|
||||||
use dom::virtualmethods::VirtualMethods;
|
use dom::virtualmethods::VirtualMethods;
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
use encoding::label::encoding_from_whatwg_label;
|
use encoding_rs::Encoding;
|
||||||
use encoding::types::{DecoderTrap, EncodingRef};
|
|
||||||
use html5ever::{LocalName, Prefix};
|
use html5ever::{LocalName, Prefix};
|
||||||
use ipc_channel::ipc;
|
use ipc_channel::ipc;
|
||||||
use ipc_channel::router::ROUTER;
|
use ipc_channel::router::ROUTER;
|
||||||
|
@ -147,7 +146,7 @@ struct ScriptContext {
|
||||||
kind: ExternalScriptKind,
|
kind: ExternalScriptKind,
|
||||||
/// The (fallback) character encoding argument to the "fetch a classic
|
/// The (fallback) character encoding argument to the "fetch a classic
|
||||||
/// script" algorithm.
|
/// script" algorithm.
|
||||||
character_encoding: EncodingRef,
|
character_encoding: &'static Encoding,
|
||||||
/// The response body received to date.
|
/// The response body received to date.
|
||||||
data: Vec<u8>,
|
data: Vec<u8>,
|
||||||
/// The response metadata received to date.
|
/// The response metadata received to date.
|
||||||
|
@ -199,11 +198,11 @@ impl FetchResponseListener for ScriptContext {
|
||||||
|
|
||||||
// Step 6.
|
// Step 6.
|
||||||
let encoding = metadata.charset
|
let encoding = metadata.charset
|
||||||
.and_then(|encoding| encoding_from_whatwg_label(&encoding))
|
.and_then(|encoding| Encoding::for_label(encoding.as_bytes()))
|
||||||
.unwrap_or(self.character_encoding);
|
.unwrap_or(self.character_encoding);
|
||||||
|
|
||||||
// Step 7.
|
// Step 7.
|
||||||
let source_text = encoding.decode(&self.data, DecoderTrap::Replace).unwrap();
|
let (source_text, _, _) = encoding.decode(&self.data);
|
||||||
ClassicScript::external(DOMString::from(source_text), metadata.final_url)
|
ClassicScript::external(DOMString::from(source_text), metadata.final_url)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -232,7 +231,7 @@ fn fetch_a_classic_script(script: &HTMLScriptElement,
|
||||||
url: ServoUrl,
|
url: ServoUrl,
|
||||||
cors_setting: Option<CorsSettings>,
|
cors_setting: Option<CorsSettings>,
|
||||||
integrity_metadata: String,
|
integrity_metadata: String,
|
||||||
character_encoding: EncodingRef) {
|
character_encoding: &'static Encoding) {
|
||||||
let doc = document_from_node(script);
|
let doc = document_from_node(script);
|
||||||
|
|
||||||
// Step 1, 2.
|
// Step 1, 2.
|
||||||
|
@ -366,7 +365,7 @@ impl HTMLScriptElement {
|
||||||
|
|
||||||
// Step 14.
|
// Step 14.
|
||||||
let encoding = element.get_attribute(&ns!(), &local_name!("charset"))
|
let encoding = element.get_attribute(&ns!(), &local_name!("charset"))
|
||||||
.and_then(|charset| encoding_from_whatwg_label(&charset.value()))
|
.and_then(|charset| Encoding::for_label(charset.value().as_bytes()))
|
||||||
.unwrap_or_else(|| doc.encoding());
|
.unwrap_or_else(|| doc.encoding());
|
||||||
|
|
||||||
// Step 15.
|
// Step 15.
|
||||||
|
|
|
@ -10,21 +10,20 @@ use dom::bindings::root::DomRoot;
|
||||||
use dom::bindings::str::{DOMString, USVString};
|
use dom::bindings::str::{DOMString, USVString};
|
||||||
use dom::globalscope::GlobalScope;
|
use dom::globalscope::GlobalScope;
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
use encoding::label::encoding_from_whatwg_label;
|
use encoding_rs::Encoding;
|
||||||
use encoding::types::{DecoderTrap, EncodingRef};
|
|
||||||
use js::jsapi::{JSContext, JSObject};
|
use js::jsapi::{JSContext, JSObject};
|
||||||
|
use std::ascii::AsciiExt;
|
||||||
use std::borrow::ToOwned;
|
use std::borrow::ToOwned;
|
||||||
|
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct TextDecoder {
|
pub struct TextDecoder {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
#[ignore_malloc_size_of = "Defined in rust-encoding"]
|
encoding: &'static Encoding,
|
||||||
encoding: EncodingRef,
|
|
||||||
fatal: bool,
|
fatal: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TextDecoder {
|
impl TextDecoder {
|
||||||
fn new_inherited(encoding: EncodingRef, fatal: bool) -> TextDecoder {
|
fn new_inherited(encoding: &'static Encoding, fatal: bool) -> TextDecoder {
|
||||||
TextDecoder {
|
TextDecoder {
|
||||||
reflector_: Reflector::new(),
|
reflector_: Reflector::new(),
|
||||||
encoding: encoding,
|
encoding: encoding,
|
||||||
|
@ -36,7 +35,7 @@ impl TextDecoder {
|
||||||
Err(Error::Range("The given encoding is not supported.".to_owned()))
|
Err(Error::Range("The given encoding is not supported.".to_owned()))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new(global: &GlobalScope, encoding: EncodingRef, fatal: bool) -> DomRoot<TextDecoder> {
|
pub fn new(global: &GlobalScope, encoding: &'static Encoding, fatal: bool) -> DomRoot<TextDecoder> {
|
||||||
reflect_dom_object(Box::new(TextDecoder::new_inherited(encoding, fatal)),
|
reflect_dom_object(Box::new(TextDecoder::new_inherited(encoding, fatal)),
|
||||||
global,
|
global,
|
||||||
TextDecoderBinding::Wrap)
|
TextDecoderBinding::Wrap)
|
||||||
|
@ -47,19 +46,10 @@ impl TextDecoder {
|
||||||
label: DOMString,
|
label: DOMString,
|
||||||
options: &TextDecoderBinding::TextDecoderOptions)
|
options: &TextDecoderBinding::TextDecoderOptions)
|
||||||
-> Fallible<DomRoot<TextDecoder>> {
|
-> Fallible<DomRoot<TextDecoder>> {
|
||||||
let encoding = match encoding_from_whatwg_label(&label) {
|
let encoding = match Encoding::for_label_no_replacement(label.as_bytes()) {
|
||||||
None => return TextDecoder::make_range_error(),
|
None => return TextDecoder::make_range_error(),
|
||||||
Some(enc) => enc
|
Some(enc) => enc
|
||||||
};
|
};
|
||||||
// The rust-encoding crate has WHATWG compatibility, so we are
|
|
||||||
// guaranteed to have a whatwg_name because we successfully got
|
|
||||||
// the encoding from encoding_from_whatwg_label.
|
|
||||||
// Use match + panic! instead of unwrap for better error message
|
|
||||||
match encoding.whatwg_name() {
|
|
||||||
None => panic!("Label {} fits valid encoding without valid name", label),
|
|
||||||
Some("replacement") => return TextDecoder::make_range_error(),
|
|
||||||
_ => ()
|
|
||||||
};
|
|
||||||
Ok(TextDecoder::new(global, encoding, options.fatal))
|
Ok(TextDecoder::new(global, encoding, options.fatal))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,7 +58,7 @@ impl TextDecoder {
|
||||||
impl TextDecoderMethods for TextDecoder {
|
impl TextDecoderMethods for TextDecoder {
|
||||||
// https://encoding.spec.whatwg.org/#dom-textdecoder-encoding
|
// https://encoding.spec.whatwg.org/#dom-textdecoder-encoding
|
||||||
fn Encoding(&self) -> DOMString {
|
fn Encoding(&self) -> DOMString {
|
||||||
DOMString::from(self.encoding.whatwg_name().unwrap())
|
DOMString::from(self.encoding.name().to_ascii_lowercase())
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://encoding.spec.whatwg.org/#dom-textdecoder-fatal
|
// https://encoding.spec.whatwg.org/#dom-textdecoder-fatal
|
||||||
|
@ -93,15 +83,15 @@ impl TextDecoderMethods for TextDecoder {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let trap = if self.fatal {
|
let s = if self.fatal {
|
||||||
DecoderTrap::Strict
|
match self.encoding.decode_without_bom_handling_and_without_replacement(data.as_slice()) {
|
||||||
|
Some(s) => s,
|
||||||
|
None => return Err(Error::Type("Decoding failed".to_owned())),
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
DecoderTrap::Replace
|
let (s, _has_errors) = self.encoding.decode_without_bom_handling(data.as_slice());
|
||||||
|
s
|
||||||
};
|
};
|
||||||
|
Ok(USVString(s.into_owned()))
|
||||||
match self.encoding.decode(data.as_slice(), trap) {
|
|
||||||
Ok(s) => Ok(USVString(s)),
|
|
||||||
Err(_) => Err(Error::Type("Decoding failed".to_owned())),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ use dom::bindings::weakref::MutableWeakRef;
|
||||||
use dom::globalscope::GlobalScope;
|
use dom::globalscope::GlobalScope;
|
||||||
use dom::url::URL;
|
use dom::url::URL;
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
use encoding::types::EncodingRef;
|
|
||||||
use url::form_urlencoded;
|
use url::form_urlencoded;
|
||||||
|
|
||||||
// https://url.spec.whatwg.org/#interface-urlsearchparams
|
// https://url.spec.whatwg.org/#interface-urlsearchparams
|
||||||
|
@ -140,17 +139,16 @@ impl URLSearchParamsMethods for URLSearchParams {
|
||||||
|
|
||||||
// https://url.spec.whatwg.org/#stringification-behavior
|
// https://url.spec.whatwg.org/#stringification-behavior
|
||||||
fn Stringifier(&self) -> DOMString {
|
fn Stringifier(&self) -> DOMString {
|
||||||
DOMString::from(self.serialize(None))
|
DOMString::from(self.serialize_utf8())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
impl URLSearchParams {
|
impl URLSearchParams {
|
||||||
// https://url.spec.whatwg.org/#concept-urlencoded-serializer
|
// https://url.spec.whatwg.org/#concept-urlencoded-serializer
|
||||||
pub fn serialize(&self, encoding: Option<EncodingRef>) -> String {
|
pub fn serialize_utf8(&self) -> String {
|
||||||
let list = self.list.borrow();
|
let list = self.list.borrow();
|
||||||
form_urlencoded::Serializer::new(String::new())
|
form_urlencoded::Serializer::new(String::new())
|
||||||
.encoding_override(encoding)
|
|
||||||
.extend_pairs(&*list)
|
.extend_pairs(&*list)
|
||||||
.finish()
|
.finish()
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,9 +36,7 @@ use dom::workerglobalscope::WorkerGlobalScope;
|
||||||
use dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget;
|
use dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget;
|
||||||
use dom::xmlhttprequestupload::XMLHttpRequestUpload;
|
use dom::xmlhttprequestupload::XMLHttpRequestUpload;
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
use encoding::all::UTF_8;
|
use encoding_rs::{Encoding, UTF_8};
|
||||||
use encoding::label::encoding_from_whatwg_label;
|
|
||||||
use encoding::types::{DecoderTrap, EncoderTrap, Encoding, EncodingRef};
|
|
||||||
use euclid::Length;
|
use euclid::Length;
|
||||||
use html5ever::serialize;
|
use html5ever::serialize;
|
||||||
use html5ever::serialize::SerializeOpts;
|
use html5ever::serialize::SerializeOpts;
|
||||||
|
@ -66,6 +64,7 @@ use std::ascii::AsciiExt;
|
||||||
use std::borrow::ToOwned;
|
use std::borrow::ToOwned;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::default::Default;
|
use std::default::Default;
|
||||||
|
use std::slice;
|
||||||
use std::str;
|
use std::str;
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use task_source::networking::NetworkingTaskSource;
|
use task_source::networking::NetworkingTaskSource;
|
||||||
|
@ -137,8 +136,7 @@ pub struct XMLHttpRequest {
|
||||||
response_headers: DomRefCell<Headers>,
|
response_headers: DomRefCell<Headers>,
|
||||||
#[ignore_malloc_size_of = "Defined in hyper"]
|
#[ignore_malloc_size_of = "Defined in hyper"]
|
||||||
override_mime_type: DomRefCell<Option<Mime>>,
|
override_mime_type: DomRefCell<Option<Mime>>,
|
||||||
#[ignore_malloc_size_of = "Defined in rust-encoding"]
|
override_charset: DomRefCell<Option<&'static Encoding>>,
|
||||||
override_charset: DomRefCell<Option<EncodingRef>>,
|
|
||||||
|
|
||||||
// Associated concepts
|
// Associated concepts
|
||||||
#[ignore_malloc_size_of = "Defined in hyper"]
|
#[ignore_malloc_size_of = "Defined in hyper"]
|
||||||
|
@ -726,7 +724,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
|
||||||
// Step 4
|
// Step 4
|
||||||
let value = override_mime.get_param(mime::Attr::Charset);
|
let value = override_mime.get_param(mime::Attr::Charset);
|
||||||
*self.override_charset.borrow_mut() = value.and_then(|value| {
|
*self.override_charset.borrow_mut() = value.and_then(|value| {
|
||||||
encoding_from_whatwg_label(value)
|
Encoding::for_label(value.as_bytes())
|
||||||
});
|
});
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -1085,7 +1083,9 @@ impl XMLHttpRequest {
|
||||||
// According to Simon, decode() should never return an error, so unwrap()ing
|
// According to Simon, decode() should never return an error, so unwrap()ing
|
||||||
// the result should be fine. XXXManishearth have a closer look at this later
|
// the result should be fine. XXXManishearth have a closer look at this later
|
||||||
// Step 1, 2, 6
|
// Step 1, 2, 6
|
||||||
charset.decode(&self.response.borrow(), DecoderTrap::Replace).unwrap()
|
let response = self.response.borrow();
|
||||||
|
let (text, _, _) = charset.decode(&response);
|
||||||
|
text.into_owned()
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://xhr.spec.whatwg.org/#blob-response
|
// https://xhr.spec.whatwg.org/#blob-response
|
||||||
|
@ -1164,8 +1164,22 @@ impl XMLHttpRequest {
|
||||||
return NullValue();
|
return NullValue();
|
||||||
}
|
}
|
||||||
// Step 4
|
// Step 4
|
||||||
let json_text = UTF_8.decode(&bytes, DecoderTrap::Replace).unwrap();
|
fn decode_to_utf16(bytes: &[u8], encoding: &'static Encoding) -> Vec<u16> {
|
||||||
let json_text: Vec<u16> = json_text.encode_utf16().collect();
|
let mut decoder = encoding.new_decoder();
|
||||||
|
let capacity = decoder.max_utf16_buffer_length(bytes.len()).expect("Overflow");
|
||||||
|
let mut utf16 = Vec::with_capacity(capacity);
|
||||||
|
let extra = unsafe {
|
||||||
|
slice::from_raw_parts_mut(utf16.as_mut_ptr(), capacity)
|
||||||
|
};
|
||||||
|
let last = true;
|
||||||
|
let (_, read, written, _) = decoder.decode_to_utf16(bytes, extra, last);
|
||||||
|
assert!(read == bytes.len());
|
||||||
|
unsafe {
|
||||||
|
utf16.set_len(written)
|
||||||
|
}
|
||||||
|
utf16
|
||||||
|
}
|
||||||
|
let json_text = decode_to_utf16(&bytes, UTF_8);
|
||||||
// Step 5
|
// Step 5
|
||||||
rooted!(in(cx) let mut rval = UndefinedValue());
|
rooted!(in(cx) let mut rval = UndefinedValue());
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -1185,7 +1199,8 @@ impl XMLHttpRequest {
|
||||||
fn document_text_html(&self) -> DomRoot<Document> {
|
fn document_text_html(&self) -> DomRoot<Document> {
|
||||||
let charset = self.final_charset().unwrap_or(UTF_8);
|
let charset = self.final_charset().unwrap_or(UTF_8);
|
||||||
let wr = self.global();
|
let wr = self.global();
|
||||||
let decoded = charset.decode(&self.response.borrow(), DecoderTrap::Replace).unwrap();
|
let response = self.response.borrow();
|
||||||
|
let (decoded, _, _) = charset.decode(&response);
|
||||||
let document = self.new_doc(IsHTMLDocument::HTMLDocument);
|
let document = self.new_doc(IsHTMLDocument::HTMLDocument);
|
||||||
// TODO: Disable scripting while parsing
|
// TODO: Disable scripting while parsing
|
||||||
ServoParser::parse_html_document(
|
ServoParser::parse_html_document(
|
||||||
|
@ -1198,7 +1213,8 @@ impl XMLHttpRequest {
|
||||||
fn handle_xml(&self) -> DomRoot<Document> {
|
fn handle_xml(&self) -> DomRoot<Document> {
|
||||||
let charset = self.final_charset().unwrap_or(UTF_8);
|
let charset = self.final_charset().unwrap_or(UTF_8);
|
||||||
let wr = self.global();
|
let wr = self.global();
|
||||||
let decoded = charset.decode(&self.response.borrow(), DecoderTrap::Replace).unwrap();
|
let response = self.response.borrow();
|
||||||
|
let (decoded, _, _) = charset.decode(&response);
|
||||||
let document = self.new_doc(IsHTMLDocument::NonHTMLDocument);
|
let document = self.new_doc(IsHTMLDocument::NonHTMLDocument);
|
||||||
// TODO: Disable scripting while parsing
|
// TODO: Disable scripting while parsing
|
||||||
ServoParser::parse_xml_document(
|
ServoParser::parse_xml_document(
|
||||||
|
@ -1307,7 +1323,7 @@ impl XMLHttpRequest {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn final_charset(&self) -> Option<EncodingRef> {
|
fn final_charset(&self) -> Option<&'static Encoding> {
|
||||||
if self.override_charset.borrow().is_some() {
|
if self.override_charset.borrow().is_some() {
|
||||||
self.override_charset.borrow().clone()
|
self.override_charset.borrow().clone()
|
||||||
} else {
|
} else {
|
||||||
|
@ -1315,7 +1331,7 @@ impl XMLHttpRequest {
|
||||||
Some(&ContentType(ref mime)) => {
|
Some(&ContentType(ref mime)) => {
|
||||||
let value = mime.get_param(mime::Attr::Charset);
|
let value = mime.get_param(mime::Attr::Charset);
|
||||||
value.and_then(|value|{
|
value.and_then(|value|{
|
||||||
encoding_from_whatwg_label(value)
|
Encoding::for_label(value.as_bytes())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
None => { None }
|
None => { None }
|
||||||
|
@ -1370,7 +1386,7 @@ impl Extractable for Blob {
|
||||||
|
|
||||||
impl Extractable for DOMString {
|
impl Extractable for DOMString {
|
||||||
fn extract(&self) -> (Vec<u8>, Option<DOMString>) {
|
fn extract(&self) -> (Vec<u8>, Option<DOMString>) {
|
||||||
(UTF_8.encode(self, EncoderTrap::Replace).unwrap(),
|
(self.as_bytes().to_owned(),
|
||||||
Some(DOMString::from("text/plain;charset=UTF-8")))
|
Some(DOMString::from("text/plain;charset=UTF-8")))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1378,16 +1394,14 @@ impl Extractable for DOMString {
|
||||||
impl Extractable for FormData {
|
impl Extractable for FormData {
|
||||||
fn extract(&self) -> (Vec<u8>, Option<DOMString>) {
|
fn extract(&self) -> (Vec<u8>, Option<DOMString>) {
|
||||||
let boundary = generate_boundary();
|
let boundary = generate_boundary();
|
||||||
let bytes = encode_multipart_form_data(&mut self.datums(), boundary.clone(),
|
let bytes = encode_multipart_form_data(&mut self.datums(), boundary.clone(), UTF_8);
|
||||||
UTF_8 as EncodingRef);
|
|
||||||
(bytes, Some(DOMString::from(format!("multipart/form-data;boundary={}", boundary))))
|
(bytes, Some(DOMString::from(format!("multipart/form-data;boundary={}", boundary))))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Extractable for URLSearchParams {
|
impl Extractable for URLSearchParams {
|
||||||
fn extract(&self) -> (Vec<u8>, Option<DOMString>) {
|
fn extract(&self) -> (Vec<u8>, Option<DOMString>) {
|
||||||
// Default encoding is UTF-8.
|
(self.serialize_utf8().into_bytes(),
|
||||||
(self.serialize(None).into_bytes(),
|
|
||||||
Some(DOMString::from("application/x-www-form-urlencoded;charset=UTF-8")))
|
Some(DOMString::from("application/x-www-form-urlencoded;charset=UTF-8")))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ extern crate devtools_traits;
|
||||||
extern crate dom_struct;
|
extern crate dom_struct;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate domobject_derive;
|
extern crate domobject_derive;
|
||||||
extern crate encoding;
|
extern crate encoding_rs;
|
||||||
extern crate euclid;
|
extern crate euclid;
|
||||||
extern crate fnv;
|
extern crate fnv;
|
||||||
extern crate gleam;
|
extern crate gleam;
|
||||||
|
|
|
@ -13,8 +13,7 @@ use dom::eventtarget::EventTarget;
|
||||||
use dom::htmlelement::HTMLElement;
|
use dom::htmlelement::HTMLElement;
|
||||||
use dom::htmllinkelement::{RequestGenerationId, HTMLLinkElement};
|
use dom::htmllinkelement::{RequestGenerationId, HTMLLinkElement};
|
||||||
use dom::node::{document_from_node, window_from_node};
|
use dom::node::{document_from_node, window_from_node};
|
||||||
use encoding::EncodingRef;
|
use encoding_rs::UTF_8;
|
||||||
use encoding::all::UTF_8;
|
|
||||||
use hyper::header::ContentType;
|
use hyper::header::ContentType;
|
||||||
use hyper::mime::{Mime, TopLevel, SubLevel};
|
use hyper::mime::{Mime, TopLevel, SubLevel};
|
||||||
use hyper_serde::Serde;
|
use hyper_serde::Serde;
|
||||||
|
@ -127,7 +126,7 @@ impl FetchResponseListener for StylesheetContext {
|
||||||
let data = if is_css { mem::replace(&mut self.data, vec![]) } else { vec![] };
|
let data = if is_css { mem::replace(&mut self.data, vec![]) } else { vec![] };
|
||||||
|
|
||||||
// TODO: Get the actual value. http://dev.w3.org/csswg/css-syntax/#environment-encoding
|
// TODO: Get the actual value. http://dev.w3.org/csswg/css-syntax/#environment-encoding
|
||||||
let environment_encoding = UTF_8 as EncodingRef;
|
let environment_encoding = UTF_8;
|
||||||
let protocol_encoding_label = metadata.charset.as_ref().map(|s| &**s);
|
let protocol_encoding_label = metadata.charset.as_ref().map(|s| &**s);
|
||||||
let final_url = metadata.final_url;
|
let final_url = metadata.final_url;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ gecko = ["nsstring", "num_cpus",
|
||||||
"style_traits/gecko", "fallible/known_system_malloc"]
|
"style_traits/gecko", "fallible/known_system_malloc"]
|
||||||
use_bindgen = ["bindgen", "regex", "toml"]
|
use_bindgen = ["bindgen", "regex", "toml"]
|
||||||
servo = ["serde", "style_traits/servo", "servo_atoms", "servo_config", "html5ever",
|
servo = ["serde", "style_traits/servo", "servo_atoms", "servo_config", "html5ever",
|
||||||
"cssparser/serde", "encoding", "malloc_size_of/servo",
|
"cssparser/serde", "encoding_rs", "malloc_size_of/servo",
|
||||||
|
|
||||||
# FIXME: Uncomment when https://github.com/servo/servo/pull/16953 has landed:
|
# FIXME: Uncomment when https://github.com/servo/servo/pull/16953 has landed:
|
||||||
#"arrayvec/use_union"
|
#"arrayvec/use_union"
|
||||||
|
@ -36,7 +36,7 @@ bitflags = "1.0"
|
||||||
byteorder = "1.0"
|
byteorder = "1.0"
|
||||||
cfg-if = "0.1.0"
|
cfg-if = "0.1.0"
|
||||||
cssparser = "0.22.0"
|
cssparser = "0.22.0"
|
||||||
encoding = {version = "0.2", optional = true}
|
encoding_rs = {version = "0.7", optional = true}
|
||||||
euclid = "0.15"
|
euclid = "0.15"
|
||||||
fallible = { path = "../fallible" }
|
fallible = { path = "../fallible" }
|
||||||
fnv = "1.0"
|
fnv = "1.0"
|
||||||
|
|
|
@ -4,43 +4,45 @@
|
||||||
|
|
||||||
//! Parsing stylesheets from bytes (not `&str`).
|
//! Parsing stylesheets from bytes (not `&str`).
|
||||||
|
|
||||||
extern crate encoding;
|
extern crate encoding_rs;
|
||||||
|
|
||||||
use context::QuirksMode;
|
use context::QuirksMode;
|
||||||
use cssparser::{stylesheet_encoding, EncodingSupport};
|
use cssparser::{stylesheet_encoding, EncodingSupport};
|
||||||
use error_reporting::ParseErrorReporter;
|
use error_reporting::ParseErrorReporter;
|
||||||
use media_queries::MediaList;
|
use media_queries::MediaList;
|
||||||
use self::encoding::{EncodingRef, DecoderTrap};
|
|
||||||
use servo_arc::Arc;
|
use servo_arc::Arc;
|
||||||
use shared_lock::SharedRwLock;
|
use shared_lock::SharedRwLock;
|
||||||
|
use std::borrow::Cow;
|
||||||
use std::str;
|
use std::str;
|
||||||
use stylesheets::{Stylesheet, StylesheetLoader, Origin, UrlExtraData};
|
use stylesheets::{Stylesheet, StylesheetLoader, Origin, UrlExtraData};
|
||||||
|
|
||||||
struct RustEncoding;
|
struct EncodingRs;
|
||||||
|
|
||||||
impl EncodingSupport for RustEncoding {
|
impl EncodingSupport for EncodingRs {
|
||||||
type Encoding = EncodingRef;
|
type Encoding = &'static encoding_rs::Encoding;
|
||||||
|
|
||||||
fn utf8() -> Self::Encoding {
|
fn utf8() -> Self::Encoding {
|
||||||
encoding::all::UTF_8
|
encoding_rs::UTF_8
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_utf16_be_or_le(encoding: &Self::Encoding) -> bool {
|
fn is_utf16_be_or_le(encoding: &Self::Encoding) -> bool {
|
||||||
matches!(encoding.name(), "utf-16be" | "utf-16le")
|
*encoding == encoding_rs::UTF_16LE ||
|
||||||
|
*encoding == encoding_rs::UTF_16BE
|
||||||
}
|
}
|
||||||
|
|
||||||
fn from_label(ascii_label: &[u8]) -> Option<Self::Encoding> {
|
fn from_label(ascii_label: &[u8]) -> Option<Self::Encoding> {
|
||||||
str::from_utf8(ascii_label).ok().and_then(encoding::label::encoding_from_whatwg_label)
|
encoding_rs::Encoding::for_label(ascii_label)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn decode_stylesheet_bytes(css: &[u8], protocol_encoding_label: Option<&str>,
|
fn decode_stylesheet_bytes<'a>(css: &'a [u8], protocol_encoding_label: Option<&str>,
|
||||||
environment_encoding: Option<EncodingRef>)
|
environment_encoding: Option<&'static encoding_rs::Encoding>)
|
||||||
-> (String, EncodingRef) {
|
-> Cow<'a, str> {
|
||||||
let fallback_encoding = stylesheet_encoding::<RustEncoding>(
|
let fallback_encoding = stylesheet_encoding::<EncodingRs>(
|
||||||
css, protocol_encoding_label.map(str::as_bytes), environment_encoding);
|
css, protocol_encoding_label.map(str::as_bytes), environment_encoding);
|
||||||
let (result, used_encoding) = encoding::decode(css, DecoderTrap::Replace, fallback_encoding);
|
let (result, _used_encoding, _) = fallback_encoding.decode(&css);
|
||||||
(result.unwrap(), used_encoding)
|
// FIXME record used encoding for environment encoding of @import
|
||||||
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Stylesheet {
|
impl Stylesheet {
|
||||||
|
@ -52,7 +54,7 @@ impl Stylesheet {
|
||||||
pub fn from_bytes<R>(bytes: &[u8],
|
pub fn from_bytes<R>(bytes: &[u8],
|
||||||
url_data: UrlExtraData,
|
url_data: UrlExtraData,
|
||||||
protocol_encoding_label: Option<&str>,
|
protocol_encoding_label: Option<&str>,
|
||||||
environment_encoding: Option<EncodingRef>,
|
environment_encoding: Option<&'static encoding_rs::Encoding>,
|
||||||
origin: Origin,
|
origin: Origin,
|
||||||
media: MediaList,
|
media: MediaList,
|
||||||
shared_lock: SharedRwLock,
|
shared_lock: SharedRwLock,
|
||||||
|
@ -62,8 +64,7 @@ impl Stylesheet {
|
||||||
-> Stylesheet
|
-> Stylesheet
|
||||||
where R: ParseErrorReporter
|
where R: ParseErrorReporter
|
||||||
{
|
{
|
||||||
let (string, _) = decode_stylesheet_bytes(
|
let string = decode_stylesheet_bytes(bytes, protocol_encoding_label, environment_encoding);
|
||||||
bytes, protocol_encoding_label, environment_encoding);
|
|
||||||
Stylesheet::from_str(&string,
|
Stylesheet::from_str(&string,
|
||||||
url_data,
|
url_data,
|
||||||
origin,
|
origin,
|
||||||
|
@ -80,14 +81,13 @@ impl Stylesheet {
|
||||||
pub fn update_from_bytes<R>(existing: &Stylesheet,
|
pub fn update_from_bytes<R>(existing: &Stylesheet,
|
||||||
bytes: &[u8],
|
bytes: &[u8],
|
||||||
protocol_encoding_label: Option<&str>,
|
protocol_encoding_label: Option<&str>,
|
||||||
environment_encoding: Option<EncodingRef>,
|
environment_encoding: Option<&'static encoding_rs::Encoding>,
|
||||||
url_data: UrlExtraData,
|
url_data: UrlExtraData,
|
||||||
stylesheet_loader: Option<&StylesheetLoader>,
|
stylesheet_loader: Option<&StylesheetLoader>,
|
||||||
error_reporter: &R)
|
error_reporter: &R)
|
||||||
where R: ParseErrorReporter
|
where R: ParseErrorReporter
|
||||||
{
|
{
|
||||||
let (string, _) = decode_stylesheet_bytes(
|
let string = decode_stylesheet_bytes(bytes, protocol_encoding_label, environment_encoding);
|
||||||
bytes, protocol_encoding_label, environment_encoding);
|
|
||||||
Self::update_from_str(existing,
|
Self::update_from_str(existing,
|
||||||
&string,
|
&string,
|
||||||
url_data,
|
url_data,
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[send-receive-utf16.htm]
|
|
||||||
type: testharness
|
|
||||||
[UTF-16 with BOM, no encoding in content-type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
[iso-2022-jp-decoder.html]
|
|
||||||
type: testharness
|
|
||||||
bug: https://github.com/servo/servo/issues/13239
|
|
||||||
[iso-2022-jp decoder: Error ESC]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: Double ASCII ESC, character]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: SO / SI]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: Roman ESC, characters]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: Roman ESC, SO / SI]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: Katakana ESC, multibyte ESC, character]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: Katakana ESC, error ESC, character]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: Katakana ESC, error ESC #2, character]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: Multibyte ESC, error ESC, character]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: Double multibyte ESC]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: Double multibyte ESC, character]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: Double multibyte ESC #2, character]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: Multibyte ESC, error ESC #2, character]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: Multibyte ESC, single byte, multibyte ESC, character]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: Multibyte ESC, lead error byte]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-jp decoder: character, error ESC #2]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
[replacement-encodings.html]
|
|
||||||
type: testharness
|
|
||||||
[csiso2022kr - non-empty input decodes to one replacement character.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[hz-gb-2312 - non-empty input decodes to one replacement character.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-cn - non-empty input decodes to one replacement character.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-cn-ext - non-empty input decodes to one replacement character.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[iso-2022-kr - non-empty input decodes to one replacement character.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[replacement - non-empty input decodes to one replacement character.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[textdecoder-fatal-single-byte.html]
|
|
||||||
type: testharness
|
|
||||||
[Not throw: windows-1255 has a pointer 202]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,60 +0,0 @@
|
||||||
[textdecoder-labels.html]
|
|
||||||
type: testharness
|
|
||||||
bug: https://github.com/servo/servo/issues/13232
|
|
||||||
["ms932" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[" ms932" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
["ms932 " => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[" ms932 " => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
["\\tms932" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
["ms932\\t" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
["\\tms932\\t" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
["\\nms932" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
["ms932\\n" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
["\\nms932\\n" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
["\\fms932" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
["ms932\\f" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
["\\fms932\\f" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
["\\rms932" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
["ms932\\r" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
["\\rms932\\r" => "shift_jis"]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ms932 => shift_jis]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[koi8-ru => KOI8-U]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[ms932 => Shift_JIS]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,17 +1,5 @@
|
||||||
[unsupported-encodings.html]
|
[unsupported-encodings.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[UTF-32 with BOM should decode as UTF-16LE]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[utf-32 with BOM should decode as UTF-16LE]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[UTF-32LE with BOM should decode as UTF-16LE]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[utf-32le with BOM should decode as UTF-16LE]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[UTF-32be with BOM should decode as windows-1252]
|
[UTF-32be with BOM should decode as windows-1252]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[location-origin-idna.sub.window.html]
|
|
||||||
type: testharness
|
|
||||||
[Test that location.origin returns ASCII]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -9,12 +9,6 @@
|
||||||
[Parsing origin: <http://你好你好> against <http://other.com/>]
|
[Parsing origin: <http://你好你好> against <http://other.com/>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing origin: <http://./> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing origin: <http://../> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing origin: <ftp://%e2%98%83> against <about:blank>]
|
[Parsing origin: <ftp://%e2%98%83> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -9,12 +9,6 @@
|
||||||
[Parsing origin: <http://你好你好> against <http://other.com/>]
|
[Parsing origin: <http://你好你好> against <http://other.com/>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing origin: <http://./> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing origin: <http://../> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing origin: <ftp://%e2%98%83> against <about:blank>]
|
[Parsing origin: <ftp://%e2%98%83> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -45,18 +45,6 @@
|
||||||
[Parsing: <http://:@www.example.com> against <about:blank>]
|
[Parsing: <http://:@www.example.com> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing: <http://[::1.2.3.4x\]> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://[::1.2.3.\]> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://[::1.2.\]> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://[::1.\]> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <sc://ñ.test/> against <about:blank>]
|
[Parsing: <sc://ñ.test/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -174,12 +162,6 @@
|
||||||
[Parsing: <file://[1::8\]/C:/> against <about:blank>]
|
[Parsing: <file://[1::8\]/C:/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing: <http://./> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://../> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <https://0x100000000/test> against <about:blank>]
|
[Parsing: <https://0x100000000/test> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -45,18 +45,6 @@
|
||||||
[Parsing: <http://:@www.example.com> against <about:blank>]
|
[Parsing: <http://:@www.example.com> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing: <http://[::1.2.3.4x\]> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://[::1.2.3.\]> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://[::1.2.\]> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://[::1.\]> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <sc://ñ.test/> against <about:blank>]
|
[Parsing: <sc://ñ.test/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -174,12 +162,6 @@
|
||||||
[Parsing: <file://[1::8\]/C:/> against <about:blank>]
|
[Parsing: <file://[1::8\]/C:/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing: <http://./> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://../> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <https://0x100000000/test> against <about:blank>]
|
[Parsing: <https://0x100000000/test> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -381,3 +381,21 @@
|
||||||
[01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.β (using <area>.hostname)]
|
[01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.β (using <area>.hostname)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[xn--1ug.example (using URL)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[xn--1ug.example (using URL.host)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[xn--1ug.example (using URL.hostname)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[xn--1ug.example (using <a>)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[xn--1ug.example (using <a>.host)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[xn--1ug.example (using <a>.hostname)]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -45,18 +45,6 @@
|
||||||
[Parsing: <http://:@www.example.com> against <about:blank>]
|
[Parsing: <http://:@www.example.com> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing: <http://[::1.2.3.4x\]> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://[::1.2.3.\]> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://[::1.2.\]> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://[::1.\]> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <sc://ñ.test/> against <about:blank>]
|
[Parsing: <sc://ñ.test/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -174,12 +162,6 @@
|
||||||
[Parsing: <file://[1::8\]/C:/> against <about:blank>]
|
[Parsing: <file://[1::8\]/C:/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing: <http://./> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <http://../> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Parsing: <https://0x100000000/test> against <about:blank>]
|
[Parsing: <https://0x100000000/test> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -6,18 +6,3 @@
|
||||||
[Origin parsing: <https://faß.ExAmPlE/> against <about:blank>]
|
[Origin parsing: <https://faß.ExAmPlE/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Origin parsing: <http://你好你好> against <http://other.com/>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Origin parsing: <http://./> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Origin parsing: <http://../> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Origin parsing: <ftp://%e2%98%83> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Origin parsing: <https://%e2%98%83> against <about:blank>]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
|
@ -567,39 +567,15 @@
|
||||||
[<area>: Setting <http://example.net/>.host = '[google.com\]' Broken IPv6]
|
[<area>: Setting <http://example.net/>.host = '[google.com\]' Broken IPv6]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[URL: Setting <http://example.net/>.host = '[::1.2.3.4x\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<a>: Setting <http://example.net/>.host = '[::1.2.3.4x\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<area>: Setting <http://example.net/>.host = '[::1.2.3.4x\]']
|
[<area>: Setting <http://example.net/>.host = '[::1.2.3.4x\]']
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[URL: Setting <http://example.net/>.host = '[::1.2.3.\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<a>: Setting <http://example.net/>.host = '[::1.2.3.\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<area>: Setting <http://example.net/>.host = '[::1.2.3.\]']
|
[<area>: Setting <http://example.net/>.host = '[::1.2.3.\]']
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[URL: Setting <http://example.net/>.host = '[::1.2.\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<a>: Setting <http://example.net/>.host = '[::1.2.\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<area>: Setting <http://example.net/>.host = '[::1.2.\]']
|
[<area>: Setting <http://example.net/>.host = '[::1.2.\]']
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[URL: Setting <http://example.net/>.host = '[::1.\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<a>: Setting <http://example.net/>.host = '[::1.\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<area>: Setting <http://example.net/>.host = '[::1.\]']
|
[<area>: Setting <http://example.net/>.host = '[::1.\]']
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -648,39 +624,15 @@
|
||||||
[<area>: Setting <http://example.net/>.hostname = '[google.com\]' Broken IPv6]
|
[<area>: Setting <http://example.net/>.hostname = '[google.com\]' Broken IPv6]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[URL: Setting <http://example.net/>.hostname = '[::1.2.3.4x\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<a>: Setting <http://example.net/>.hostname = '[::1.2.3.4x\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<area>: Setting <http://example.net/>.hostname = '[::1.2.3.4x\]']
|
[<area>: Setting <http://example.net/>.hostname = '[::1.2.3.4x\]']
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[URL: Setting <http://example.net/>.hostname = '[::1.2.3.\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<a>: Setting <http://example.net/>.hostname = '[::1.2.3.\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<area>: Setting <http://example.net/>.hostname = '[::1.2.3.\]']
|
[<area>: Setting <http://example.net/>.hostname = '[::1.2.3.\]']
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[URL: Setting <http://example.net/>.hostname = '[::1.2.\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<a>: Setting <http://example.net/>.hostname = '[::1.2.\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<area>: Setting <http://example.net/>.hostname = '[::1.2.\]']
|
[<area>: Setting <http://example.net/>.hostname = '[::1.2.\]']
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[URL: Setting <http://example.net/>.hostname = '[::1.\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<a>: Setting <http://example.net/>.hostname = '[::1.\]']
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[<area>: Setting <http://example.net/>.hostname = '[::1.\]']
|
[<area>: Setting <http://example.net/>.hostname = '[::1.\]']
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue