mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +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
|
@ -42,17 +42,17 @@ bitflags! {
|
|||
/// A flag used to mark styles which are a pseudo-element or under one.
|
||||
const IS_IN_PSEUDO_ELEMENT_SUBTREE = 1 << 4;
|
||||
|
||||
/// Whether this style inherits the `display` property.
|
||||
/// Whether this style's `display` property depends on our parent style.
|
||||
///
|
||||
/// This is important because it may affect our optimizations to avoid
|
||||
/// computing the style of pseudo-elements, given whether the
|
||||
/// pseudo-element is generated depends on the `display` value.
|
||||
const INHERITS_DISPLAY = 1 << 6;
|
||||
const DISPLAY_DEPENDS_ON_INHERITED_STYLE = 1 << 6;
|
||||
|
||||
/// Whether this style inherits the `content` property.
|
||||
/// Whether this style's `content` depends on our parent style.
|
||||
///
|
||||
/// Important because of the same reason.
|
||||
const INHERITS_CONTENT = 1 << 7;
|
||||
const CONTENT_DEPENDS_ON_INHERITED_STYLE = 1 << 7;
|
||||
|
||||
/// Whether the child explicitly inherits any reset property.
|
||||
const INHERITS_RESET_STYLE = 1 << 8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue