mirror of
https://github.com/servo/servo.git
synced 2025-08-25 15:18:22 +01:00
style: Cleanup ParserContext::new_with_rule_type.
This commit is contained in:
parent
4763d05cf0
commit
a962c54928
8 changed files with 118 additions and 40 deletions
|
@ -322,14 +322,17 @@ macro_rules! font_feature_values_blocks {
|
|||
}
|
||||
}
|
||||
|
||||
fn parse_block<'t>(&mut self, prelude: Self::Prelude, input: &mut Parser<'i, 't>)
|
||||
-> Result<Self::AtRule, ParseError<'i>> {
|
||||
let context = ParserContext::new_with_rule_type(self.context, Some(CssRuleType::FontFeatureValues));
|
||||
fn parse_block<'t>(
|
||||
&mut self,
|
||||
prelude: Self::Prelude,
|
||||
input: &mut Parser<'i, 't>
|
||||
) -> Result<Self::AtRule, ParseError<'i>> {
|
||||
debug_assert_eq!(self.context.rule_type(), CssRuleType::FontFeatureValues);
|
||||
match prelude {
|
||||
$(
|
||||
BlockType::$ident_camel => {
|
||||
let parser = FFVDeclarationsParser {
|
||||
context: &context,
|
||||
context: &self.context,
|
||||
declarations: &mut self.rule.$ident,
|
||||
};
|
||||
|
||||
|
@ -338,7 +341,7 @@ macro_rules! font_feature_values_blocks {
|
|||
if let Err(err) = declaration {
|
||||
let error = ContextualParseError::UnsupportedKeyframePropertyDeclaration(
|
||||
err.slice, err.error);
|
||||
context.log_css_error(err.location, error);
|
||||
self.context.log_css_error(err.location, error);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue