style: Update StyleSource to use ArcUnion.

Bug: 1455784
Reviewed-by: Manishearth
MozReview-Commit-ID: AT4sud9goGV
This commit is contained in:
Bobby Holley 2018-04-20 16:28:33 -07:00 committed by Emilio Cobos Álvarez
parent cbbefebdba
commit 48558e313a
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 99 additions and 109 deletions

View file

@ -1523,7 +1523,7 @@ impl Stylist {
// just avoid allocating it and calling `apply_declarations` directly,
// maybe...
let rule_node = self.rule_tree.insert_ordered_rules(iter::once((
StyleSource::Declarations(declarations),
StyleSource::from_declarations(declarations),
CascadeLevel::StyleAttributeNormal,
)));
@ -2177,7 +2177,7 @@ impl CascadeData {
.expect("Expected precomputed declarations for the UA level")
.get_or_insert_with(&pseudo.canonical(), Vec::new)
.push(ApplicableDeclarationBlock::new(
StyleSource::Style(locked.clone()),
StyleSource::from_rule(locked.clone()),
self.rules_source_order,
CascadeLevel::UANormal,
selector.specificity(),
@ -2480,7 +2480,7 @@ impl Rule {
level: CascadeLevel,
shadow_cascade_order: ShadowCascadeOrder,
) -> ApplicableDeclarationBlock {
let source = StyleSource::Style(self.style_rule.clone());
let source = StyleSource::from_rule(self.style_rule.clone());
ApplicableDeclarationBlock::new(source, self.source_order, level, self.specificity(), shadow_cascade_order)
}