pub struct ComputedValues {
    inner: ComputedValuesInner,
    pseudo: Option<PseudoElement>,
}
Expand description

The struct that Servo uses to represent computed values.

This struct contains an immutable atomically-reference-counted pointer to every kind of style struct.

When needed, the structs may be copied in order to get mutated.

Fields§

§inner: ComputedValuesInner

The actual computed values

In Gecko the outer ComputedValues is actually a ComputedStyle, whereas ComputedValuesInner is the core set of computed values.

We maintain this distinction in servo to reduce the amount of special casing.

§pseudo: Option<PseudoElement>

The pseudo-element that we’re using.

Implementations§

source§

impl ComputedValues

source

pub fn pseudo(&self) -> Option<&PseudoElement>

Returns the pseudo-element that this style represents.

source

pub fn is_pseudo_style(&self) -> bool

Returns true if this is the style for a pseudo-element.

source

pub fn is_display_contents(&self) -> bool

Returns whether this style’s display value is equal to contents.

source

pub fn rules(&self) -> &StrongRuleNode

Gets a reference to the rule node. Panic if no rule node exists.

source

pub fn visited_style(&self) -> Option<&ComputedValues>

Returns the visited style, if any.

source

pub fn visited_rules(&self) -> Option<&StrongRuleNode>

Returns the visited rules, if applicable.

source

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

Gets a reference to the custom properties map (if one exists).

source

pub fn custom_properties_equal(&self, other: &Self) -> bool

Returns whether we have the same custom properties as another style.

This should effectively be just:

self.custom_properties() == other.custom_properties()

But that’s not really the case because IndexMap equality doesn’t consider ordering, which we have to account for. Also, for the same reason, IndexMap equality comparisons are slower than needed.

See https://github.com/bluss/indexmap/issues/153

source

pub fn clone_align_content(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_align_items(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_align_self(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_aspect_ratio(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_backface_visibility(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_collapse(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_image_repeat(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_box_sizing(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_caption_side(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_clear(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_column_count(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_direction(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_display(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_empty_cells(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_flex_direction(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_flex_wrap(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_float(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_font_stretch(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_font_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_font_variant_caps(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_font_weight(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_image_rendering(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_justify_content(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_list_style_position(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_list_style_type(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_mix_blend_mode(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_opacity(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_order(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_outline_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_overflow_wrap(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_pointer_events(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_position(&self) -> T

Gets the computed value of a given property.

source

pub fn clone__servo_overflow_clip_box(&self) -> T

Gets the computed value of a given property.

source

pub fn clone__servo_top_layer(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_table_layout(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_align(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_decoration_line(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_justify(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_rendering(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_transform(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transform_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_unicode_bidi(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_visibility(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_white_space(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_word_break(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_writing_mode(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_z_index(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_flex_grow(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_flex_shrink(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_overflow_block(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_overflow_inline(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_overflow_x(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_overflow_y(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_block_end_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_block_start_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_bottom_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_inline_end_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_inline_start_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_left_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_right_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_top_style(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_delay(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_direction(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_duration(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_fill_mode(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_iteration_count(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_name(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_play_state(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_timeline(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_animation_timing_function(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_attachment(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_clip(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_image(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_origin(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_position_x(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_position_y(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_repeat(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_size(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_image_outset(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_image_slice(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_image_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_spacing(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_box_shadow(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_clip(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_column_gap(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_column_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_content(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_counter_increment(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_counter_reset(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_cursor(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_filter(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_flex_basis(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_font_family(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_font_size(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_letter_spacing(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_line_height(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_outline_offset(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_perspective(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_perspective_origin(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_quotes(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_rotate(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_scale(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_indent(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_overflow(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_text_shadow(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transform(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transform_origin(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transition_delay(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transition_duration(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transition_property(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_transition_timing_function(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_translate(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_vertical_align(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_word_spacing(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_image_source(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_list_style_image(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_max_block_size(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_max_height(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_max_inline_size(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_max_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_bottom_left_radius(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_bottom_right_radius(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_end_end_radius(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_end_start_radius(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_start_end_radius(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_start_start_radius(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_top_left_radius(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_top_right_radius(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_padding_block_end(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_padding_block_start(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_padding_bottom(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_padding_inline_end(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_padding_inline_start(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_padding_left(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_padding_right(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_padding_top(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_block_size(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_height(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_inline_size(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_min_block_size(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_min_height(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_min_inline_size(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_min_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_block_end_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_block_start_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_bottom_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_inline_end_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_inline_start_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_left_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_right_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_top_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_outline_width(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_background_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_block_end_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_block_start_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_bottom_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_inline_end_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_inline_start_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_left_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_right_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_border_top_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_outline_color(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_bottom(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_inset_block_end(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_inset_block_start(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_inset_inline_end(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_inset_inline_start(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_left(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_margin_block_end(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_margin_block_start(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_margin_bottom(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_margin_inline_end(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_margin_inline_start(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_margin_left(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_margin_right(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_margin_top(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_right(&self) -> T

Gets the computed value of a given property.

source

pub fn clone_top(&self) -> T

Gets the computed value of a given property.

source

pub fn get_resolved_value(
    &self,
    property_id: LonghandId,
    dest: &mut CssStringWriter
) -> Result

Writes the value of the given longhand as a string in dest.

Note that the value will usually be the computed value, except for colors, where it’s resolved.

TODO(emilio): We should move all the special resolution from nsComputedDOMStyle to ToResolvedValue instead.

source

pub fn resolved_declaration(
    &self,
    property_id: LonghandId
) -> PropertyDeclaration

Returns the given longhand’s resolved value as a property declaration.

source

pub fn resolve_color(&self, color: Color) -> RGBA

Resolves the currentColor keyword.

Any color value from computed values (except for the ‘color’ property itself) should go through this method.

Usage example: let top_color = style.resolve_color(style.get_border().clone_border_top_color());

source

pub fn transition_properties<'a>(&'a self) -> TransitionPropertyIterator<'a>

Create a TransitionPropertyIterator for this styles transition properties.

source§

impl ComputedValues

source

pub fn new(
    pseudo: Option<&PseudoElement>,
    custom_properties: Option<Arc<CustomPropertiesMap>>,
    writing_mode: WritingMode,
    flags: ComputedValueFlags,
    rules: Option<StrongRuleNode>,
    visited_style: Option<Arc<ComputedValues>>,
    background: Arc<Background>,
    border: Arc<Border>,
    box_: Arc<Box>,
    column: Arc<Column>,
    counters: Arc<Counters>,
    effects: Arc<Effects>,
    font: Arc<Font>,
    inherited_box: Arc<InheritedBox>,
    inherited_table: Arc<InheritedTable>,
    inherited_text: Arc<InheritedText>,
    inherited_ui: Arc<InheritedUI>,
    list: Arc<List>,
    margin: Arc<Margin>,
    outline: Arc<Outline>,
    padding: Arc<Padding>,
    position: Arc<Position>,
    table: Arc<Table>,
    text: Arc<Text>
) -> Arc<Self>

Create a new refcounted ComputedValues

source

pub fn initial_values() -> &'static Self

Get the initial computed values.

source

pub fn computed_value_to_string(
    &self,
    property: PropertyDeclarationId<'_>
) -> String

Serializes the computed value of this property as a string.

Methods from Deref<Target = ComputedValuesInner>§

source

pub fn clone_background(&self) -> Arc<Background>

Clone the Background struct.

source

pub fn get_background(&self) -> &Background

Get a immutable reference to the Background struct.

source

pub fn background_arc(&self) -> &Arc<Background>

Gets an immutable reference to the refcounted value that wraps Background.

source

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

Get a mutable reference to the Background struct.

source

pub fn clone_border(&self) -> Arc<Border>

Clone the Border struct.

source

pub fn get_border(&self) -> &Border

Get a immutable reference to the Border struct.

source

pub fn border_arc(&self) -> &Arc<Border>

Gets an immutable reference to the refcounted value that wraps Border.

source

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

Get a mutable reference to the Border struct.

source

pub fn clone_box(&self) -> Arc<Box>

Clone the Box struct.

source

pub fn get_box(&self) -> &Box

Get a immutable reference to the Box struct.

source

pub fn box_arc(&self) -> &Arc<Box>

Gets an immutable reference to the refcounted value that wraps Box.

source

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

Get a mutable reference to the Box struct.

source

pub fn clone_column(&self) -> Arc<Column>

Clone the Column struct.

source

pub fn get_column(&self) -> &Column

Get a immutable reference to the Column struct.

source

pub fn column_arc(&self) -> &Arc<Column>

Gets an immutable reference to the refcounted value that wraps Column.

source

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

Get a mutable reference to the Column struct.

source

pub fn clone_counters(&self) -> Arc<Counters>

Clone the Counters struct.

source

pub fn get_counters(&self) -> &Counters

Get a immutable reference to the Counters struct.

source

pub fn counters_arc(&self) -> &Arc<Counters>

Gets an immutable reference to the refcounted value that wraps Counters.

source

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

Get a mutable reference to the Counters struct.

source

pub fn clone_effects(&self) -> Arc<Effects>

Clone the Effects struct.

source

pub fn get_effects(&self) -> &Effects

Get a immutable reference to the Effects struct.

source

pub fn effects_arc(&self) -> &Arc<Effects>

Gets an immutable reference to the refcounted value that wraps Effects.

source

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

Get a mutable reference to the Effects struct.

source

pub fn clone_font(&self) -> Arc<Font>

Clone the Font struct.

source

pub fn get_font(&self) -> &Font

Get a immutable reference to the Font struct.

source

pub fn font_arc(&self) -> &Arc<Font>

Gets an immutable reference to the refcounted value that wraps Font.

source

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

Get a mutable reference to the Font struct.

source

pub fn clone_inherited_box(&self) -> Arc<InheritedBox>

Clone the InheritedBox struct.

source

pub fn get_inherited_box(&self) -> &InheritedBox

Get a immutable reference to the InheritedBox struct.

source

pub fn inherited_box_arc(&self) -> &Arc<InheritedBox>

Gets an immutable reference to the refcounted value that wraps InheritedBox.

source

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

Get a mutable reference to the InheritedBox struct.

source

pub fn clone_inherited_table(&self) -> Arc<InheritedTable>

Clone the InheritedTable struct.

source

pub fn get_inherited_table(&self) -> &InheritedTable

Get a immutable reference to the InheritedTable struct.

source

pub fn inherited_table_arc(&self) -> &Arc<InheritedTable>

Gets an immutable reference to the refcounted value that wraps InheritedTable.

source

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

Get a mutable reference to the InheritedTable struct.

source

pub fn clone_inherited_text(&self) -> Arc<InheritedText>

Clone the InheritedText struct.

source

pub fn get_inherited_text(&self) -> &InheritedText

Get a immutable reference to the InheritedText struct.

source

pub fn inherited_text_arc(&self) -> &Arc<InheritedText>

Gets an immutable reference to the refcounted value that wraps InheritedText.

source

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

Get a mutable reference to the InheritedText struct.

source

pub fn clone_inherited_ui(&self) -> Arc<InheritedUI>

Clone the InheritedUI struct.

source

pub fn get_inherited_ui(&self) -> &InheritedUI

Get a immutable reference to the InheritedUI struct.

source

pub fn inherited_ui_arc(&self) -> &Arc<InheritedUI>

Gets an immutable reference to the refcounted value that wraps InheritedUI.

source

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

Get a mutable reference to the InheritedUI struct.

source

pub fn clone_list(&self) -> Arc<List>

Clone the List struct.

source

pub fn get_list(&self) -> &List

Get a immutable reference to the List struct.

source

pub fn list_arc(&self) -> &Arc<List>

Gets an immutable reference to the refcounted value that wraps List.

source

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

Get a mutable reference to the List struct.

source

pub fn clone_margin(&self) -> Arc<Margin>

Clone the Margin struct.

source

pub fn get_margin(&self) -> &Margin

Get a immutable reference to the Margin struct.

source

pub fn margin_arc(&self) -> &Arc<Margin>

Gets an immutable reference to the refcounted value that wraps Margin.

source

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

Get a mutable reference to the Margin struct.

source

pub fn clone_outline(&self) -> Arc<Outline>

Clone the Outline struct.

source

pub fn get_outline(&self) -> &Outline

Get a immutable reference to the Outline struct.

source

pub fn outline_arc(&self) -> &Arc<Outline>

Gets an immutable reference to the refcounted value that wraps Outline.

source

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

Get a mutable reference to the Outline struct.

source

pub fn clone_padding(&self) -> Arc<Padding>

Clone the Padding struct.

source

pub fn get_padding(&self) -> &Padding

Get a immutable reference to the Padding struct.

source

pub fn padding_arc(&self) -> &Arc<Padding>

Gets an immutable reference to the refcounted value that wraps Padding.

source

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

Get a mutable reference to the Padding struct.

source

pub fn clone_position(&self) -> Arc<Position>

Clone the Position struct.

source

pub fn get_position(&self) -> &Position

Get a immutable reference to the Position struct.

source

pub fn position_arc(&self) -> &Arc<Position>

Gets an immutable reference to the refcounted value that wraps Position.

source

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

Get a mutable reference to the Position struct.

source

pub fn clone_table(&self) -> Arc<Table>

Clone the Table struct.

source

pub fn get_table(&self) -> &Table

Get a immutable reference to the Table struct.

source

pub fn table_arc(&self) -> &Arc<Table>

Gets an immutable reference to the refcounted value that wraps Table.

source

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

Get a mutable reference to the Table struct.

source

pub fn clone_text(&self) -> Arc<Text>

Clone the Text struct.

source

pub fn get_text(&self) -> &Text

Get a immutable reference to the Text struct.

source

pub fn text_arc(&self) -> &Arc<Text>

Gets an immutable reference to the refcounted value that wraps Text.

source

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

Get a mutable reference to the Text struct.

source

pub fn rules(&self) -> &StrongRuleNode

Gets a reference to the rule node. Panic if no rule node exists.

source

pub fn ineffective_content_property(&self) -> bool

Returns whether the “content” property for the given style is completely ineffective, and would yield an empty ::before or ::after pseudo-element.

source

pub fn can_be_fragmented(&self) -> bool

Whether the current style or any of its ancestors is multicolumn.

source

pub fn is_multicol(&self) -> bool

Whether the current style is multicolumn.

source

pub fn content_inline_size(&self) -> &Size

Get the logical computed inline size.

source

pub fn content_block_size(&self) -> &Size

Get the logical computed block size.

source

pub fn min_inline_size(&self) -> &Size

Get the logical computed min inline size.

source

pub fn min_block_size(&self) -> &Size

Get the logical computed min block size.

source

pub fn max_inline_size(&self) -> &MaxSize

Get the logical computed max inline size.

source

pub fn max_block_size(&self) -> &MaxSize

Get the logical computed max block size.

source

pub fn logical_padding(&self) -> LogicalMargin<&LengthPercentage>

Get the logical computed padding for this writing mode.

source

pub fn border_width_for_writing_mode(
    &self,
    writing_mode: WritingMode
) -> LogicalMargin<Au>

Get the logical border width

source

pub fn logical_border_width(&self) -> LogicalMargin<Au>

Gets the logical computed border widths for this style.

source

pub fn logical_margin(&self) -> LogicalMargin<&LengthPercentageOrAuto>

Gets the logical computed margin from this style.

source

pub fn logical_position(&self) -> LogicalMargin<&LengthPercentageOrAuto>

Gets the logical position from this style.

source

pub fn overrides_transform_style(&self) -> bool

Return true if the effects force the transform style to be Flat

source

pub fn get_used_transform_style(&self) -> T

source

pub fn transform_requires_layer(&self) -> bool

Whether given this transform value, the compositor would require a layer.

Trait Implementations§

source§

impl Clone for ComputedValues

source§

fn clone(&self) -> ComputedValues

Returns a copy 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 ComputedValues

source§

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

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

impl Deref for ComputedValues

§

type Target = ComputedValuesInner

The resulting type after dereferencing.
source§

fn deref(&self) -> &ComputedValuesInner

Dereferences the value.
source§

impl DerefMut for ComputedValues

source§

fn deref_mut(&mut self) -> &mut ComputedValuesInner

Mutably dereferences the value.

Auto Trait Implementations§

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> ToOwned for Twhere
    T: Clone,

§

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 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.
§

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

§

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