Move match and cascade temporaries to CurrentElementInfo

Before this change, the `ComputedStyle` struct that is part of permanent style
data per element holds 2 `StrongRuleNode`s (unvisited and visited) and 2
`Arc<ComputedValues>` (unvisited and visited).

Both rule nodes and the visited values don't actually need to be here.  This
patch moves these 3 to new temporary storage in `CascadeInputs` on
`CurrentElementInfo` during the match and cascade process.  Rule nodes are
pushed down inside the `ComputedValues` for later access after the cascade.
(Visited values were already available there.)

The permanent style data per element now has just the `Arc<ComputedValues>` for
itself and eager pseudo-elements (plus the `RestyleHint`).

MozReview-Commit-ID: 3wq52ERMpdi
This commit is contained in:
J. Ryan Stinnett 2017-06-13 12:51:37 -05:00
parent c3b2a2f4de
commit 2b5c56e6a8
19 changed files with 738 additions and 746 deletions

View file

@ -28,8 +28,8 @@ pub fn same_computed_values<E>(first: Option<E>, second: Option<E>) -> bool
_ => return false,
};
let eq = Arc::ptr_eq(a.borrow_data().unwrap().styles().primary.values(),
b.borrow_data().unwrap().styles().primary.values());
let eq = Arc::ptr_eq(a.borrow_data().unwrap().styles.primary(),
b.borrow_data().unwrap().styles.primary());
eq
}