style: Only store applicable ::before / ::after pseudo styles during the traversal.

This commit is contained in:
Emilio Cobos Álvarez 2017-08-24 11:09:33 +02:00
parent 5a57a3ef4b
commit ff700aba75
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 136 additions and 28 deletions

View file

@ -702,7 +702,7 @@ pub fn process_resolved_style_request<'a, N>(context: &LayoutContext,
thread_local: &mut tlc,
};
let styles = resolve_style(&mut context, element, RuleInclusion::All, false);
let styles = resolve_style(&mut context, element, RuleInclusion::All, false, pseudo.as_ref());
let style = styles.primary();
let longhand_id = match *property {
PropertyId::Longhand(id) => id,