Match eager pseudos after the primary cascade.

This is necessary in order to make the computation of eager pseudos depend on
the primary ComputedValues, which we want to do for ::first-letter/::first-line.

This also fixes a bug where the behavior of EagerPseudoStyles::is_empty was reversed
in both the implementation and the callsite.

MozReview-Commit-ID: EXBxclyHWXu
This commit is contained in:
Bobby Holley 2017-04-05 19:17:59 -07:00
parent 19743a67ba
commit 8acb4ed87c
3 changed files with 132 additions and 83 deletions

View file

@ -80,7 +80,7 @@ pub struct EagerPseudoStyles(Option<Box<[Option<ComputedStyle>]>>);
impl EagerPseudoStyles {
/// Returns whether there are any pseudo styles.
pub fn is_empty(&self) -> bool {
self.0.is_some()
self.0.is_none()
}
/// Returns a reference to the style for a given eager pseudo, if it exists.