Bug 1466789: Bump cssparser. r=me

MozReview-Commit-ID: 39oowMlDBon
This commit is contained in:
Emilio Cobos Álvarez 2018-06-05 11:51:45 +02:00
Родитель f46383f8bd
Коммит 3dcb3f3abf
8 изменённых файлов: 55 добавлений и 45 удалений

34
Cargo.lock сгенерированный
Просмотреть файл

@ -439,31 +439,31 @@ dependencies = [
[[package]]
name = "cssparser"
version = "0.23.4"
version = "0.23.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cssparser-macros 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser-macros 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"dtoa-short 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"procedural-masquerade 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.12.12 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cssparser-macros"
version = "0.3.2"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"procedural-masquerade 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.12.12 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -798,7 +798,7 @@ name = "geckoservo"
version = "0.0.1"
dependencies = [
"atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.8 (registry+https://github.com/rust-lang/crates.io-index)",
"cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1134,7 +1134,7 @@ name = "malloc_size_of"
version = "0.0.1"
dependencies = [
"app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.8 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
"hashglobe 0.1.0",
"selectors 0.19.0",
@ -1770,7 +1770,7 @@ name = "selectors"
version = "0.19.0"
dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.8 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1908,7 +1908,7 @@ dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.1 (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.23.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.8 (registry+https://github.com/rust-lang/crates.io-index)",
"debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
"fallible 0.0.1",
@ -1963,7 +1963,7 @@ version = "0.0.1"
dependencies = [
"app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.8 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
"malloc_size_of 0.0.1",
"malloc_size_of_derive 0.0.1",
@ -1976,7 +1976,7 @@ name = "stylo_tests"
version = "0.0.1"
dependencies = [
"atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.23.8 (registry+https://github.com/rust-lang/crates.io-index)",
"cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2542,8 +2542,8 @@ dependencies = [
"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3"
"checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150"
"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
"checksum cssparser 0.23.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b906ac3f6108d8d0bfd4158469abe5909df1497116c8400346b5e08944579edd"
"checksum cssparser-macros 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ce714f82ed2ca0e026ee351b7f25b2d70f81cf6f0f3214537a2edb67cd4d4d0"
"checksum cssparser 0.23.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c0c0fc9ed5a400ed6237dc3309e8a51138e7dfa02c505863b0524a02eba86ffb"
"checksum cssparser-macros 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f3a5383ae18dbfdeb569ed62019f5bddb2a95cd2d3833313c475a0d014777805"
"checksum cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b6557bdb1dc9647eae1cf7f5601b14cd45fc3c7ccf2df618387416fe542da6ea"
"checksum cstr-macros 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f9f316203d1ea36f4f18316822806f6999aa3dc5ed1adf51e35b77e3b3933d78"
"checksum cubeb 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8a3502aafa1bf95c524f65d2ba46d8741700c6a8a9543ea52c6da3d8b69a2896"

Просмотреть файл

@ -1 +1 @@
{"files":{"Cargo.toml":"6478bcf8bd4706beddc03d6765371737940fcd48f5e84f31534cd514d086fb19","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","lib.rs":"fa6ce79ee54e76f0cfb887ad7b8b14f74aa768d2185dc1d0fd4973bbe5ab5049"},"package":"9ce714f82ed2ca0e026ee351b7f25b2d70f81cf6f0f3214537a2edb67cd4d4d0"}
{"files":{"Cargo.toml":"a359c50f2f1777724b126573a568b3e94ad2674f645fae321ddf4b4293cef4cc","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","lib.rs":"218edca3cc07d460a65b6f937b77024a13ccca9d9d62ee715eeeb8dff8859f04"},"package":"f3a5383ae18dbfdeb569ed62019f5bddb2a95cd2d3833313c475a0d014777805"}

Просмотреть файл

@ -12,7 +12,7 @@
[package]
name = "cssparser-macros"
version = "0.3.2"
version = "0.3.3"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
description = "Procedural macros for cssparser"
documentation = "https://docs.rs/cssparser-macros/"
@ -26,14 +26,14 @@ proc-macro = true
version = "0.7"
[dependencies.proc-macro2]
version = "0.2"
version = "0.3"
[dependencies.procedural-masquerade]
version = "0.1"
[dependencies.quote]
version = "0.4"
version = "0.5"
[dependencies.syn]
version = "0.12"
version = "0.13"
features = ["full", "extra-traits"]

14
third_party/rust/cssparser-macros/lib.rs поставляемый
Просмотреть файл

@ -10,8 +10,8 @@ extern crate proc_macro2;
extern crate syn;
#[allow(unused_imports)] use std::ascii::AsciiExt;
use quote::ToTokens;
use proc_macro2::{TokenNode, TokenStream, TokenTree};
use std::iter;
use proc_macro2::{TokenStream, TokenTree};
define_proc_macros! {
/// Input: the arms of a `match` expression.
@ -24,12 +24,12 @@ define_proc_macros! {
pub fn cssparser_internal__assert_ascii_lowercase__max_len(input: &str) -> String {
let expr = syn::parse_str(&format!("match x {{ {} }}", input)).unwrap();
let arms = match expr {
syn::Expr::Match(syn::ExprMatch { ref arms, .. }) => arms,
syn::Expr::Match(syn::ExprMatch { arms, .. }) => arms,
_ => panic!("expected a match expression, got {:?}", expr)
};
max_len(arms.iter().flat_map(|arm| &arm.pats).filter_map(|pattern| {
let expr = match *pattern {
syn::Pat::Lit(ref expr) => expr,
max_len(arms.into_iter().flat_map(|arm| arm.pats).filter_map(|pattern| {
let expr = match pattern {
syn::Pat::Lit(expr) => expr,
syn::Pat::Wild(_) => return None,
_ => panic!("expected string or wildcard pattern, got {:?}", pattern)
};
@ -93,6 +93,6 @@ fn max_len<I: Iterator<Item=usize>>(lengths: I) -> String {
}
fn string_literal(token: &TokenTree) -> String {
let lit: syn::LitStr = syn::parse2(token.clone().into()).expect(&format!("expected string literal, got {:?}", token));
let lit: syn::LitStr = syn::parse2(iter::once(token.clone()).collect()).expect(&format!("expected string literal, got {:?}", token));
lit.value()
}

Просмотреть файл

@ -1 +1 @@
{"files":{".travis.yml":"e8f586288c39dbaebefdd391f68376e58f3a4c568a8dc3cd97c4a362194716dd","Cargo.toml":"efd6f23ab6df0f7bffa3b56a166aff55aa5d082fa4084ba3f443e86833e783e1","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"c5781e673335f37ed3d7acb119f8ed33efdf6eb75a7094b7da2abe0c3230adb8","build.rs":"1068e899b617cf99eee953f745d83f88859cc0cef0297fcc3310b6bd24474761","build/match_byte.rs":"0f7d39170e746d59deebf7894086f63ee39ea61fb161d24b0c7a3c1db3945e0d","docs/.nojekyll":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","docs/404.html":"025861f76f8d1f6d67c20ab624c6e418f4f824385e2dd8ad8732c4ea563c6a2e","docs/index.html":"025861f76f8d1f6d67c20ab624c6e418f4f824385e2dd8ad8732c4ea563c6a2e","src/color.rs":"c60f1b0ab7a2a6213e434604ee33f78e7ef74347f325d86d0b9192d8225ae1cc","src/cow_rc_str.rs":"541216f8ef74ee3cc5cbbc1347e5f32ed66588c401851c9a7d68b867aede1de0","src/from_bytes.rs":"331fe63af2123ae3675b61928a69461b5ac77799fff3ce9978c55cf2c558f4ff","src/lib.rs":"46c377e0c9a75780d5cb0bcf4dfb960f0fb2a996a13e7349bb111b9082252233","src/macros.rs":"adb9773c157890381556ea83d7942dcc676f99eea71abbb6afeffee1e3f28960","src/nth.rs":"5c70fb542d1376cddab69922eeb4c05e4fcf8f413f27563a2af50f72a47c8f8c","src/parser.rs":"9ed4aec998221eb2d2ba99db2f9f82a02399fb0c3b8500627f68f5aab872adde","src/rules_and_declarations.rs":"be2c4f3f3bb673d866575b6cb6084f1879dff07356d583ca9a3595f63b7f916f","src/serializer.rs":"4ccfc9b4fe994aab3803662bbf31cc25052a6a39531073a867b14b224afe42dd","src/size_of_tests.rs":"e5f63c8c18721cc3ff7a5407e84f9889ffa10e66da96e8510a696c3e00ad72d5","src/tests.rs":"80b02c80ab0fd580dad9206615c918e0db7dff63dfed0feeedb66f317d24b24b","src/tokenizer.rs":"429b2cba419cf8b923fbcc32d3bd34c0b39284ebfcb9fc29b8eb8643d8d5f312","src/unicode_range.rs":"191d50a1588e5c88608b84cfe9279def71f495f8e016fa093f90399bbd2b635f"},"package":"b906ac3f6108d8d0bfd4158469abe5909df1497116c8400346b5e08944579edd"}
{"files":{".travis.yml":"e8f586288c39dbaebefdd391f68376e58f3a4c568a8dc3cd97c4a362194716dd","Cargo.toml":"fc7833c9bf848fb552899f2b05ad86d89ea5b352225d6c73dc37b4dbf5e9d313","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"c5781e673335f37ed3d7acb119f8ed33efdf6eb75a7094b7da2abe0c3230adb8","build.rs":"ce686e87cccb6aa85a8cd34688d809398c5a624f179fd9a172d1049892da3f4c","build/match_byte.rs":"0f7d39170e746d59deebf7894086f63ee39ea61fb161d24b0c7a3c1db3945e0d","docs/.nojekyll":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","docs/404.html":"025861f76f8d1f6d67c20ab624c6e418f4f824385e2dd8ad8732c4ea563c6a2e","docs/index.html":"025861f76f8d1f6d67c20ab624c6e418f4f824385e2dd8ad8732c4ea563c6a2e","src/color.rs":"c60f1b0ab7a2a6213e434604ee33f78e7ef74347f325d86d0b9192d8225ae1cc","src/cow_rc_str.rs":"541216f8ef74ee3cc5cbbc1347e5f32ed66588c401851c9a7d68b867aede1de0","src/from_bytes.rs":"331fe63af2123ae3675b61928a69461b5ac77799fff3ce9978c55cf2c558f4ff","src/lib.rs":"46c377e0c9a75780d5cb0bcf4dfb960f0fb2a996a13e7349bb111b9082252233","src/macros.rs":"adb9773c157890381556ea83d7942dcc676f99eea71abbb6afeffee1e3f28960","src/nth.rs":"5c70fb542d1376cddab69922eeb4c05e4fcf8f413f27563a2af50f72a47c8f8c","src/parser.rs":"9ed4aec998221eb2d2ba99db2f9f82a02399fb0c3b8500627f68f5aab872adde","src/rules_and_declarations.rs":"be2c4f3f3bb673d866575b6cb6084f1879dff07356d583ca9a3595f63b7f916f","src/serializer.rs":"3e2dfc60613f885cb6f99abfc854fde2a1e00de507431bd2e51178b61abfd69b","src/size_of_tests.rs":"e5f63c8c18721cc3ff7a5407e84f9889ffa10e66da96e8510a696c3e00ad72d5","src/tests.rs":"80b02c80ab0fd580dad9206615c918e0db7dff63dfed0feeedb66f317d24b24b","src/tokenizer.rs":"429b2cba419cf8b923fbcc32d3bd34c0b39284ebfcb9fc29b8eb8643d8d5f312","src/unicode_range.rs":"191d50a1588e5c88608b84cfe9279def71f495f8e016fa093f90399bbd2b635f"},"package":"c0c0fc9ed5a400ed6237dc3309e8a51138e7dfa02c505863b0524a02eba86ffb"}

10
third_party/rust/cssparser/Cargo.toml поставляемый
Просмотреть файл

@ -12,7 +12,7 @@
[package]
name = "cssparser"
version = "0.23.4"
version = "0.23.8"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
build = "build.rs"
exclude = ["src/css-parsing-tests/**", "src/big-data-url.css"]
@ -23,7 +23,7 @@ keywords = ["css", "syntax", "parser"]
license = "MPL-2.0"
repository = "https://github.com/servo/rust-cssparser"
[dependencies.cssparser-macros]
version = "0.3"
version = "0.3.3"
[dependencies.dtoa-short]
version = "0.3"
@ -59,13 +59,13 @@ version = "0.7"
[dev-dependencies.rustc-serialize]
version = "0.3"
[build-dependencies.proc-macro2]
version = "0.2"
version = "0.3"
[build-dependencies.quote]
version = "0.4.1"
version = "0.5"
[build-dependencies.syn]
version = "0.12"
version = "0.13"
features = ["extra-traits", "fold"]
[features]

23
third_party/rust/cssparser/build.rs поставляемый
Просмотреть файл

@ -15,7 +15,7 @@ use std::path::Path;
#[cfg(feature = "dummy_match_byte")]
mod codegen {
use std::path::Path;
pub fn main(_: &Path) {}
pub fn main() {}
}
#[cfg(not(feature = "dummy_match_byte"))]
@ -27,11 +27,21 @@ mod codegen {
use match_byte;
use std::env;
use std::path::Path;
use std::thread::Builder;
pub fn main(tokenizer_rs: &Path) {
match_byte::expand(tokenizer_rs,
&Path::new(&env::var("OUT_DIR").unwrap()).join("tokenizer.rs"));
pub fn main() {
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let input = Path::new(&manifest_dir).join("src/tokenizer.rs");
let output = Path::new(&env::var("OUT_DIR").unwrap()).join("tokenizer.rs");
println!("cargo:rerun-if-changed={}", input.display());
// We have stack overflows on Servo's CI.
let handle = Builder::new().stack_size(128 * 1024 * 1024).spawn(move || {
match_byte::expand(&input, &output);
}).unwrap();
handle.join().unwrap();
}
}
@ -41,8 +51,5 @@ fn main() {
println!("cargo:rustc-cfg=rustc_has_pr45225")
}
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let tokenizer_rs = Path::new(&manifest_dir).join("src/tokenizer.rs");
codegen::main(&tokenizer_rs);
println!("cargo:rerun-if-changed={}", tokenizer_rs.display());
codegen::main();
}

Просмотреть файл

@ -188,8 +188,11 @@ pub fn serialize_identifier<W>(mut value: &str, dest: &mut W) -> fmt::Result whe
}
}
fn serialize_name<W>(value: &str, dest: &mut W) -> fmt::Result where W:fmt::Write {
/// Write a CSS name, like a custom property name.
///
/// You should only use this when you know what you're doing, when in doubt,
/// consider using `serialize_identifier`.
pub fn serialize_name<W>(value: &str, dest: &mut W) -> fmt::Result where W:fmt::Write {
let mut chunk_start = 0;
for (i, b) in value.bytes().enumerate() {
let escaped = match b {