mirror of
https://github.com/servo/servo.git
synced 2025-08-18 11:55:39 +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
|
@ -10,7 +10,7 @@ use std::sync::Arc;
|
|||
use style::error_reporting::ParseErrorReporter;
|
||||
use style::media_queries::MediaList;
|
||||
use style::parser::ParserContextExtraData;
|
||||
use style::properties::{longhands, DeclaredValue, Importance, PropertyDeclaration, PropertyDeclarationBlock};
|
||||
use style::properties::{longhands, Importance, PropertyDeclaration, PropertyDeclarationBlock};
|
||||
use style::rule_tree::{CascadeLevel, RuleTree, StrongRuleNode, StyleSource};
|
||||
use style::stylesheets::{Origin, Stylesheet, CssRule};
|
||||
use test::{self, Bencher};
|
||||
|
@ -65,8 +65,8 @@ fn test_insertion(rule_tree: &RuleTree, rules: Vec<(StyleSource, CascadeLevel)>)
|
|||
fn test_insertion_style_attribute(rule_tree: &RuleTree, rules: &[(StyleSource, CascadeLevel)]) -> StrongRuleNode {
|
||||
let mut rules = rules.to_vec();
|
||||
rules.push((StyleSource::Declarations(Arc::new(RwLock::new(PropertyDeclarationBlock::with_one(
|
||||
PropertyDeclaration::Display(DeclaredValue::Value(
|
||||
longhands::display::SpecifiedValue::block)),
|
||||
PropertyDeclaration::Display(
|
||||
longhands::display::SpecifiedValue::block),
|
||||
Importance::Normal
|
||||
)))), CascadeLevel::UserNormal));
|
||||
test_insertion(rule_tree, rules)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue