mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Fix elements not being query containers for the pseudo-element they originate. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D164807
This commit is contained in:
parent
c511b9c3f9
commit
661e7d5c48
5 changed files with 129 additions and 50 deletions
|
@ -8,6 +8,7 @@ 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;
|
||||
use crate::properties::ComputedValues;
|
||||
use crate::selector_parser::{Direction, HorizontalDirection, SelectorParser};
|
||||
use crate::str::starts_with_ignore_ascii_case;
|
||||
use crate::string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
|
||||
|
@ -17,6 +18,7 @@ use cssparser::{CowRcStr, SourceLocation, ToCss, Token};
|
|||
use dom::{DocumentState, ElementState};
|
||||
use selectors::parser::SelectorParseErrorKind;
|
||||
use selectors::SelectorList;
|
||||
use servo_arc::Arc;
|
||||
use std::fmt;
|
||||
use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss as ToCss_};
|
||||
|
||||
|
@ -233,7 +235,7 @@ pub struct SelectorImpl;
|
|||
|
||||
/// A set of extra data to carry along with the matching context, either for
|
||||
/// selector-matching or invalidation.
|
||||
#[derive(Debug, Default)]
|
||||
#[derive(Default)]
|
||||
pub struct ExtraMatchingData {
|
||||
/// The invalidation data to invalidate doc-state pseudo-classes correctly.
|
||||
pub invalidation_data: InvalidationMatchingData,
|
||||
|
@ -241,6 +243,10 @@ pub struct ExtraMatchingData {
|
|||
/// The invalidation bits from matching container queries. These are here
|
||||
/// just for convenience mostly.
|
||||
pub cascade_input_flags: ComputedValueFlags,
|
||||
|
||||
/// The style of the originating element in order to evaluate @container
|
||||
/// size queries affecting pseudo-elements.
|
||||
pub originating_element_style: Option<Arc<ComputedValues>>,
|
||||
}
|
||||
|
||||
impl ::selectors::SelectorImpl for SelectorImpl {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue