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:
Bobby Holley 2017-03-15 11:59:53 -07:00
parent e34aac03ff
commit 8cf331a498
14 changed files with 378 additions and 333 deletions

View file

@ -7,7 +7,7 @@ use parking_lot::RwLock;
use selectors::parser::LocalName as LocalNameSelector;
use servo_atoms::Atom;
use std::sync::Arc;
use style::properties::{PropertyDeclarationBlock, PropertyDeclaration, DeclaredValue};
use style::properties::{PropertyDeclarationBlock, PropertyDeclaration};
use style::properties::{longhands, Importance};
use style::rule_tree::CascadeLevel;
use style::selector_parser::SelectorParser;
@ -24,8 +24,8 @@ fn get_mock_rules(css_selectors: &[&str]) -> Vec<Vec<Rule>> {
let rule = Arc::new(RwLock::new(StyleRule {
selectors: selectors,
block: Arc::new(RwLock::new(PropertyDeclarationBlock::with_one(
PropertyDeclaration::Display(DeclaredValue::Value(
longhands::display::SpecifiedValue::block)),
PropertyDeclaration::Display(
longhands::display::SpecifiedValue::block),
Importance::Normal
))),
}));