mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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
|
@ -18,7 +18,7 @@ use shared_lock::{SharedRwLock, SharedRwLockReadGuard, Locked, ToCssWithGuard};
|
|||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
use style_traits::ToCss;
|
||||
use stylesheets::{MemoryHoleReporter, Stylesheet};
|
||||
use stylesheets::{CssRuleType, MemoryHoleReporter, Stylesheet};
|
||||
|
||||
/// A number from 0 to 1, indicating the percentage of the animation when this
|
||||
/// keyframe should run.
|
||||
|
@ -403,7 +403,7 @@ impl<'a, 'b> DeclarationParser for KeyframeDeclarationParser<'a, 'b> {
|
|||
|
||||
fn parse_value(&mut self, name: &str, input: &mut Parser) -> Result<ParsedDeclaration, ()> {
|
||||
let id = try!(PropertyId::parse(name.into()));
|
||||
match ParsedDeclaration::parse(id, self.context, input, true) {
|
||||
match ParsedDeclaration::parse(id, self.context, input, true, CssRuleType::Keyframe) {
|
||||
Ok(parsed) => {
|
||||
// In case there is still unparsed text in the declaration, we should roll back.
|
||||
if !input.is_exhausted() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue