aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-10-23 13:38:31 -0400
committerGitHub <noreply@github.com>2019-10-23 13:38:31 -0400
commitddc7a37531e0cb173817c5afac0330f374ffdd97 (patch)
tree49a88fd3b94976139625e05057aeade760f1bb77 /components/script
parente26530341bdd3bfdaf40ba0e9f6cc1460732bc9e (diff)
parent785a344e32db58d4e631fd3cae17fd1f29a721ab (diff)
downloadservo-ddc7a37531e0cb173817c5afac0330f374ffdd97.tar.gz
servo-ddc7a37531e0cb173817c5afac0330f374ffdd97.zip
Auto merge of #24523 - servo:rand, r=jdm,nox
Update rand to 0.7 (fixes #24448)
Diffstat (limited to 'components/script')
-rw-r--r--components/script/Cargo.toml14
-rw-r--r--components/script/build.rs11
-rw-r--r--components/script/dom/servoparser/prefetch.rs12
3 files changed, 18 insertions, 19 deletions
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml
index cb30f437a11..23873d59767 100644
--- a/components/script/Cargo.toml
+++ b/components/script/Cargo.toml
@@ -23,8 +23,8 @@ uwp = ["js/uwp"]
vslatestinstalled = ["js/vslatestinstalled"]
[build-dependencies]
-phf_codegen = "0.7"
-phf_shared = "0.7"
+phf_codegen = "0.8"
+phf_shared = "0.8"
serde_json = "1.0"
[target.'cfg(target_os = "linux")'.dependencies]
@@ -43,7 +43,7 @@ content-security-policy = {version = "0.3.0", features = ["serde"]}
cookie = "0.11"
chrono = "0.4"
crossbeam-channel = "0.3"
-cssparser = "0.25"
+cssparser = "0.27.1"
deny_public_fields = {path = "../deny_public_fields"}
devtools_traits = {path = "../devtools_traits"}
dom_struct = {path = "../dom_struct"}
@@ -54,7 +54,7 @@ enum-iterator = "0.3"
euclid = "0.20"
fnv = "1.0"
headers = "0.2"
-html5ever = "0.24"
+html5ever = "0.25"
http = "0.1"
hyper = "0.12"
hyper_serde = "0.11"
@@ -80,7 +80,7 @@ net_traits = {path = "../net_traits"}
num-traits = "0.2"
parking_lot = "0.9"
percent-encoding = "2.0"
-phf = "0.7"
+phf = "0.8"
pixels = {path = "../pixels"}
profile_traits = {path = "../profile_traits"}
ref_filter_map = "1.0.1"
@@ -109,8 +109,8 @@ time = "0.1.12"
unicode-segmentation = "1.1.0"
url = "2.0"
utf-8 = "0.7"
-uuid = {version = "0.7", features = ["v4"]}
-xml5ever = {version = "0.15"}
+uuid = {version = "0.8", features = ["v4"]}
+xml5ever = "0.16"
webdriver = "0.40"
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
webvr_traits = {path = "../webvr_traits"}
diff --git a/components/script/build.rs b/components/script/build.rs
index ea2e756490b..d8d65b098db 100644
--- a/components/script/build.rs
+++ b/components/script/build.rs
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-use phf_shared;
+use phf_shared::{self, FmtConst};
use serde_json::{self, Value};
use std::env;
use std::fmt;
@@ -40,18 +40,17 @@ fn main() {
let mut phf = File::create(&phf).unwrap();
write!(
&mut phf,
- "pub static MAP: phf::Map<&'static [u8], fn(JSContext, HandleObject)> = "
+ "pub static MAP: phf::Map<&'static [u8], fn(JSContext, HandleObject)> = {};\n",
+ map.build(),
)
.unwrap();
- map.build(&mut phf).unwrap();
- write!(&mut phf, ";\n").unwrap();
}
#[derive(Eq, Hash, PartialEq)]
struct Bytes<'a>(&'a str);
-impl<'a> fmt::Debug for Bytes<'a> {
- fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+impl<'a> FmtConst for Bytes<'a> {
+ fn fmt_const(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
// https://github.com/rust-lang/rust/issues/55223
// should technically be just `write!(formatter, "b\"{}\"", self.0)
// but the referenced issue breaks promotion in the surrounding code
diff --git a/components/script/dom/servoparser/prefetch.rs b/components/script/dom/servoparser/prefetch.rs
index 716be8b0f51..906c9352771 100644
--- a/components/script/dom/servoparser/prefetch.rs
+++ b/components/script/dom/servoparser/prefetch.rs
@@ -97,7 +97,7 @@ impl TokenSink for PrefetchSink {
_ => return TokenSinkResult::Continue,
};
match (tag.kind, &tag.name) {
- (TagKind::StartTag, local_name!("script")) if self.prefetching => {
+ (TagKind::StartTag, &local_name!("script")) if self.prefetching => {
if let Some(url) = self.get_url(tag, local_name!("src")) {
debug!("Prefetch script {}", url);
let cors_setting = self.get_cors_settings(tag, local_name!("crossorigin"));
@@ -120,7 +120,7 @@ impl TokenSink for PrefetchSink {
}
TokenSinkResult::RawData(RawKind::ScriptData)
},
- (TagKind::StartTag, local_name!("img")) if self.prefetching => {
+ (TagKind::StartTag, &local_name!("img")) if self.prefetching => {
if let Some(url) = self.get_url(tag, local_name!("src")) {
debug!("Prefetch {} {}", tag.name, url);
let request = image_fetch_request(
@@ -137,7 +137,7 @@ impl TokenSink for PrefetchSink {
}
TokenSinkResult::Continue
},
- (TagKind::StartTag, local_name!("link")) if self.prefetching => {
+ (TagKind::StartTag, &local_name!("link")) if self.prefetching => {
if let Some(rel) = self.get_attr(tag, local_name!("rel")) {
if rel.value.eq_ignore_ascii_case("stylesheet") {
if let Some(url) = self.get_url(tag, local_name!("href")) {
@@ -167,15 +167,15 @@ impl TokenSink for PrefetchSink {
}
TokenSinkResult::Continue
},
- (TagKind::StartTag, local_name!("script")) => {
+ (TagKind::StartTag, &local_name!("script")) => {
TokenSinkResult::RawData(RawKind::ScriptData)
},
- (TagKind::EndTag, local_name!("script")) => {
+ (TagKind::EndTag, &local_name!("script")) => {
// After the first script tag, the main parser is blocked, so it's worth prefetching.
self.prefetching = true;
TokenSinkResult::Script(PrefetchHandle)
},
- (TagKind::StartTag, local_name!("base")) => {
+ (TagKind::StartTag, &local_name!("base")) => {
if let Some(url) = self.get_url(tag, local_name!("href")) {
if self.base_url.is_none() {
debug!("Setting base {}", url);