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
impl CssPropertyCache
Sourcepub fn restyle(
&mut self,
css: &mut Css,
node_data: &NodeDataContainerRef<'_, NodeData>,
node_hierarchy: &NodeHierarchyItemVec,
non_leaf_nodes: &ParentWithNodeDepthVec,
html_tree: &NodeDataContainerRef<'_, CascadeInfo>,
) -> Vec<TagIdToNodeIdMapping>
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
pub fn get_computed_css_style_string( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> String
Source§impl CssPropertyCache
impl CssPropertyCache
pub fn empty(node_count: usize) -> Self
pub fn append(&mut self, other: &mut Self)
pub fn is_horizontal_overflow_visible( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool
pub fn is_vertical_overflow_visible( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool
pub fn get_text_color_or_default( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> StyleTextColor
Sourcepub fn get_font_id_or_default(
&self,
node_data: &NodeData,
node_id: &NodeId,
node_state: &StyledNodeState,
) -> StyleFontFamilyVec
pub fn get_font_id_or_default( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> StyleFontFamilyVec
Returns the font ID of the
pub fn get_font_size_or_default( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> StyleFontSize
pub fn has_border( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool
pub fn has_box_shadow( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool
pub fn get_property<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, css_property_type: &CssPropertyType, ) -> Option<&CssProperty>
pub fn get_background_content<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundContentVecValue>
pub fn get_background_position<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundPositionVecValue>
pub fn get_background_size<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundSizeVecValue>
pub fn get_background_repeat<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundRepeatVecValue>
pub fn get_font_size<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFontSizeValue>
pub fn get_font_family<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFontFamilyVecValue>
pub fn get_text_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextColorValue>
pub fn get_text_align<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextAlignValue>
pub fn get_line_height<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleLineHeightValue>
pub fn get_letter_spacing<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleLetterSpacingValue>
pub fn get_word_spacing<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleWordSpacingValue>
pub fn get_tab_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTabWidthValue>
pub fn get_cursor<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleCursorValue>
pub fn get_box_shadow_left<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>
pub fn get_box_shadow_right<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>
pub fn get_box_shadow_top<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>
pub fn get_box_shadow_bottom<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>
pub fn get_border_top_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderTopColorValue>
pub fn get_border_left_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderLeftColorValue>
pub fn get_border_right_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderRightColorValue>
pub fn get_border_bottom_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderBottomColorValue>
pub fn get_border_top_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderTopStyleValue>
pub fn get_border_left_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderLeftStyleValue>
pub fn get_border_right_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderRightStyleValue>
pub fn get_border_bottom_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderBottomStyleValue>
pub fn get_border_top_left_radius<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderTopLeftRadiusValue>
pub fn get_border_top_right_radius<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderTopRightRadiusValue>
pub fn get_border_bottom_left_radius<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderBottomLeftRadiusValue>
pub fn get_border_bottom_right_radius<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderBottomRightRadiusValue>
pub fn get_opacity<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleOpacityValue>
pub fn get_transform<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTransformVecValue>
pub fn get_transform_origin<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTransformOriginValue>
pub fn get_perspective_origin<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StylePerspectiveOriginValue>
pub fn get_backface_visibility<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackfaceVisibilityValue>
pub fn get_display<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutDisplayValue>
pub fn get_float<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFloatValue>
pub fn get_box_sizing<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBoxSizingValue>
pub fn get_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutWidthValue>
pub fn get_height<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutHeightValue>
pub fn get_min_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMinWidthValue>
pub fn get_min_height<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMinHeightValue>
pub fn get_max_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMaxWidthValue>
pub fn get_max_height<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMaxHeightValue>
pub fn get_position<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPositionValue>
pub fn get_top<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutTopValue>
pub fn get_bottom<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBottomValue>
pub fn get_right<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutRightValue>
pub fn get_left<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutLeftValue>
pub fn get_padding_top<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPaddingTopValue>
pub fn get_padding_bottom<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPaddingBottomValue>
pub fn get_padding_left<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPaddingLeftValue>
pub fn get_padding_right<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPaddingRightValue>
pub fn get_margin_top<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMarginTopValue>
pub fn get_margin_bottom<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMarginBottomValue>
pub fn get_margin_left<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMarginLeftValue>
pub fn get_margin_right<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMarginRightValue>
pub fn get_border_top_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBorderTopWidthValue>
pub fn get_border_left_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBorderLeftWidthValue>
pub fn get_border_right_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBorderRightWidthValue>
pub fn get_border_bottom_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBorderBottomWidthValue>
pub fn get_overflow_x<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutOverflowValue>
pub fn get_overflow_y<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutOverflowValue>
pub fn get_flex_direction<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFlexDirectionValue>
pub fn get_flex_wrap<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFlexWrapValue>
pub fn get_flex_grow<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFlexGrowValue>
pub fn get_flex_shrink<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFlexShrinkValue>
pub fn get_justify_content<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutJustifyContentValue>
pub fn get_align_items<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutAlignItemsValue>
pub fn get_align_content<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutAlignContentValue>
pub fn get_mix_blend_mode<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleMixBlendModeValue>
pub fn get_filter<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFilterVecValue>
pub fn get_backdrop_filter<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFilterVecValue>
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
impl Clone for CssPropertyCache
Source§fn clone(&self) -> CssPropertyCache
fn clone(&self) -> CssPropertyCache
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CssPropertyCache
impl Debug for CssPropertyCache
Source§impl Default for CssPropertyCache
impl Default for CssPropertyCache
Source§fn default() -> CssPropertyCache
fn default() -> CssPropertyCache
Returns the “default value” for a type. Read more
Source§impl PartialEq for CssPropertyCache
impl PartialEq for CssPropertyCache
impl StructuralPartialEq for CssPropertyCache
Auto Trait Implementations§
impl Freeze for CssPropertyCache
impl RefUnwindSafe for CssPropertyCache
impl Send for CssPropertyCache
impl Sync for CssPropertyCache
impl Unpin for CssPropertyCache
impl UnwindSafe for CssPropertyCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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