mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
style: Restyle pseudo-elements as well on part attribute changes
Refactor a bit the code to unify how we deal with this conditional restyling (we had similar code for MustCascadeChildrenIfInheritResetStyle). Differential Revision: https://phabricator.services.mozilla.com/D172890
This commit is contained in:
parent
398df68d38
commit
78c1c53ccd
6 changed files with 132 additions and 180 deletions
|
@ -75,13 +75,6 @@ pub enum ChildRestyleRequirement {
|
|||
MustMatchDescendants = 4,
|
||||
}
|
||||
|
||||
impl ChildRestyleRequirement {
|
||||
/// Whether we can unconditionally skip the cascade.
|
||||
pub fn can_skip_cascade(&self) -> bool {
|
||||
matches!(*self, ChildRestyleRequirement::CanSkipCascade)
|
||||
}
|
||||
}
|
||||
|
||||
/// Determines which styles are being cascaded currently.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
enum CascadeVisitedMode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue