style: Don't optimize ::before/::after away if content/display have been specified via custom properties.

We need to treat them the same way as we treat content: inherit.

Differential Revision: https://phabricator.services.mozilla.com/D90222
This commit is contained in:
Emilio Cobos Álvarez 2020-09-21 11:05:51 +00:00
parent 60d89cfbc0
commit 74a46d96eb
4 changed files with 27 additions and 8 deletions

View file

@ -139,13 +139,13 @@ fn eager_pseudo_is_definitely_not_generated(
return false;
}
if !style.flags.intersects(ComputedValueFlags::INHERITS_DISPLAY) &&
if !style.flags.intersects(ComputedValueFlags::DISPLAY_DEPENDS_ON_INHERITED_STYLE) &&
style.get_box().clone_display() == Display::None
{
return true;
}
if !style.flags.intersects(ComputedValueFlags::INHERITS_CONTENT) &&
if !style.flags.intersects(ComputedValueFlags::CONTENT_DEPENDS_ON_INHERITED_STYLE) &&
style.ineffective_content_property()
{
return true;