mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Upgrade cssparser to 0.15
This commit is contained in:
parent
66c130d55a
commit
b83afdedc8
42 changed files with 234 additions and 217 deletions
|
@ -20,7 +20,7 @@ use stylearc::{Arc, UniqueArc};
|
|||
use app_units::Au;
|
||||
#[cfg(feature = "servo")] use cssparser::RGBA;
|
||||
use cssparser::{Parser, TokenSerializationType, serialize_identifier};
|
||||
use cssparser::ParserInput;
|
||||
use cssparser::{ParserInput, CompactCowStr};
|
||||
use error_reporting::ParseErrorReporter;
|
||||
#[cfg(feature = "servo")] use euclid::SideOffsets2D;
|
||||
use computed_values;
|
||||
|
@ -491,7 +491,7 @@ impl CSSWideKeyword {
|
|||
|
||||
/// Takes the result of cssparser::Parser::expect_ident() and converts it
|
||||
/// to a CSSWideKeyword.
|
||||
pub fn from_ident<'i>(ident: &Cow<'i, str>) -> Option<Self> {
|
||||
pub fn from_ident<'i>(ident: &str) -> Option<Self> {
|
||||
match_ignore_ascii_case! { ident,
|
||||
// If modifying this set of keyword, also update values::CustomIdent::from_ident
|
||||
"initial" => Some(CSSWideKeyword::Initial),
|
||||
|
@ -986,7 +986,7 @@ impl PropertyId {
|
|||
/// Returns a given property from the string `s`.
|
||||
///
|
||||
/// Returns Err(()) for unknown non-custom properties
|
||||
pub fn parse<'i>(property_name: Cow<'i, str>) -> Result<Self, ParseError<'i>> {
|
||||
pub fn parse<'i>(property_name: CompactCowStr<'i>) -> Result<Self, ParseError<'i>> {
|
||||
if let Ok(name) = ::custom_properties::parse_name(&property_name) {
|
||||
return Ok(PropertyId::Custom(::custom_properties::Name::from(name)))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue