pub struct StyleBuilder<'a> {
Show 31 fields pub device: &'a Device, inherited_style: &'a ComputedValues, inherited_style_ignoring_first_line: &'a ComputedValues, reset_style: &'a ComputedValues, pub rules: Option<StrongRuleNode>, custom_properties: Option<Arc<CustomPropertiesMap>>, pub pseudo: Option<&'a PseudoElement>, modified_reset: bool, pub is_root_element: bool, pub writing_mode: WritingMode, pub flags: Cell<ComputedValueFlags>, visited_style: Option<Arc<ComputedValues>>, background: StyleStructRef<'a, Background>, border: StyleStructRef<'a, Border>, box_: StyleStructRef<'a, Box>, column: StyleStructRef<'a, Column>, counters: StyleStructRef<'a, Counters>, effects: StyleStructRef<'a, Effects>, font: StyleStructRef<'a, Font>, inherited_box: StyleStructRef<'a, InheritedBox>, inherited_table: StyleStructRef<'a, InheritedTable>, inherited_text: StyleStructRef<'a, InheritedText>, inherited_ui: StyleStructRef<'a, InheritedUI>, list: StyleStructRef<'a, List>, margin: StyleStructRef<'a, Margin>, outline: StyleStructRef<'a, Outline>, padding: StyleStructRef<'a, Padding>, position: StyleStructRef<'a, Position>, table: StyleStructRef<'a, Table>, text: StyleStructRef<'a, Text>, ui: StyleStructRef<'a, UI>,
}
Expand description

A type used to compute a struct with minimal overhead.

This allows holding references to the parent/default computed values without actually cloning them, until we either build the style, or mutate the inherited value.

Fields§

§device: &'a Device

The device we’re using to compute style.

This provides access to viewport unit ratios, etc.

§inherited_style: &'a ComputedValues

The style we’re inheriting from.

This is effectively parent_style.unwrap_or(device.default_computed_values()).

§inherited_style_ignoring_first_line: &'a ComputedValues

The style we’re inheriting from for properties that don’t inherit from ::first-line. This is the same as inherited_style, unless inherited_style is a ::first-line style.

§reset_style: &'a ComputedValues

The style we’re getting reset structs from.

§rules: Option<StrongRuleNode>

The rule node representing the ordered list of rules matched for this node.

§custom_properties: Option<Arc<CustomPropertiesMap>>§pseudo: Option<&'a PseudoElement>

The pseudo-element this style will represent.

§modified_reset: bool

Whether we have mutated any reset structs since the the last time clear_modified_reset was called. This is used to tell whether the StyleAdjuster did any work.

§is_root_element: bool

Whether this is the style for the root element.

§writing_mode: WritingMode

The writing mode flags.

TODO(emilio): Make private.

§flags: Cell<ComputedValueFlags>

Flags for the computed value.

§visited_style: Option<Arc<ComputedValues>>

The element’s style if visited, only computed if there’s a relevant link for this element. A element’s “relevant link” is the element being matched if it is a link or the nearest ancestor link.

§background: StyleStructRef<'a, Background>§border: StyleStructRef<'a, Border>§box_: StyleStructRef<'a, Box>§column: StyleStructRef<'a, Column>§counters: StyleStructRef<'a, Counters>§effects: StyleStructRef<'a, Effects>§font: StyleStructRef<'a, Font>§inherited_box: StyleStructRef<'a, InheritedBox>§inherited_table: StyleStructRef<'a, InheritedTable>§inherited_text: StyleStructRef<'a, InheritedText>§inherited_ui: StyleStructRef<'a, InheritedUI>§list: StyleStructRef<'a, List>§margin: StyleStructRef<'a, Margin>§outline: StyleStructRef<'a, Outline>§padding: StyleStructRef<'a, Padding>§position: StyleStructRef<'a, Position>§table: StyleStructRef<'a, Table>§text: StyleStructRef<'a, Text>§ui: StyleStructRef<'a, UI>

Implementations§

source§

impl<'a> StyleBuilder<'a>

source

fn new(
    device: &'a Device,
    parent_style: Option<&'a ComputedValues>,
    parent_style_ignoring_first_line: Option<&'a ComputedValues>,
    pseudo: Option<&'a PseudoElement>,
    rules: Option<StrongRuleNode>,
    custom_properties: Option<Arc<CustomPropertiesMap>>,
    is_root_element: bool
) -> Self

Trivially construct a StyleBuilder.

source

pub fn for_animation(
    device: &'a Device,
    style_to_derive_from: &'a ComputedValues,
    parent_style: Option<&'a ComputedValues>
) -> Self

NOTE(emilio): This is done so we can compute relative units with respect to the parent style, but all the early properties / writing-mode / etc are already set to the right ones on the kid.

Do not actually call this to construct a style, this should mostly be used for animations.

source

pub fn copy_reset_from(&mut self, style: &'a ComputedValues)

Copy the reset properties from style.

source

pub fn inherit_align_content(&mut self)

Inherit align_content from our parent style.

source

pub fn set_align_content(&mut self, value: T)

Set the align_content to the computed value value.

source

pub fn inherit_align_items(&mut self)

Inherit align_items from our parent style.

source

pub fn set_align_items(&mut self, value: T)

Set the align_items to the computed value value.

source

pub fn inherit_align_self(&mut self)

Inherit align_self from our parent style.

source

pub fn set_align_self(&mut self, value: T)

Set the align_self to the computed value value.

source

pub fn inherit_aspect_ratio(&mut self)

Inherit aspect_ratio from our parent style.

source

pub fn set_aspect_ratio(&mut self, value: T)

Set the aspect_ratio to the computed value value.

source

pub fn inherit_backface_visibility(&mut self)

Inherit backface_visibility from our parent style.

source

pub fn set_backface_visibility(&mut self, value: T)

Set the backface_visibility to the computed value value.

source

pub fn reset_border_collapse(&mut self)

Reset border_collapse to the initial value.

source

pub fn set_border_collapse(&mut self, value: T)

Set the border_collapse to the computed value value.

source

pub fn inherit_border_image_repeat(&mut self)

Inherit border_image_repeat from our parent style.

source

pub fn set_border_image_repeat(&mut self, value: T)

Set the border_image_repeat to the computed value value.

source

pub fn inherit_box_sizing(&mut self)

Inherit box_sizing from our parent style.

source

pub fn set_box_sizing(&mut self, value: T)

Set the box_sizing to the computed value value.

source

pub fn reset_caption_side(&mut self)

Reset caption_side to the initial value.

source

pub fn set_caption_side(&mut self, value: T)

Set the caption_side to the computed value value.

source

pub fn inherit_clear(&mut self)

Inherit clear from our parent style.

source

pub fn set_clear(&mut self, value: T)

Set the clear to the computed value value.

source

pub fn inherit_column_count(&mut self)

Inherit column_count from our parent style.

source

pub fn set_column_count(&mut self, value: T)

Set the column_count to the computed value value.

source

pub fn inherit_column_span(&mut self)

Inherit column_span from our parent style.

source

pub fn set_column_span(&mut self, value: T)

Set the column_span to the computed value value.

source

pub fn inherit_container_type(&mut self)

Inherit container_type from our parent style.

source

pub fn set_container_type(&mut self, value: T)

Set the container_type to the computed value value.

source

pub fn reset_direction(&mut self)

Reset direction to the initial value.

source

pub fn set_direction(&mut self, value: T)

Set the direction to the computed value value.

source

pub fn inherit_display(&mut self)

Inherit display from our parent style.

source

pub fn set_display(&mut self, value: T)

Set the display to the computed value value.

source

pub fn reset_empty_cells(&mut self)

Reset empty_cells to the initial value.

source

pub fn set_empty_cells(&mut self, value: T)

Set the empty_cells to the computed value value.

source

pub fn inherit_flex_direction(&mut self)

Inherit flex_direction from our parent style.

source

pub fn set_flex_direction(&mut self, value: T)

Set the flex_direction to the computed value value.

source

pub fn inherit_flex_wrap(&mut self)

Inherit flex_wrap from our parent style.

source

pub fn set_flex_wrap(&mut self, value: T)

Set the flex_wrap to the computed value value.

source

pub fn inherit_float(&mut self)

Inherit float from our parent style.

source

pub fn set_float(&mut self, value: T)

Set the float to the computed value value.

source

pub fn reset_font_stretch(&mut self)

Reset font_stretch to the initial value.

source

pub fn set_font_stretch(&mut self, value: T)

Set the font_stretch to the computed value value.

source

pub fn reset_font_style(&mut self)

Reset font_style to the initial value.

source

pub fn set_font_style(&mut self, value: T)

Set the font_style to the computed value value.

source

pub fn reset_font_variant_caps(&mut self)

Reset font_variant_caps to the initial value.

source

pub fn set_font_variant_caps(&mut self, value: T)

Set the font_variant_caps to the computed value value.

source

pub fn reset_font_weight(&mut self)

Reset font_weight to the initial value.

source

pub fn set_font_weight(&mut self, value: T)

Set the font_weight to the computed value value.

source

pub fn reset_image_rendering(&mut self)

Reset image_rendering to the initial value.

source

pub fn set_image_rendering(&mut self, value: T)

Set the image_rendering to the computed value value.

source

pub fn inherit_justify_content(&mut self)

Inherit justify_content from our parent style.

source

pub fn set_justify_content(&mut self, value: T)

Set the justify_content to the computed value value.

source

pub fn reset_list_style_position(&mut self)

Reset list_style_position to the initial value.

source

pub fn set_list_style_position(&mut self, value: T)

Set the list_style_position to the computed value value.

source

pub fn reset_list_style_type(&mut self)

Reset list_style_type to the initial value.

source

pub fn set_list_style_type(&mut self, value: T)

Set the list_style_type to the computed value value.

source

pub fn inherit_mix_blend_mode(&mut self)

Inherit mix_blend_mode from our parent style.

source

pub fn set_mix_blend_mode(&mut self, value: T)

Set the mix_blend_mode to the computed value value.

source

pub fn inherit_opacity(&mut self)

Inherit opacity from our parent style.

source

pub fn set_opacity(&mut self, value: T)

Set the opacity to the computed value value.

source

pub fn inherit_order(&mut self)

Inherit order from our parent style.

source

pub fn set_order(&mut self, value: T)

Set the order to the computed value value.

source

pub fn inherit_outline_style(&mut self)

Inherit outline_style from our parent style.

source

pub fn set_outline_style(&mut self, value: T)

Set the outline_style to the computed value value.

source

pub fn reset_overflow_wrap(&mut self)

Reset overflow_wrap to the initial value.

source

pub fn set_overflow_wrap(&mut self, value: T)

Set the overflow_wrap to the computed value value.

source

pub fn reset_pointer_events(&mut self)

Reset pointer_events to the initial value.

source

pub fn set_pointer_events(&mut self, value: T)

Set the pointer_events to the computed value value.

source

pub fn inherit_position(&mut self)

Inherit position from our parent style.

source

pub fn set_position(&mut self, value: T)

Set the position to the computed value value.

source

pub fn inherit__servo_overflow_clip_box(&mut self)

Inherit _servo_overflow_clip_box from our parent style.

source

pub fn set__servo_overflow_clip_box(&mut self, value: T)

Set the _servo_overflow_clip_box to the computed value value.

source

pub fn inherit__servo_top_layer(&mut self)

Inherit _servo_top_layer from our parent style.

source

pub fn set__servo_top_layer(&mut self, value: T)

Set the _servo_top_layer to the computed value value.

source

pub fn inherit_table_layout(&mut self)

Inherit table_layout from our parent style.

source

pub fn set_table_layout(&mut self, value: T)

Set the table_layout to the computed value value.

source

pub fn reset_text_align(&mut self)

Reset text_align to the initial value.

source

pub fn set_text_align(&mut self, value: T)

Set the text_align to the computed value value.

source

pub fn inherit_text_decoration_line(&mut self)

Inherit text_decoration_line from our parent style.

source

pub fn set_text_decoration_line(&mut self, value: T)

Set the text_decoration_line to the computed value value.

source

pub fn inherit_text_decoration_style(&mut self)

Inherit text_decoration_style from our parent style.

source

pub fn set_text_decoration_style(&mut self, value: T)

Set the text_decoration_style to the computed value value.

source

pub fn reset_text_justify(&mut self)

Reset text_justify to the initial value.

source

pub fn set_text_justify(&mut self, value: T)

Set the text_justify to the computed value value.

source

pub fn reset_text_rendering(&mut self)

Reset text_rendering to the initial value.

source

pub fn set_text_rendering(&mut self, value: T)

Set the text_rendering to the computed value value.

source

pub fn reset_text_transform(&mut self)

Reset text_transform to the initial value.

source

pub fn set_text_transform(&mut self, value: T)

Set the text_transform to the computed value value.

source

pub fn inherit_transform_style(&mut self)

Inherit transform_style from our parent style.

source

pub fn set_transform_style(&mut self, value: T)

Set the transform_style to the computed value value.

source

pub fn inherit_unicode_bidi(&mut self)

Inherit unicode_bidi from our parent style.

source

pub fn set_unicode_bidi(&mut self, value: T)

Set the unicode_bidi to the computed value value.

source

pub fn reset_visibility(&mut self)

Reset visibility to the initial value.

source

pub fn set_visibility(&mut self, value: T)

Set the visibility to the computed value value.

source

pub fn reset_white_space(&mut self)

Reset white_space to the initial value.

source

pub fn set_white_space(&mut self, value: T)

Set the white_space to the computed value value.

source

pub fn reset_word_break(&mut self)

Reset word_break to the initial value.

source

pub fn set_word_break(&mut self, value: T)

Set the word_break to the computed value value.

source

pub fn reset_writing_mode(&mut self)

Reset writing_mode to the initial value.

source

pub fn set_writing_mode(&mut self, value: T)

Set the writing_mode to the computed value value.

source

pub fn inherit_z_index(&mut self)

Inherit z_index from our parent style.

source

pub fn set_z_index(&mut self, value: T)

Set the z_index to the computed value value.

source

pub fn inherit_flex_grow(&mut self)

Inherit flex_grow from our parent style.

source

pub fn set_flex_grow(&mut self, value: T)

Set the flex_grow to the computed value value.

source

pub fn inherit_flex_shrink(&mut self)

Inherit flex_shrink from our parent style.

source

pub fn set_flex_shrink(&mut self, value: T)

Set the flex_shrink to the computed value value.

source

pub fn inherit_overflow_block(&mut self)

Inherit overflow_block from our parent style.

source

pub fn set_overflow_block(&mut self, value: T)

Set the overflow_block to the computed value value.

source

pub fn inherit_overflow_inline(&mut self)

Inherit overflow_inline from our parent style.

source

pub fn set_overflow_inline(&mut self, value: T)

Set the overflow_inline to the computed value value.

source

pub fn inherit_overflow_x(&mut self)

Inherit overflow_x from our parent style.

source

pub fn set_overflow_x(&mut self, value: T)

Set the overflow_x to the computed value value.

source

pub fn inherit_overflow_y(&mut self)

Inherit overflow_y from our parent style.

source

pub fn set_overflow_y(&mut self, value: T)

Set the overflow_y to the computed value value.

source

pub fn inherit_border_block_end_style(&mut self)

Inherit border_block_end_style from our parent style.

source

pub fn set_border_block_end_style(&mut self, value: T)

Set the border_block_end_style to the computed value value.

source

pub fn inherit_border_block_start_style(&mut self)

Inherit border_block_start_style from our parent style.

source

pub fn set_border_block_start_style(&mut self, value: T)

Set the border_block_start_style to the computed value value.

source

pub fn inherit_border_bottom_style(&mut self)

Inherit border_bottom_style from our parent style.

source

pub fn set_border_bottom_style(&mut self, value: T)

Set the border_bottom_style to the computed value value.

source

pub fn inherit_border_inline_end_style(&mut self)

Inherit border_inline_end_style from our parent style.

source

pub fn set_border_inline_end_style(&mut self, value: T)

Set the border_inline_end_style to the computed value value.

source

pub fn inherit_border_inline_start_style(&mut self)

Inherit border_inline_start_style from our parent style.

source

pub fn set_border_inline_start_style(&mut self, value: T)

Set the border_inline_start_style to the computed value value.

source

pub fn inherit_border_left_style(&mut self)

Inherit border_left_style from our parent style.

source

pub fn set_border_left_style(&mut self, value: T)

Set the border_left_style to the computed value value.

source

pub fn inherit_border_right_style(&mut self)

Inherit border_right_style from our parent style.

source

pub fn set_border_right_style(&mut self, value: T)

Set the border_right_style to the computed value value.

source

pub fn inherit_border_top_style(&mut self)

Inherit border_top_style from our parent style.

source

pub fn set_border_top_style(&mut self, value: T)

Set the border_top_style to the computed value value.

source

pub fn inherit_animation_delay(&mut self)

Inherit animation_delay from our parent style.

source

pub fn set_animation_delay(&mut self, value: T)

Set the animation_delay to the computed value value.

source

pub fn inherit_animation_direction(&mut self)

Inherit animation_direction from our parent style.

source

pub fn set_animation_direction(&mut self, value: T)

Set the animation_direction to the computed value value.

source

pub fn inherit_animation_duration(&mut self)

Inherit animation_duration from our parent style.

source

pub fn set_animation_duration(&mut self, value: T)

Set the animation_duration to the computed value value.

source

pub fn inherit_animation_fill_mode(&mut self)

Inherit animation_fill_mode from our parent style.

source

pub fn set_animation_fill_mode(&mut self, value: T)

Set the animation_fill_mode to the computed value value.

source

pub fn inherit_animation_iteration_count(&mut self)

Inherit animation_iteration_count from our parent style.

source

pub fn set_animation_iteration_count(&mut self, value: T)

Set the animation_iteration_count to the computed value value.

source

pub fn inherit_animation_name(&mut self)

Inherit animation_name from our parent style.

source

pub fn set_animation_name(&mut self, value: T)

Set the animation_name to the computed value value.

source

pub fn inherit_animation_play_state(&mut self)

Inherit animation_play_state from our parent style.

source

pub fn set_animation_play_state(&mut self, value: T)

Set the animation_play_state to the computed value value.

source

pub fn inherit_animation_timeline(&mut self)

Inherit animation_timeline from our parent style.

source

pub fn set_animation_timeline(&mut self, value: T)

Set the animation_timeline to the computed value value.

source

pub fn inherit_animation_timing_function(&mut self)

Inherit animation_timing_function from our parent style.

source

pub fn set_animation_timing_function(&mut self, value: T)

Set the animation_timing_function to the computed value value.

source

pub fn inherit_background_attachment(&mut self)

Inherit background_attachment from our parent style.

source

pub fn set_background_attachment(&mut self, value: T)

Set the background_attachment to the computed value value.

source

pub fn inherit_background_clip(&mut self)

Inherit background_clip from our parent style.

source

pub fn set_background_clip(&mut self, value: T)

Set the background_clip to the computed value value.

source

pub fn inherit_background_image(&mut self)

Inherit background_image from our parent style.

source

pub fn set_background_image(&mut self, value: T)

Set the background_image to the computed value value.

source

pub fn inherit_background_origin(&mut self)

Inherit background_origin from our parent style.

source

pub fn set_background_origin(&mut self, value: T)

Set the background_origin to the computed value value.

source

pub fn inherit_background_position_x(&mut self)

Inherit background_position_x from our parent style.

source

pub fn set_background_position_x(&mut self, value: T)

Set the background_position_x to the computed value value.

source

pub fn inherit_background_position_y(&mut self)

Inherit background_position_y from our parent style.

source

pub fn set_background_position_y(&mut self, value: T)

Set the background_position_y to the computed value value.

source

pub fn inherit_background_repeat(&mut self)

Inherit background_repeat from our parent style.

source

pub fn set_background_repeat(&mut self, value: T)

Set the background_repeat to the computed value value.

source

pub fn inherit_background_size(&mut self)

Inherit background_size from our parent style.

source

pub fn set_background_size(&mut self, value: T)

Set the background_size to the computed value value.

source

pub fn inherit_border_image_outset(&mut self)

Inherit border_image_outset from our parent style.

source

pub fn set_border_image_outset(&mut self, value: T)

Set the border_image_outset to the computed value value.

source

pub fn inherit_border_image_slice(&mut self)

Inherit border_image_slice from our parent style.

source

pub fn set_border_image_slice(&mut self, value: T)

Set the border_image_slice to the computed value value.

source

pub fn inherit_border_image_width(&mut self)

Inherit border_image_width from our parent style.

source

pub fn set_border_image_width(&mut self, value: T)

Set the border_image_width to the computed value value.

source

pub fn reset_border_spacing(&mut self)

Reset border_spacing to the initial value.

source

pub fn set_border_spacing(&mut self, value: T)

Set the border_spacing to the computed value value.

source

pub fn inherit_box_shadow(&mut self)

Inherit box_shadow from our parent style.

source

pub fn set_box_shadow(&mut self, value: T)

Set the box_shadow to the computed value value.

source

pub fn inherit_clip(&mut self)

Inherit clip from our parent style.

source

pub fn set_clip(&mut self, value: T)

Set the clip to the computed value value.

source

pub fn reset_color(&mut self)

Reset color to the initial value.

source

pub fn set_color(&mut self, value: T)

Set the color to the computed value value.

source

pub fn inherit_column_gap(&mut self)

Inherit column_gap from our parent style.

source

pub fn set_column_gap(&mut self, value: T)

Set the column_gap to the computed value value.

source

pub fn inherit_column_width(&mut self)

Inherit column_width from our parent style.

source

pub fn set_column_width(&mut self, value: T)

Set the column_width to the computed value value.

source

pub fn inherit_container_name(&mut self)

Inherit container_name from our parent style.

source

pub fn set_container_name(&mut self, value: T)

Set the container_name to the computed value value.

source

pub fn inherit_content(&mut self)

Inherit content from our parent style.

source

pub fn set_content(&mut self, value: T)

Set the content to the computed value value.

source

pub fn inherit_counter_increment(&mut self)

Inherit counter_increment from our parent style.

source

pub fn set_counter_increment(&mut self, value: T)

Set the counter_increment to the computed value value.

source

pub fn inherit_counter_reset(&mut self)

Inherit counter_reset from our parent style.

source

pub fn set_counter_reset(&mut self, value: T)

Set the counter_reset to the computed value value.

source

pub fn reset_cursor(&mut self)

Reset cursor to the initial value.

source

pub fn set_cursor(&mut self, value: T)

Set the cursor to the computed value value.

source

pub fn inherit_filter(&mut self)

Inherit filter from our parent style.

source

pub fn set_filter(&mut self, value: T)

Set the filter to the computed value value.

source

pub fn inherit_flex_basis(&mut self)

Inherit flex_basis from our parent style.

source

pub fn set_flex_basis(&mut self, value: T)

Set the flex_basis to the computed value value.

source

pub fn reset_font_family(&mut self)

Reset font_family to the initial value.

source

pub fn set_font_family(&mut self, value: T)

Set the font_family to the computed value value.

source

pub fn reset_font_size(&mut self)

Reset font_size to the initial value.

source

pub fn set_font_size(&mut self, value: T)

Set the font_size to the computed value value.

source

pub fn reset_letter_spacing(&mut self)

Reset letter_spacing to the initial value.

source

pub fn set_letter_spacing(&mut self, value: T)

Set the letter_spacing to the computed value value.

source

pub fn reset_line_height(&mut self)

Reset line_height to the initial value.

source

pub fn set_line_height(&mut self, value: T)

Set the line_height to the computed value value.

source

pub fn inherit_outline_offset(&mut self)

Inherit outline_offset from our parent style.

source

pub fn set_outline_offset(&mut self, value: T)

Set the outline_offset to the computed value value.

source

pub fn inherit_perspective(&mut self)

Inherit perspective from our parent style.

source

pub fn set_perspective(&mut self, value: T)

Set the perspective to the computed value value.

source

pub fn inherit_perspective_origin(&mut self)

Inherit perspective_origin from our parent style.

source

pub fn set_perspective_origin(&mut self, value: T)

Set the perspective_origin to the computed value value.

source

pub fn reset_quotes(&mut self)

Reset quotes to the initial value.

source

pub fn set_quotes(&mut self, value: T)

Set the quotes to the computed value value.

source

pub fn inherit_rotate(&mut self)

Inherit rotate from our parent style.

source

pub fn set_rotate(&mut self, value: T)

Set the rotate to the computed value value.

source

pub fn inherit_scale(&mut self)

Inherit scale from our parent style.

source

pub fn set_scale(&mut self, value: T)

Set the scale to the computed value value.

source

pub fn reset_text_indent(&mut self)

Reset text_indent to the initial value.

source

pub fn set_text_indent(&mut self, value: T)

Set the text_indent to the computed value value.

source

pub fn inherit_text_overflow(&mut self)

Inherit text_overflow from our parent style.

source

pub fn set_text_overflow(&mut self, value: T)

Set the text_overflow to the computed value value.

source

pub fn reset_text_shadow(&mut self)

Reset text_shadow to the initial value.

source

pub fn set_text_shadow(&mut self, value: T)

Set the text_shadow to the computed value value.

source

pub fn inherit_transform(&mut self)

Inherit transform from our parent style.

source

pub fn set_transform(&mut self, value: T)

Set the transform to the computed value value.

source

pub fn inherit_transform_origin(&mut self)

Inherit transform_origin from our parent style.

source

pub fn set_transform_origin(&mut self, value: T)

Set the transform_origin to the computed value value.

source

pub fn inherit_transition_delay(&mut self)

Inherit transition_delay from our parent style.

source

pub fn set_transition_delay(&mut self, value: T)

Set the transition_delay to the computed value value.

source

pub fn inherit_transition_duration(&mut self)

Inherit transition_duration from our parent style.

source

pub fn set_transition_duration(&mut self, value: T)

Set the transition_duration to the computed value value.

source

pub fn inherit_transition_property(&mut self)

Inherit transition_property from our parent style.

source

pub fn set_transition_property(&mut self, value: T)

Set the transition_property to the computed value value.

source

pub fn inherit_transition_timing_function(&mut self)

Inherit transition_timing_function from our parent style.

source

pub fn set_transition_timing_function(&mut self, value: T)

Set the transition_timing_function to the computed value value.

source

pub fn inherit_translate(&mut self)

Inherit translate from our parent style.

source

pub fn set_translate(&mut self, value: T)

Set the translate to the computed value value.

source

pub fn inherit_vertical_align(&mut self)

Inherit vertical_align from our parent style.

source

pub fn set_vertical_align(&mut self, value: T)

Set the vertical_align to the computed value value.

source

pub fn reset_word_spacing(&mut self)

Reset word_spacing to the initial value.

source

pub fn set_word_spacing(&mut self, value: T)

Set the word_spacing to the computed value value.

source

pub fn inherit_border_image_source(&mut self)

Inherit border_image_source from our parent style.

source

pub fn set_border_image_source(&mut self, value: T)

Set the border_image_source to the computed value value.

source

pub fn reset_list_style_image(&mut self)

Reset list_style_image to the initial value.

source

pub fn set_list_style_image(&mut self, value: T)

Set the list_style_image to the computed value value.

source

pub fn inherit_max_block_size(&mut self)

Inherit max_block_size from our parent style.

source

pub fn set_max_block_size(&mut self, value: T)

Set the max_block_size to the computed value value.

source

pub fn inherit_max_height(&mut self)

Inherit max_height from our parent style.

source

pub fn set_max_height(&mut self, value: T)

Set the max_height to the computed value value.

source

pub fn inherit_max_inline_size(&mut self)

Inherit max_inline_size from our parent style.

source

pub fn set_max_inline_size(&mut self, value: T)

Set the max_inline_size to the computed value value.

source

pub fn inherit_max_width(&mut self)

Inherit max_width from our parent style.

source

pub fn set_max_width(&mut self, value: T)

Set the max_width to the computed value value.

source

pub fn inherit_border_bottom_left_radius(&mut self)

Inherit border_bottom_left_radius from our parent style.

source

pub fn set_border_bottom_left_radius(&mut self, value: T)

Set the border_bottom_left_radius to the computed value value.

source

pub fn inherit_border_bottom_right_radius(&mut self)

Inherit border_bottom_right_radius from our parent style.

source

pub fn set_border_bottom_right_radius(&mut self, value: T)

Set the border_bottom_right_radius to the computed value value.

source

pub fn inherit_border_end_end_radius(&mut self)

Inherit border_end_end_radius from our parent style.

source

pub fn set_border_end_end_radius(&mut self, value: T)

Set the border_end_end_radius to the computed value value.

source

pub fn inherit_border_end_start_radius(&mut self)

Inherit border_end_start_radius from our parent style.

source

pub fn set_border_end_start_radius(&mut self, value: T)

Set the border_end_start_radius to the computed value value.

source

pub fn inherit_border_start_end_radius(&mut self)

Inherit border_start_end_radius from our parent style.

source

pub fn set_border_start_end_radius(&mut self, value: T)

Set the border_start_end_radius to the computed value value.

source

pub fn inherit_border_start_start_radius(&mut self)

Inherit border_start_start_radius from our parent style.

source

pub fn set_border_start_start_radius(&mut self, value: T)

Set the border_start_start_radius to the computed value value.

source

pub fn inherit_border_top_left_radius(&mut self)

Inherit border_top_left_radius from our parent style.

source

pub fn set_border_top_left_radius(&mut self, value: T)

Set the border_top_left_radius to the computed value value.

source

pub fn inherit_border_top_right_radius(&mut self)

Inherit border_top_right_radius from our parent style.

source

pub fn set_border_top_right_radius(&mut self, value: T)

Set the border_top_right_radius to the computed value value.

source

pub fn inherit_padding_block_end(&mut self)

Inherit padding_block_end from our parent style.

source

pub fn set_padding_block_end(&mut self, value: T)

Set the padding_block_end to the computed value value.

source

pub fn inherit_padding_block_start(&mut self)

Inherit padding_block_start from our parent style.

source

pub fn set_padding_block_start(&mut self, value: T)

Set the padding_block_start to the computed value value.

source

pub fn inherit_padding_bottom(&mut self)

Inherit padding_bottom from our parent style.

source

pub fn set_padding_bottom(&mut self, value: T)

Set the padding_bottom to the computed value value.

source

pub fn inherit_padding_inline_end(&mut self)

Inherit padding_inline_end from our parent style.

source

pub fn set_padding_inline_end(&mut self, value: T)

Set the padding_inline_end to the computed value value.

source

pub fn inherit_padding_inline_start(&mut self)

Inherit padding_inline_start from our parent style.

source

pub fn set_padding_inline_start(&mut self, value: T)

Set the padding_inline_start to the computed value value.

source

pub fn inherit_padding_left(&mut self)

Inherit padding_left from our parent style.

source

pub fn set_padding_left(&mut self, value: T)

Set the padding_left to the computed value value.

source

pub fn inherit_padding_right(&mut self)

Inherit padding_right from our parent style.

source

pub fn set_padding_right(&mut self, value: T)

Set the padding_right to the computed value value.

source

pub fn inherit_padding_top(&mut self)

Inherit padding_top from our parent style.

source

pub fn set_padding_top(&mut self, value: T)

Set the padding_top to the computed value value.

source

pub fn inherit_block_size(&mut self)

Inherit block_size from our parent style.

source

pub fn set_block_size(&mut self, value: T)

Set the block_size to the computed value value.

source

pub fn inherit_height(&mut self)

Inherit height from our parent style.

source

pub fn set_height(&mut self, value: T)

Set the height to the computed value value.

source

pub fn inherit_inline_size(&mut self)

Inherit inline_size from our parent style.

source

pub fn set_inline_size(&mut self, value: T)

Set the inline_size to the computed value value.

source

pub fn inherit_min_block_size(&mut self)

Inherit min_block_size from our parent style.

source

pub fn set_min_block_size(&mut self, value: T)

Set the min_block_size to the computed value value.

source

pub fn inherit_min_height(&mut self)

Inherit min_height from our parent style.

source

pub fn set_min_height(&mut self, value: T)

Set the min_height to the computed value value.

source

pub fn inherit_min_inline_size(&mut self)

Inherit min_inline_size from our parent style.

source

pub fn set_min_inline_size(&mut self, value: T)

Set the min_inline_size to the computed value value.

source

pub fn inherit_min_width(&mut self)

Inherit min_width from our parent style.

source

pub fn set_min_width(&mut self, value: T)

Set the min_width to the computed value value.

source

pub fn inherit_width(&mut self)

Inherit width from our parent style.

source

pub fn set_width(&mut self, value: T)

Set the width to the computed value value.

source

pub fn inherit_border_block_end_width(&mut self)

Inherit border_block_end_width from our parent style.

source

pub fn set_border_block_end_width(&mut self, value: T)

Set the border_block_end_width to the computed value value.

source

pub fn inherit_border_block_start_width(&mut self)

Inherit border_block_start_width from our parent style.

source

pub fn set_border_block_start_width(&mut self, value: T)

Set the border_block_start_width to the computed value value.

source

pub fn inherit_border_bottom_width(&mut self)

Inherit border_bottom_width from our parent style.

source

pub fn set_border_bottom_width(&mut self, value: T)

Set the border_bottom_width to the computed value value.

source

pub fn inherit_border_inline_end_width(&mut self)

Inherit border_inline_end_width from our parent style.

source

pub fn set_border_inline_end_width(&mut self, value: T)

Set the border_inline_end_width to the computed value value.

source

pub fn inherit_border_inline_start_width(&mut self)

Inherit border_inline_start_width from our parent style.

source

pub fn set_border_inline_start_width(&mut self, value: T)

Set the border_inline_start_width to the computed value value.

source

pub fn inherit_border_left_width(&mut self)

Inherit border_left_width from our parent style.

source

pub fn set_border_left_width(&mut self, value: T)

Set the border_left_width to the computed value value.

source

pub fn inherit_border_right_width(&mut self)

Inherit border_right_width from our parent style.

source

pub fn set_border_right_width(&mut self, value: T)

Set the border_right_width to the computed value value.

source

pub fn inherit_border_top_width(&mut self)

Inherit border_top_width from our parent style.

source

pub fn set_border_top_width(&mut self, value: T)

Set the border_top_width to the computed value value.

source

pub fn inherit_outline_width(&mut self)

Inherit outline_width from our parent style.

source

pub fn set_outline_width(&mut self, value: T)

Set the outline_width to the computed value value.

source

pub fn inherit_background_color(&mut self)

Inherit background_color from our parent style.

source

pub fn set_background_color(&mut self, value: T)

Set the background_color to the computed value value.

source

pub fn inherit_border_block_end_color(&mut self)

Inherit border_block_end_color from our parent style.

source

pub fn set_border_block_end_color(&mut self, value: T)

Set the border_block_end_color to the computed value value.

source

pub fn inherit_border_block_start_color(&mut self)

Inherit border_block_start_color from our parent style.

source

pub fn set_border_block_start_color(&mut self, value: T)

Set the border_block_start_color to the computed value value.

source

pub fn inherit_border_bottom_color(&mut self)

Inherit border_bottom_color from our parent style.

source

pub fn set_border_bottom_color(&mut self, value: T)

Set the border_bottom_color to the computed value value.

source

pub fn inherit_border_inline_end_color(&mut self)

Inherit border_inline_end_color from our parent style.

source

pub fn set_border_inline_end_color(&mut self, value: T)

Set the border_inline_end_color to the computed value value.

source

pub fn inherit_border_inline_start_color(&mut self)

Inherit border_inline_start_color from our parent style.

source

pub fn set_border_inline_start_color(&mut self, value: T)

Set the border_inline_start_color to the computed value value.

source

pub fn inherit_border_left_color(&mut self)

Inherit border_left_color from our parent style.

source

pub fn set_border_left_color(&mut self, value: T)

Set the border_left_color to the computed value value.

source

pub fn inherit_border_right_color(&mut self)

Inherit border_right_color from our parent style.

source

pub fn set_border_right_color(&mut self, value: T)

Set the border_right_color to the computed value value.

source

pub fn inherit_border_top_color(&mut self)

Inherit border_top_color from our parent style.

source

pub fn set_border_top_color(&mut self, value: T)

Set the border_top_color to the computed value value.

source

pub fn inherit_outline_color(&mut self)

Inherit outline_color from our parent style.

source

pub fn set_outline_color(&mut self, value: T)

Set the outline_color to the computed value value.

source

pub fn inherit_text_decoration_color(&mut self)

Inherit text_decoration_color from our parent style.

source

pub fn set_text_decoration_color(&mut self, value: T)

Set the text_decoration_color to the computed value value.

source

pub fn inherit_bottom(&mut self)

Inherit bottom from our parent style.

source

pub fn set_bottom(&mut self, value: T)

Set the bottom to the computed value value.

source

pub fn inherit_inset_block_end(&mut self)

Inherit inset_block_end from our parent style.

source

pub fn set_inset_block_end(&mut self, value: T)

Set the inset_block_end to the computed value value.

source

pub fn inherit_inset_block_start(&mut self)

Inherit inset_block_start from our parent style.

source

pub fn set_inset_block_start(&mut self, value: T)

Set the inset_block_start to the computed value value.

source

pub fn inherit_inset_inline_end(&mut self)

Inherit inset_inline_end from our parent style.

source

pub fn set_inset_inline_end(&mut self, value: T)

Set the inset_inline_end to the computed value value.

source

pub fn inherit_inset_inline_start(&mut self)

Inherit inset_inline_start from our parent style.

source

pub fn set_inset_inline_start(&mut self, value: T)

Set the inset_inline_start to the computed value value.

source

pub fn inherit_left(&mut self)

Inherit left from our parent style.

source

pub fn set_left(&mut self, value: T)

Set the left to the computed value value.

source

pub fn inherit_margin_block_end(&mut self)

Inherit margin_block_end from our parent style.

source

pub fn set_margin_block_end(&mut self, value: T)

Set the margin_block_end to the computed value value.

source

pub fn inherit_margin_block_start(&mut self)

Inherit margin_block_start from our parent style.

source

pub fn set_margin_block_start(&mut self, value: T)

Set the margin_block_start to the computed value value.

source

pub fn inherit_margin_bottom(&mut self)

Inherit margin_bottom from our parent style.

source

pub fn set_margin_bottom(&mut self, value: T)

Set the margin_bottom to the computed value value.

source

pub fn inherit_margin_inline_end(&mut self)

Inherit margin_inline_end from our parent style.

source

pub fn set_margin_inline_end(&mut self, value: T)

Set the margin_inline_end to the computed value value.

source

pub fn inherit_margin_inline_start(&mut self)

Inherit margin_inline_start from our parent style.

source

pub fn set_margin_inline_start(&mut self, value: T)

Set the margin_inline_start to the computed value value.

source

pub fn inherit_margin_left(&mut self)

Inherit margin_left from our parent style.

source

pub fn set_margin_left(&mut self, value: T)

Set the margin_left to the computed value value.

source

pub fn inherit_margin_right(&mut self)

Inherit margin_right from our parent style.

source

pub fn set_margin_right(&mut self, value: T)

Set the margin_right to the computed value value.

source

pub fn inherit_margin_top(&mut self)

Inherit margin_top from our parent style.

source

pub fn set_margin_top(&mut self, value: T)

Set the margin_top to the computed value value.

source

pub fn inherit_right(&mut self)

Inherit right from our parent style.

source

pub fn set_right(&mut self, value: T)

Set the right to the computed value value.

source

pub fn inherit_top(&mut self)

Inherit top from our parent style.

source

pub fn set_top(&mut self, value: T)

Set the top to the computed value value.

source

pub fn for_inheritance(
    device: &'a Device,
    parent: Option<&'a ComputedValues>,
    pseudo: Option<&'a PseudoElement>
) -> Self

Inherits style from the parent element, accounting for the default computed values that need to be provided as well.

source

pub fn has_visited_style(&self) -> bool

Returns whether we have a visited style.

source

pub fn is_pseudo_element(&self) -> bool

Returns whether we’re a pseudo-elements style.

source

pub fn default_style(&self) -> &'a ComputedValues

Returns the style we’re getting reset properties from.

source

pub fn get_background(&self) -> &Background

Gets an immutable view of the current Background style.

source

pub fn mutate_background(&mut self) -> &mut Background

Gets a mutable view of the current Background style.

source

pub fn take_background(&mut self) -> UniqueArc<Background>

Gets a mutable view of the current Background style.

source

pub fn put_background(&mut self, s: UniqueArc<Background>)

Gets a mutable view of the current Background style.

source

pub fn get_background_if_mutated(&mut self) -> Option<&mut Background>

Gets a mutable view of the current Background style, only if it’s been mutated before.

source

pub fn reset_background_struct(&mut self)

Reset the current Background style to its default value.

source

pub fn get_border(&self) -> &Border

Gets an immutable view of the current Border style.

source

pub fn mutate_border(&mut self) -> &mut Border

Gets a mutable view of the current Border style.

source

pub fn take_border(&mut self) -> UniqueArc<Border>

Gets a mutable view of the current Border style.

source

pub fn put_border(&mut self, s: UniqueArc<Border>)

Gets a mutable view of the current Border style.

source

pub fn get_border_if_mutated(&mut self) -> Option<&mut Border>

Gets a mutable view of the current Border style, only if it’s been mutated before.

source

pub fn reset_border_struct(&mut self)

Reset the current Border style to its default value.

source

pub fn get_box(&self) -> &Box

Gets an immutable view of the current Box style.

source

pub fn mutate_box(&mut self) -> &mut Box

Gets a mutable view of the current Box style.

source

pub fn take_box(&mut self) -> UniqueArc<Box>

Gets a mutable view of the current Box style.

source

pub fn put_box(&mut self, s: UniqueArc<Box>)

Gets a mutable view of the current Box style.

source

pub fn get_box_if_mutated(&mut self) -> Option<&mut Box>

Gets a mutable view of the current Box style, only if it’s been mutated before.

source

pub fn reset_box_struct(&mut self)

Reset the current Box style to its default value.

source

pub fn get_column(&self) -> &Column

Gets an immutable view of the current Column style.

source

pub fn mutate_column(&mut self) -> &mut Column

Gets a mutable view of the current Column style.

source

pub fn take_column(&mut self) -> UniqueArc<Column>

Gets a mutable view of the current Column style.

source

pub fn put_column(&mut self, s: UniqueArc<Column>)

Gets a mutable view of the current Column style.

source

pub fn get_column_if_mutated(&mut self) -> Option<&mut Column>

Gets a mutable view of the current Column style, only if it’s been mutated before.

source

pub fn reset_column_struct(&mut self)

Reset the current Column style to its default value.

source

pub fn get_counters(&self) -> &Counters

Gets an immutable view of the current Counters style.

source

pub fn mutate_counters(&mut self) -> &mut Counters

Gets a mutable view of the current Counters style.

source

pub fn take_counters(&mut self) -> UniqueArc<Counters>

Gets a mutable view of the current Counters style.

source

pub fn put_counters(&mut self, s: UniqueArc<Counters>)

Gets a mutable view of the current Counters style.

source

pub fn get_counters_if_mutated(&mut self) -> Option<&mut Counters>

Gets a mutable view of the current Counters style, only if it’s been mutated before.

source

pub fn reset_counters_struct(&mut self)

Reset the current Counters style to its default value.

source

pub fn get_effects(&self) -> &Effects

Gets an immutable view of the current Effects style.

source

pub fn mutate_effects(&mut self) -> &mut Effects

Gets a mutable view of the current Effects style.

source

pub fn take_effects(&mut self) -> UniqueArc<Effects>

Gets a mutable view of the current Effects style.

source

pub fn put_effects(&mut self, s: UniqueArc<Effects>)

Gets a mutable view of the current Effects style.

source

pub fn get_effects_if_mutated(&mut self) -> Option<&mut Effects>

Gets a mutable view of the current Effects style, only if it’s been mutated before.

source

pub fn reset_effects_struct(&mut self)

Reset the current Effects style to its default value.

source

pub fn get_font(&self) -> &Font

Gets an immutable view of the current Font style.

source

pub fn mutate_font(&mut self) -> &mut Font

Gets a mutable view of the current Font style.

source

pub fn take_font(&mut self) -> UniqueArc<Font>

Gets a mutable view of the current Font style.

source

pub fn put_font(&mut self, s: UniqueArc<Font>)

Gets a mutable view of the current Font style.

source

pub fn get_font_if_mutated(&mut self) -> Option<&mut Font>

Gets a mutable view of the current Font style, only if it’s been mutated before.

source

pub fn reset_font_struct(&mut self)

Reset the current Font style to its default value.

source

pub fn get_inherited_box(&self) -> &InheritedBox

Gets an immutable view of the current InheritedBox style.

source

pub fn mutate_inherited_box(&mut self) -> &mut InheritedBox

Gets a mutable view of the current InheritedBox style.

source

pub fn take_inherited_box(&mut self) -> UniqueArc<InheritedBox>

Gets a mutable view of the current InheritedBox style.

source

pub fn put_inherited_box(&mut self, s: UniqueArc<InheritedBox>)

Gets a mutable view of the current InheritedBox style.

source

pub fn get_inherited_box_if_mutated(&mut self) -> Option<&mut InheritedBox>

Gets a mutable view of the current InheritedBox style, only if it’s been mutated before.

source

pub fn reset_inherited_box_struct(&mut self)

Reset the current InheritedBox style to its default value.

source

pub fn get_inherited_table(&self) -> &InheritedTable

Gets an immutable view of the current InheritedTable style.

source

pub fn mutate_inherited_table(&mut self) -> &mut InheritedTable

Gets a mutable view of the current InheritedTable style.

source

pub fn take_inherited_table(&mut self) -> UniqueArc<InheritedTable>

Gets a mutable view of the current InheritedTable style.

source

pub fn put_inherited_table(&mut self, s: UniqueArc<InheritedTable>)

Gets a mutable view of the current InheritedTable style.

source

pub fn get_inherited_table_if_mutated(&mut self) -> Option<&mut InheritedTable>

Gets a mutable view of the current InheritedTable style, only if it’s been mutated before.

source

pub fn reset_inherited_table_struct(&mut self)

Reset the current InheritedTable style to its default value.

source

pub fn get_inherited_text(&self) -> &InheritedText

Gets an immutable view of the current InheritedText style.

source

pub fn mutate_inherited_text(&mut self) -> &mut InheritedText

Gets a mutable view of the current InheritedText style.

source

pub fn take_inherited_text(&mut self) -> UniqueArc<InheritedText>

Gets a mutable view of the current InheritedText style.

source

pub fn put_inherited_text(&mut self, s: UniqueArc<InheritedText>)

Gets a mutable view of the current InheritedText style.

source

pub fn get_inherited_text_if_mutated(&mut self) -> Option<&mut InheritedText>

Gets a mutable view of the current InheritedText style, only if it’s been mutated before.

source

pub fn reset_inherited_text_struct(&mut self)

Reset the current InheritedText style to its default value.

source

pub fn get_inherited_ui(&self) -> &InheritedUI

Gets an immutable view of the current InheritedUI style.

source

pub fn mutate_inherited_ui(&mut self) -> &mut InheritedUI

Gets a mutable view of the current InheritedUI style.

source

pub fn take_inherited_ui(&mut self) -> UniqueArc<InheritedUI>

Gets a mutable view of the current InheritedUI style.

source

pub fn put_inherited_ui(&mut self, s: UniqueArc<InheritedUI>)

Gets a mutable view of the current InheritedUI style.

source

pub fn get_inherited_ui_if_mutated(&mut self) -> Option<&mut InheritedUI>

Gets a mutable view of the current InheritedUI style, only if it’s been mutated before.

source

pub fn reset_inherited_ui_struct(&mut self)

Reset the current InheritedUI style to its default value.

source

pub fn get_list(&self) -> &List

Gets an immutable view of the current List style.

source

pub fn mutate_list(&mut self) -> &mut List

Gets a mutable view of the current List style.

source

pub fn take_list(&mut self) -> UniqueArc<List>

Gets a mutable view of the current List style.

source

pub fn put_list(&mut self, s: UniqueArc<List>)

Gets a mutable view of the current List style.

source

pub fn get_list_if_mutated(&mut self) -> Option<&mut List>

Gets a mutable view of the current List style, only if it’s been mutated before.

source

pub fn reset_list_struct(&mut self)

Reset the current List style to its default value.

source

pub fn get_margin(&self) -> &Margin

Gets an immutable view of the current Margin style.

source

pub fn mutate_margin(&mut self) -> &mut Margin

Gets a mutable view of the current Margin style.

source

pub fn take_margin(&mut self) -> UniqueArc<Margin>

Gets a mutable view of the current Margin style.

source

pub fn put_margin(&mut self, s: UniqueArc<Margin>)

Gets a mutable view of the current Margin style.

source

pub fn get_margin_if_mutated(&mut self) -> Option<&mut Margin>

Gets a mutable view of the current Margin style, only if it’s been mutated before.

source

pub fn reset_margin_struct(&mut self)

Reset the current Margin style to its default value.

source

pub fn get_outline(&self) -> &Outline

Gets an immutable view of the current Outline style.

source

pub fn mutate_outline(&mut self) -> &mut Outline

Gets a mutable view of the current Outline style.

source

pub fn take_outline(&mut self) -> UniqueArc<Outline>

Gets a mutable view of the current Outline style.

source

pub fn put_outline(&mut self, s: UniqueArc<Outline>)

Gets a mutable view of the current Outline style.

source

pub fn get_outline_if_mutated(&mut self) -> Option<&mut Outline>

Gets a mutable view of the current Outline style, only if it’s been mutated before.

source

pub fn reset_outline_struct(&mut self)

Reset the current Outline style to its default value.

source

pub fn get_padding(&self) -> &Padding

Gets an immutable view of the current Padding style.

source

pub fn mutate_padding(&mut self) -> &mut Padding

Gets a mutable view of the current Padding style.

source

pub fn take_padding(&mut self) -> UniqueArc<Padding>

Gets a mutable view of the current Padding style.

source

pub fn put_padding(&mut self, s: UniqueArc<Padding>)

Gets a mutable view of the current Padding style.

source

pub fn get_padding_if_mutated(&mut self) -> Option<&mut Padding>

Gets a mutable view of the current Padding style, only if it’s been mutated before.

source

pub fn reset_padding_struct(&mut self)

Reset the current Padding style to its default value.

source

pub fn get_position(&self) -> &Position

Gets an immutable view of the current Position style.

source

pub fn mutate_position(&mut self) -> &mut Position

Gets a mutable view of the current Position style.

source

pub fn take_position(&mut self) -> UniqueArc<Position>

Gets a mutable view of the current Position style.

source

pub fn put_position(&mut self, s: UniqueArc<Position>)

Gets a mutable view of the current Position style.

source

pub fn get_position_if_mutated(&mut self) -> Option<&mut Position>

Gets a mutable view of the current Position style, only if it’s been mutated before.

source

pub fn reset_position_struct(&mut self)

Reset the current Position style to its default value.

source

pub fn get_table(&self) -> &Table

Gets an immutable view of the current Table style.

source

pub fn mutate_table(&mut self) -> &mut Table

Gets a mutable view of the current Table style.

source

pub fn take_table(&mut self) -> UniqueArc<Table>

Gets a mutable view of the current Table style.

source

pub fn put_table(&mut self, s: UniqueArc<Table>)

Gets a mutable view of the current Table style.

source

pub fn get_table_if_mutated(&mut self) -> Option<&mut Table>

Gets a mutable view of the current Table style, only if it’s been mutated before.

source

pub fn reset_table_struct(&mut self)

Reset the current Table style to its default value.

source

pub fn get_text(&self) -> &Text

Gets an immutable view of the current Text style.

source

pub fn mutate_text(&mut self) -> &mut Text

Gets a mutable view of the current Text style.

source

pub fn take_text(&mut self) -> UniqueArc<Text>

Gets a mutable view of the current Text style.

source

pub fn put_text(&mut self, s: UniqueArc<Text>)

Gets a mutable view of the current Text style.

source

pub fn get_text_if_mutated(&mut self) -> Option<&mut Text>

Gets a mutable view of the current Text style, only if it’s been mutated before.

source

pub fn reset_text_struct(&mut self)

Reset the current Text style to its default value.

source

pub fn get_ui(&self) -> &UI

Gets an immutable view of the current UI style.

source

pub fn mutate_ui(&mut self) -> &mut UI

Gets a mutable view of the current UI style.

source

pub fn take_ui(&mut self) -> UniqueArc<UI>

Gets a mutable view of the current UI style.

source

pub fn put_ui(&mut self, s: UniqueArc<UI>)

Gets a mutable view of the current UI style.

source

pub fn get_ui_if_mutated(&mut self) -> Option<&mut UI>

Gets a mutable view of the current UI style, only if it’s been mutated before.

source

pub fn reset_ui_struct(&mut self)

Reset the current UI style to its default value.

source

pub fn is_floating(&self) -> bool

Returns whether this computed style represents a floated object.

source

pub fn is_absolutely_positioned(&self) -> bool

Returns whether this computed style represents an absolutely-positioned object.

source

pub fn in_top_layer(&self) -> bool

Whether this style has a top-layer style.

source

fn clear_modified_reset(&mut self)

Clears the “have any reset structs been modified” flag.

source

fn modified_reset(&self) -> bool

Returns whether we have mutated any reset structs since the the last time clear_modified_reset was called.

source

pub fn flags(&self) -> ComputedValueFlags

Return the current flags.

source

pub fn add_flags(&self, flag: ComputedValueFlags)

Add a flag to the current builder.

source

pub fn remove_flags(&self, flag: ComputedValueFlags)

Removes a flag to the current builder.

source

pub fn build(self) -> Arc<ComputedValues>

Turns this StyleBuilder into a proper ComputedValues instance.

source

fn custom_properties(&self) -> Option<&Arc<CustomPropertiesMap>>

Get the custom properties map if necessary.

Cloning the Arc here is fine because it only happens in the case where we have custom properties, and those are both rare and expensive.

source

pub fn inherited_writing_mode(&self) -> &WritingMode

Access to various information about our inherited styles. We don’t expose an inherited ComputedValues directly, because in the ::first-line case some of the inherited information needs to come from one ComputedValues instance and some from a different one. Inherited writing-mode.

source

pub fn get_parent_flags(&self) -> ComputedValueFlags

The computed value flags of our parent.

source

pub fn get_parent_background(&self) -> &Background

And access to inherited style structs. Gets our inherited Background. We don’t name these accessors inherited_background because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_background instead.

source

pub fn get_parent_border(&self) -> &Border

Gets our inherited Border. We don’t name these accessors inherited_border because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_border instead.

source

pub fn get_parent_box(&self) -> &Box

Gets our inherited Box. We don’t name these accessors inherited_box because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_box instead.

source

pub fn get_parent_column(&self) -> &Column

Gets our inherited Column. We don’t name these accessors inherited_column because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_column instead.

source

pub fn get_parent_counters(&self) -> &Counters

Gets our inherited Counters. We don’t name these accessors inherited_counters because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_counters instead.

source

pub fn get_parent_effects(&self) -> &Effects

Gets our inherited Effects. We don’t name these accessors inherited_effects because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_effects instead.

source

pub fn get_parent_font(&self) -> &Font

Gets our inherited Font. We don’t name these accessors inherited_font because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_font instead.

source

pub fn get_parent_inherited_box(&self) -> &InheritedBox

Gets our inherited InheritedBox. We don’t name these accessors inherited_inherited_box because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_inherited_box instead.

source

pub fn get_parent_inherited_table(&self) -> &InheritedTable

Gets our inherited InheritedTable. We don’t name these accessors inherited_inherited_table because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_inherited_table instead.

source

pub fn get_parent_inherited_text(&self) -> &InheritedText

Gets our inherited InheritedText. We don’t name these accessors inherited_inherited_text because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_inherited_text instead.

source

pub fn get_parent_inherited_ui(&self) -> &InheritedUI

Gets our inherited InheritedUI. We don’t name these accessors inherited_inherited_ui because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_inherited_ui instead.

source

pub fn get_parent_list(&self) -> &List

Gets our inherited List. We don’t name these accessors inherited_list because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_list instead.

source

pub fn get_parent_margin(&self) -> &Margin

Gets our inherited Margin. We don’t name these accessors inherited_margin because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_margin instead.

source

pub fn get_parent_outline(&self) -> &Outline

Gets our inherited Outline. We don’t name these accessors inherited_outline because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_outline instead.

source

pub fn get_parent_padding(&self) -> &Padding

Gets our inherited Padding. We don’t name these accessors inherited_padding because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_padding instead.

source

pub fn get_parent_position(&self) -> &Position

Gets our inherited Position. We don’t name these accessors inherited_position because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_position instead.

source

pub fn get_parent_table(&self) -> &Table

Gets our inherited Table. We don’t name these accessors inherited_table because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_table instead.

source

pub fn get_parent_text(&self) -> &Text

Gets our inherited Text. We don’t name these accessors inherited_text because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_text instead.

source

pub fn get_parent_ui(&self) -> &UI

Gets our inherited UI. We don’t name these accessors inherited_ui because we already have things like “box” vs “inherited_box” as struct names. Do the next-best thing and call them parent_ui instead.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for StyleBuilder<'a>

§

impl<'a> Send for StyleBuilder<'a>

§

impl<'a> !Sync for StyleBuilder<'a>

§

impl<'a> Unpin for StyleBuilder<'a>

§

impl<'a> !UnwindSafe for StyleBuilder<'a>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

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

const: unstable · 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> MaybeBoxed<Box<T, Global>> for T

source§

fn maybe_boxed(self) -> Box<T, Global>

Convert
source§

impl<T> MaybeBoxed<T> for T

source§

fn maybe_boxed(self) -> T

Convert
source§

impl<T> Pointable for T

source§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<V, T> VZip<V> for Twhere
    V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
    S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> Erased for T