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

@ -2691,6 +2691,14 @@ impl<'a> StyleBuilder<'a> {
self.inherited_style_ignoring_first_line.get_${property.style_struct.name_lower}();
% endif
% if property.ident == "content":
self.flags.insert(::properties::computed_value_flags::INHERITS_CONTENT);
% endif
% if property.ident == "display":
self.flags.insert(::properties::computed_value_flags::INHERITS_DISPLAY);
% endif
self.${property.style_struct.ident}.mutate()
.copy_${property.ident}_from(
inherited_struct,