CssPropertyCache

Struct CssPropertyCache 

Source
pub struct CssPropertyCache {
    pub node_count: usize,
    pub user_overridden_properties: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>,
    pub cascaded_normal_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>,
    pub cascaded_hover_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>,
    pub cascaded_active_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>,
    pub cascaded_focus_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>,
    pub css_normal_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>,
    pub css_hover_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>,
    pub css_active_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>,
    pub css_focus_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>,
}

Fields§

§node_count: usize§user_overridden_properties: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>§cascaded_normal_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>§cascaded_hover_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>§cascaded_active_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>§cascaded_focus_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>§css_normal_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>§css_hover_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>§css_active_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>§css_focus_props: BTreeMap<NodeId, BTreeMap<CssPropertyType, CssProperty>>

Implementations§

Source§

impl CssPropertyCache

Source

pub fn restyle( &mut self, css: &mut Css, node_data: &NodeDataContainerRef<'_, NodeData>, node_hierarchy: &NodeHierarchyItemVec, non_leaf_nodes: &ParentWithNodeDepthVec, html_tree: &NodeDataContainerRef<'_, CascadeInfo>, ) -> Vec<TagIdToNodeIdMapping>

Restyles the CSS property cache with a new CSS file

Source

pub fn get_computed_css_style_string( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> String

Source§

impl CssPropertyCache

Source

pub fn empty(node_count: usize) -> Self

Source

pub fn append(&mut self, other: &mut Self)

Source

pub fn is_horizontal_overflow_visible( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool

Source

pub fn is_vertical_overflow_visible( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool

Source

pub fn is_horizontal_overflow_hidden( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool

Source

pub fn is_vertical_overflow_hidden( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool

Source

pub fn get_text_color_or_default( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> StyleTextColor

Source

pub fn get_font_id_or_default( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> StyleFontFamilyVec

Returns the font ID of the

Source

pub fn get_font_size_or_default( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> StyleFontSize

Source

pub fn has_border( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool

Source

pub fn has_box_shadow( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool

Source

pub fn get_property<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, css_property_type: &CssPropertyType, ) -> Option<&CssProperty>

Source

pub fn get_background_content<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundContentVecValue>

Source

pub fn get_background_position<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundPositionVecValue>

Source

pub fn get_background_size<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundSizeVecValue>

Source

pub fn get_background_repeat<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundRepeatVecValue>

Source

pub fn get_font_size<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFontSizeValue>

Source

pub fn get_font_family<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFontFamilyVecValue>

Source

pub fn get_text_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextColorValue>

Source

pub fn get_text_align<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextAlignValue>

Source

pub fn get_line_height<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleLineHeightValue>

Source

pub fn get_letter_spacing<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleLetterSpacingValue>

Source

pub fn get_word_spacing<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleWordSpacingValue>

Source

pub fn get_tab_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTabWidthValue>

Source

pub fn get_cursor<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleCursorValue>

Source

pub fn get_box_shadow_left<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>

Source

pub fn get_box_shadow_right<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>

Source

pub fn get_box_shadow_top<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>

Source

pub fn get_box_shadow_bottom<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>

Source

pub fn get_border_top_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderTopColorValue>

Source

pub fn get_border_left_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderLeftColorValue>

Source

pub fn get_border_right_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderRightColorValue>

Source

pub fn get_border_bottom_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderBottomColorValue>

Source

pub fn get_border_top_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderTopStyleValue>

Source

pub fn get_border_left_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderLeftStyleValue>

Source

pub fn get_border_right_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderRightStyleValue>

Source

pub fn get_border_bottom_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderBottomStyleValue>

Source

pub fn get_border_top_left_radius<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderTopLeftRadiusValue>

Source

pub fn get_border_top_right_radius<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderTopRightRadiusValue>

Source

pub fn get_border_bottom_left_radius<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderBottomLeftRadiusValue>

Source

pub fn get_border_bottom_right_radius<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderBottomRightRadiusValue>

Source

pub fn get_opacity<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleOpacityValue>

Source

pub fn get_transform<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTransformVecValue>

Source

pub fn get_transform_origin<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTransformOriginValue>

Source

pub fn get_perspective_origin<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StylePerspectiveOriginValue>

Source

pub fn get_backface_visibility<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackfaceVisibilityValue>

Source

pub fn get_display<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutDisplayValue>

Source

pub fn get_float<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFloatValue>

Source

pub fn get_box_sizing<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBoxSizingValue>

Source

pub fn get_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutWidthValue>

Source

pub fn get_height<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutHeightValue>

Source

pub fn get_min_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMinWidthValue>

Source

pub fn get_min_height<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMinHeightValue>

Source

pub fn get_max_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMaxWidthValue>

Source

pub fn get_max_height<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMaxHeightValue>

Source

pub fn get_position<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPositionValue>

Source

pub fn get_top<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutTopValue>

Source

pub fn get_bottom<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBottomValue>

Source

pub fn get_right<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutRightValue>

Source

pub fn get_left<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutLeftValue>

Source

pub fn get_padding_top<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPaddingTopValue>

Source

pub fn get_padding_bottom<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPaddingBottomValue>

Source

pub fn get_padding_left<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPaddingLeftValue>

Source

pub fn get_padding_right<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPaddingRightValue>

Source

pub fn get_margin_top<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMarginTopValue>

Source

pub fn get_margin_bottom<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMarginBottomValue>

Source

pub fn get_margin_left<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMarginLeftValue>

Source

pub fn get_margin_right<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMarginRightValue>

Source

pub fn get_border_top_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBorderTopWidthValue>

Source

pub fn get_border_left_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBorderLeftWidthValue>

Source

pub fn get_border_right_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBorderRightWidthValue>

Source

pub fn get_border_bottom_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBorderBottomWidthValue>

Source

pub fn get_overflow_x<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutOverflowValue>

Source

pub fn get_overflow_y<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutOverflowValue>

Source

pub fn get_flex_direction<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFlexDirectionValue>

Source

pub fn get_flex_wrap<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFlexWrapValue>

Source

pub fn get_flex_grow<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFlexGrowValue>

Source

pub fn get_flex_shrink<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFlexShrinkValue>

Source

pub fn get_justify_content<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutJustifyContentValue>

Source

pub fn get_align_items<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutAlignItemsValue>

Source

pub fn get_align_content<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutAlignContentValue>

Source

pub fn get_mix_blend_mode<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleMixBlendModeValue>

Source

pub fn get_filter<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFilterVecValue>

Source

pub fn get_backdrop_filter<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFilterVecValue>

Source

pub fn get_text_shadow<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>

Trait Implementations§

Source§

impl Clone for CssPropertyCache

Source§

fn clone(&self) -> CssPropertyCache

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for CssPropertyCache

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for CssPropertyCache

Source§

fn default() -> CssPropertyCache

Returns the “default value” for a type. Read more
Source§

impl PartialEq for CssPropertyCache

Source§

fn eq(&self, other: &CssPropertyCache) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for CssPropertyCache

Auto Trait Implementations§

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.