mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
style: [css-properties-values-api] Implement parsing and serialization for @property at-rule
Implemented behind the new properties-and-values pref. Support for the CSSPropertyRule WebIDL interface is also added in this patch, because until it's added, any attempt to access the rule using the CSSOM would crash the browser. Depends on D178268 Differential Revision: https://phabricator.services.mozilla.com/D178270
This commit is contained in:
parent
87ce7045ef
commit
9c46eabe83
12 changed files with 312 additions and 3 deletions
|
@ -22,6 +22,8 @@ pub enum ContextualParseError<'a> {
|
|||
ParseError<'a>,
|
||||
Option<&'a SelectorList<SelectorImpl>>,
|
||||
),
|
||||
/// A property descriptor was not recognized.
|
||||
UnsupportedPropertyDescriptor(&'a str, ParseError<'a>),
|
||||
/// A font face descriptor was not recognized.
|
||||
UnsupportedFontFaceDescriptor(&'a str, ParseError<'a>),
|
||||
/// A font feature values descriptor was not recognized.
|
||||
|
@ -135,6 +137,14 @@ impl<'a> fmt::Display for ContextualParseError<'a> {
|
|||
write!(f, "Unsupported property declaration: '{}', ", decl)?;
|
||||
parse_error_to_str(err, f)
|
||||
},
|
||||
ContextualParseError::UnsupportedPropertyDescriptor(decl, ref err) => {
|
||||
write!(
|
||||
f,
|
||||
"Unsupported @property descriptor declaration: '{}', ",
|
||||
decl
|
||||
)?;
|
||||
parse_error_to_str(err, f)
|
||||
},
|
||||
ContextualParseError::UnsupportedFontFaceDescriptor(decl, ref err) => {
|
||||
write!(
|
||||
f,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue