style: Allow propagating computed style bits from the selector-matching process

This allows us to propagate flags from the container query styles all the
way to the computed style of the element.

The flag for viewport units in container queries has to be different
because it requires rematching, see comments.

Depends on D159851

Differential Revision: https://phabricator.services.mozilla.com/D159852
This commit is contained in:
Emilio Cobos Álvarez 2022-10-20 14:24:36 +00:00 committed by Martin Robinson
parent bfa293c5c5
commit 5ded58a2b1
10 changed files with 92 additions and 14 deletions

View file

@ -4,6 +4,7 @@
//! Gecko-specific bits for selector-parsing.
use crate::computed_value_flags::ComputedValueFlags;
use crate::gecko_bindings::structs::RawServoSelectorList;
use crate::gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
use crate::invalidation::element::document_state::InvalidationMatchingData;
@ -236,6 +237,10 @@ pub struct SelectorImpl;
pub struct ExtraMatchingData {
/// The invalidation data to invalidate doc-state pseudo-classes correctly.
pub invalidation_data: InvalidationMatchingData,
/// The invalidation bits from matching container queries. These are here
/// just for convenience mostly.
pub cascade_input_flags: ComputedValueFlags,
}
impl ::selectors::SelectorImpl for SelectorImpl {