mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
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:
parent
60d89cfbc0
commit
74a46d96eb
4 changed files with 27 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue