mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Ignore non-margin properties in @page rule
Extend Servo's @page parsing to match Gecko's CSS 2.2 behavior, where only margin properties are allowed in an @page rule. Other properties are ignored. MozReview-Commit-ID: IPYUlnkLYSb
This commit is contained in:
parent
f0e849cbd8
commit
981571f4f8
10 changed files with 47 additions and 20 deletions
|
@ -9,6 +9,7 @@ use parser::ParserContext;
|
|||
use properties::{PropertyId, ParsedDeclaration};
|
||||
use std::fmt;
|
||||
use style_traits::ToCss;
|
||||
use stylesheets::CssRuleType;
|
||||
|
||||
#[derive(Debug)]
|
||||
/// An @supports condition
|
||||
|
@ -211,7 +212,7 @@ impl Declaration {
|
|||
return false
|
||||
};
|
||||
let mut input = Parser::new(&self.val);
|
||||
let res = ParsedDeclaration::parse(id, cx, &mut input, /* in_keyframe */ false);
|
||||
let res = ParsedDeclaration::parse(id, cx, &mut input, /* in_keyframe */ false, CssRuleType::Style);
|
||||
let _ = input.try(parse_important);
|
||||
res.is_ok() && input.is_exhausted()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue