mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Suppress CSS parser errors for vendor-prefixed properties.
This commit is contained in:
parent
8e14d93602
commit
94d631c1f4
9 changed files with 84 additions and 31 deletions
|
@ -17,6 +17,7 @@ use selectors::parser::SelectorParseError;
|
|||
use shared_lock::{DeepCloneParams, DeepCloneWithLock, SharedRwLock, SharedRwLockReadGuard, Locked, ToCssWithGuard};
|
||||
use std::fmt;
|
||||
use style_traits::{PARSING_MODE_DEFAULT, ToCss, ParseError, StyleParseError};
|
||||
use style_traits::PropertyDeclarationParseError;
|
||||
use stylearc::Arc;
|
||||
use stylesheets::{CssRuleType, StylesheetContents};
|
||||
use stylesheets::rule_parser::VendorPrefix;
|
||||
|
@ -532,7 +533,8 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for KeyframeDeclarationParser<'a, 'b> {
|
|||
|
||||
fn parse_value<'t>(&mut self, name: CompactCowStr<'i>, input: &mut Parser<'i, 't>)
|
||||
-> Result<(), ParseError<'i>> {
|
||||
let id = PropertyId::parse(name.into())?;
|
||||
let id = PropertyId::parse(&name)
|
||||
.map_err(|()| PropertyDeclarationParseError::UnknownProperty(name))?;
|
||||
match PropertyDeclaration::parse_into(self.declarations, id, self.context, input) {
|
||||
Ok(()) => {
|
||||
// In case there is still unparsed text in the declaration, we should roll back.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue