diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /servo/components/selectors/context.rs | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'servo/components/selectors/context.rs')
-rw-r--r-- | servo/components/selectors/context.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/servo/components/selectors/context.rs b/servo/components/selectors/context.rs index 289b081b64..c6870c6c96 100644 --- a/servo/components/selectors/context.rs +++ b/servo/components/selectors/context.rs @@ -70,6 +70,19 @@ impl VisitedHandlingMode { } } +/// The mode to use whether we should matching rules inside @starting-style. +/// https://drafts.csswg.org/css-transitions-2/#starting-style +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +pub enum IncludeStartingStyle { + /// All without rules inside @starting-style. This is for the most common case because the + /// primary/pseudo styles doesn't use rules inside @starting-style. + No, + /// Get the starting style. The starting style for an element as the after-change style with + /// @starting-style rules applied in addition. In other words, this matches all rules, + /// including rules inside @starting-style. + Yes, +} + /// Whether we need to set selector invalidation flags on elements for this /// match request. #[derive(Clone, Copy, Debug, PartialEq)] @@ -191,6 +204,12 @@ where /// Controls how matching for links is handled. visited_handling: VisitedHandlingMode, + /// Controls if we should match rules in @starting-style. + pub include_starting_style: IncludeStartingStyle, + + /// Whether there are any rules inside @starting-style. + pub has_starting_style: bool, + /// The current nesting level of selectors that we're matching. nesting_level: usize, @@ -239,6 +258,7 @@ where bloom_filter, selector_caches, VisitedHandlingMode::AllLinksUnvisited, + IncludeStartingStyle::No, quirks_mode, needs_selector_flags, matching_for_invalidation, @@ -251,6 +271,7 @@ where bloom_filter: Option<&'a BloomFilter>, selector_caches: &'a mut SelectorCaches, visited_handling: VisitedHandlingMode, + include_starting_style: IncludeStartingStyle, quirks_mode: QuirksMode, needs_selector_flags: NeedsSelectorFlags, matching_for_invalidation: MatchingForInvalidation, @@ -259,6 +280,8 @@ where matching_mode, bloom_filter, visited_handling, + include_starting_style, + has_starting_style: false, quirks_mode, classes_and_ids_case_sensitivity: quirks_mode.classes_and_ids_case_sensitivity(), needs_selector_flags, |