Skip to main content

AncestorContext

Struct AncestorContext 

Source
pub(crate) struct AncestorContext<'a> {
    pub(crate) node: &'a Node,
    pub(crate) sibling_index: Option<usize>,
    pub(crate) sibling_count: Option<usize>,
    pub(crate) bloom: AncestorBloom,
    pub(crate) display: Option<&'static str>,
    pub(crate) is_container: bool,
    pub(crate) container_name: Option<ContainerName>,
    pub(crate) container_size: Option<ContainerSize>,
    pub(crate) in_disabled_fieldset: bool,
}

Fields§

§node: &'a Node§sibling_index: Option<usize>§sibling_count: Option<usize>§bloom: AncestorBloom

この要素とその祖先すべての特徴(rule_index::AncestorBloom)。子の照合で、 子孫セレクタの左側に必要な特徴が祖先に無い規則を照合前に外すのに使う。

§display: Option<&'static str>

この要素の display(子の display:inherit の解決用。主な値のみ、他は None)。

§is_container: bool

この要素が問い合わせコンテナ(container-type: size | inline-size)であるか

§container_name: Option<ContainerName>

コンテナ名(指定があれば)

§container_size: Option<ContainerSize>

コンテナの寸法(幅・高さ px)

§in_disabled_fieldset: bool

この要素か祖先に disabled の付いた <fieldset> があるか(2026-11-18、TODO R5 (e) ④)。 子の :disabled の判定で祖先を全部たどらないため(512 段の入れ子では要素ごとに 512 回の比較になっていた)。

Trait Implementations§

Source§

impl<'a> Clone for AncestorContext<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for AncestorContext<'a>

Source§

impl<'a> Debug for AncestorContext<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for AncestorContext<'a>

§

impl<'a> RefUnwindSafe for AncestorContext<'a>

§

impl<'a> Send for AncestorContext<'a>

§

impl<'a> Sync for AncestorContext<'a>

§

impl<'a> Unpin for AncestorContext<'a>

§

impl<'a> UnsafeUnpin for AncestorContext<'a>

§

impl<'a> UnwindSafe for AncestorContext<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.