mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Rearrange PropertyDeclaration to avoid embedding DeclaredValue.
From https://bugzilla.mozilla.org/show_bug.cgi?id=1347719 This effectively combines the discriminants of the two enums and reduces the size of PropertyDeclaration by one word. MozReview-Commit-ID: 9rCRiSVZTQT
This commit is contained in:
parent
e34aac03ff
commit
8cf331a498
14 changed files with 378 additions and 333 deletions
|
@ -11,7 +11,7 @@ use cssparser::{DeclarationListParser, DeclarationParser, parse_one_rule};
|
|||
use parking_lot::RwLock;
|
||||
use parser::{ParserContext, ParserContextExtraData, log_css_error};
|
||||
use properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock, PropertyId};
|
||||
use properties::{PropertyDeclarationId, LonghandId, DeclaredValue, ParsedDeclaration};
|
||||
use properties::{PropertyDeclarationId, LonghandId, ParsedDeclaration};
|
||||
use properties::LonghandIdSet;
|
||||
use properties::animated_properties::TransitionProperty;
|
||||
use properties::longhands::transition_timing_function::single_value::SpecifiedValue as SpecifiedTimingFunction;
|
||||
|
@ -210,14 +210,11 @@ impl KeyframesStep {
|
|||
guard.get(PropertyDeclarationId::Longhand(LonghandId::AnimationTimingFunction)).unwrap();
|
||||
match *declaration {
|
||||
PropertyDeclaration::AnimationTimingFunction(ref value) => {
|
||||
match *value {
|
||||
DeclaredValue::Value(ref value) => {
|
||||
// Use the first value.
|
||||
Some(value.0[0])
|
||||
},
|
||||
_ => None,
|
||||
}
|
||||
// Use the first value.
|
||||
Some(value.0[0])
|
||||
},
|
||||
PropertyDeclaration::CSSWideKeyword(..) => None,
|
||||
PropertyDeclaration::WithVariables(..) => None,
|
||||
_ => panic!(),
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue