mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update rand to 0.7 (fixes #24448)
This commit is contained in:
parent
4f8cfd9b48
commit
785a344e32
42 changed files with 200 additions and 254 deletions
|
@ -33,7 +33,7 @@ arrayvec = "0.4.6"
|
|||
atomic_refcell = "0.1"
|
||||
bitflags = "1.0"
|
||||
byteorder = "1.0"
|
||||
cssparser = "0.25"
|
||||
cssparser = "0.27.1"
|
||||
crossbeam-channel = { version = "0.3", optional = true }
|
||||
derive_more = "0.13"
|
||||
new_debug_unreachable = "1.0"
|
||||
|
@ -42,7 +42,7 @@ euclid = "0.20"
|
|||
fallible = { path = "../fallible" }
|
||||
fxhash = "0.2"
|
||||
hashglobe = { path = "../hashglobe" }
|
||||
html5ever = {version = "0.24", optional = true}
|
||||
html5ever = {version = "0.25", optional = true}
|
||||
indexmap = "1.0"
|
||||
itertools = "0.8"
|
||||
itoa = "0.4"
|
||||
|
@ -67,7 +67,7 @@ servo_atoms = {path = "../atoms", optional = true}
|
|||
servo_config = {path = "../config", optional = true}
|
||||
smallbitvec = "2.3.0"
|
||||
smallvec = "0.6.6"
|
||||
string_cache = { version = "0.7", optional = true }
|
||||
string_cache = { version = "0.8", optional = true }
|
||||
style_derive = {path = "../style_derive"}
|
||||
style_traits = {path = "../style_traits"}
|
||||
servo_url = {path = "../url", optional = true}
|
||||
|
|
|
@ -220,9 +220,9 @@ macro_rules! counter_style_descriptors {
|
|||
// rather than returning it.
|
||||
let value = input.parse_entirely(|i| Parse::parse(self.context, i))?;
|
||||
self.rule.$ident = Some(value)
|
||||
}
|
||||
},
|
||||
)*
|
||||
_ => return Err(input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone())))
|
||||
_ => return Err(input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone()))),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
@ -371,11 +371,11 @@ impl Parse for System {
|
|||
"fixed" => {
|
||||
let first_symbol_value = input.try(|i| Integer::parse(context, i)).ok();
|
||||
Ok(System::Fixed { first_symbol_value })
|
||||
}
|
||||
},
|
||||
"extends" => {
|
||||
let other = parse_counter_style_name(input)?;
|
||||
Ok(System::Extends(other))
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -652,7 +652,7 @@ impl Parse for SpeakAs {
|
|||
"spell-out" => {
|
||||
is_spell_out = true;
|
||||
Err(())
|
||||
}
|
||||
},
|
||||
_ => Err(()),
|
||||
}
|
||||
});
|
||||
|
|
|
@ -480,9 +480,9 @@ macro_rules! font_face_descriptors_common {
|
|||
// rather than returning it.
|
||||
let value = input.parse_entirely(|i| Parse::parse(self.context, i))?;
|
||||
self.rule.$ident = Some(value)
|
||||
}
|
||||
},
|
||||
)*
|
||||
_ => return Err(input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone())))
|
||||
_ => return Err(input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone()))),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -460,8 +460,8 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
|
|||
let pseudo_class = match_ignore_ascii_case! { &name,
|
||||
"lang" => {
|
||||
Lang(parser.expect_ident_or_string()?.as_ref().into())
|
||||
}
|
||||
_ => return Err(parser.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone())))
|
||||
},
|
||||
_ => return Err(parser.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone()))),
|
||||
};
|
||||
|
||||
Ok(pseudo_class)
|
||||
|
|
|
@ -144,28 +144,28 @@ impl DocumentMatchingFunction {
|
|||
match_ignore_ascii_case! { &function,
|
||||
"url-prefix" => {
|
||||
parse_quoted_or_unquoted_string!(input, DocumentMatchingFunction::UrlPrefix)
|
||||
}
|
||||
},
|
||||
"domain" => {
|
||||
parse_quoted_or_unquoted_string!(input, DocumentMatchingFunction::Domain)
|
||||
}
|
||||
},
|
||||
"regexp" => {
|
||||
input.parse_nested_block(|input| {
|
||||
Ok(DocumentMatchingFunction::Regexp(
|
||||
input.expect_string()?.as_ref().to_owned(),
|
||||
))
|
||||
})
|
||||
}
|
||||
},
|
||||
"media-document" => {
|
||||
input.parse_nested_block(|input| {
|
||||
let kind = MediaDocumentKind::parse(input)?;
|
||||
Ok(DocumentMatchingFunction::MediaDocument(kind))
|
||||
})
|
||||
}
|
||||
},
|
||||
_ => {
|
||||
Err(location.new_custom_error(
|
||||
StyleParseErrorKind::UnexpectedFunction(function.clone())
|
||||
))
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ impl<'a, 'i> AtRuleParser<'i> for TopLevelRuleParser<'a> {
|
|||
"charset" => {
|
||||
self.dom_error = Some(RulesMutateError::HierarchyRequest);
|
||||
return Err(input.new_custom_error(StyleParseErrorKind::UnexpectedCharsetRule))
|
||||
}
|
||||
},
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
|
|
@ -157,17 +157,17 @@ impl SupportsCondition {
|
|||
CString::new(name.as_bytes())
|
||||
}.map_err(|_| input.new_custom_error(StyleParseErrorKind::UnspecifiedError))?;
|
||||
Ok(SupportsCondition::MozBoolPref(name))
|
||||
}
|
||||
},
|
||||
"selector" => {
|
||||
let pos = input.position();
|
||||
consume_any_value(input)?;
|
||||
Ok(SupportsCondition::Selector(RawSelector(
|
||||
input.slice_from(pos).to_owned()
|
||||
)))
|
||||
}
|
||||
},
|
||||
_ => {
|
||||
Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ impl Parse for SpecifiedFontStyle {
|
|||
.unwrap_or_else(|_| Self::default_angle());
|
||||
|
||||
generics::FontStyle::Oblique(angle)
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@ impl Parse for Gradient {
|
|||
},
|
||||
"-webkit-radial-gradient" => {
|
||||
Some((Shape::Radial, false, GradientCompatMode::WebKit))
|
||||
}
|
||||
},
|
||||
#[cfg(feature = "gecko")]
|
||||
"-moz-radial-gradient" => {
|
||||
Some((Shape::Radial, false, GradientCompatMode::Moz))
|
||||
|
|
|
@ -471,17 +471,17 @@ impl NoCalcLength {
|
|||
// viewport percentages
|
||||
"vw" if !context.in_page_rule() => {
|
||||
NoCalcLength::ViewportPercentage(ViewportPercentageLength::Vw(value))
|
||||
}
|
||||
},
|
||||
"vh" if !context.in_page_rule() => {
|
||||
NoCalcLength::ViewportPercentage(ViewportPercentageLength::Vh(value))
|
||||
}
|
||||
},
|
||||
"vmin" if !context.in_page_rule() => {
|
||||
NoCalcLength::ViewportPercentage(ViewportPercentageLength::Vmin(value))
|
||||
}
|
||||
},
|
||||
"vmax" if !context.in_page_rule() => {
|
||||
NoCalcLength::ViewportPercentage(ViewportPercentageLength::Vmax(value))
|
||||
}
|
||||
_ => return Err(())
|
||||
},
|
||||
_ => return Err(()),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -421,7 +421,7 @@ impl Parse for TextTransform {
|
|||
},
|
||||
"full-size-kana" if !result.other_.intersects(TextTransformOther::FULL_SIZE_KANA) => {
|
||||
result.other_.insert(TextTransformOther::FULL_SIZE_KANA)
|
||||
}
|
||||
},
|
||||
_ => return Err(location.new_custom_error(
|
||||
SelectorParseErrorKind::UnexpectedIdent(ident.clone())
|
||||
)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue