Struct style::properties::generated::ComputedValues
source · 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
impl ComputedValues
sourcepub fn pseudo(&self) -> Option<&PseudoElement>
pub fn pseudo(&self) -> Option<&PseudoElement>
Returns the pseudo-element that this style represents.
sourcepub fn is_pseudo_style(&self) -> bool
pub fn is_pseudo_style(&self) -> bool
Returns true if this is the style for a pseudo-element.
sourcepub fn is_display_contents(&self) -> bool
pub fn is_display_contents(&self) -> bool
Returns whether this style’s display value is equal to contents.
sourcepub fn rules(&self) -> &StrongRuleNode
pub fn rules(&self) -> &StrongRuleNode
Gets a reference to the rule node. Panic if no rule node exists.
sourcepub fn visited_rules(&self) -> Option<&StrongRuleNode>
pub fn visited_rules(&self) -> Option<&StrongRuleNode>
Returns the visited rules, if applicable.
sourcepub fn custom_properties(&self) -> &ComputedCustomProperties
pub fn custom_properties(&self) -> &ComputedCustomProperties
Gets a reference to the custom properties map (if one exists).
sourcepub fn custom_properties_equal(&self, other: &Self) -> bool
pub fn custom_properties_equal(&self, other: &Self) -> bool
Returns whether we have the same custom properties as another style.
sourcepub fn clone_align_content(&self) -> T
pub fn clone_align_content(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_align_items(&self) -> T
pub fn clone_align_items(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_align_self(&self) -> T
pub fn clone_align_self(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_aspect_ratio(&self) -> T
pub fn clone_aspect_ratio(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_backface_visibility(&self) -> T
pub fn clone_backface_visibility(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_baseline_source(&self) -> T
pub fn clone_baseline_source(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_collapse(&self) -> T
pub fn clone_border_collapse(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_image_repeat(&self) -> T
pub fn clone_border_image_repeat(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_box_sizing(&self) -> T
pub fn clone_box_sizing(&self) -> T
Gets the computed value of a given property.
Gets the computed value of a given property.
sourcepub fn clone_clear(&self) -> T
pub fn clone_clear(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_column_count(&self) -> T
pub fn clone_column_count(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_column_span(&self) -> T
pub fn clone_column_span(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_container_type(&self) -> T
pub fn clone_container_type(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_direction(&self) -> T
pub fn clone_direction(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_display(&self) -> T
pub fn clone_display(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_empty_cells(&self) -> T
pub fn clone_empty_cells(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_flex_direction(&self) -> T
pub fn clone_flex_direction(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_flex_wrap(&self) -> T
pub fn clone_flex_wrap(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_float(&self) -> T
pub fn clone_float(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_font_language_override(&self) -> T
pub fn clone_font_language_override(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_font_stretch(&self) -> T
pub fn clone_font_stretch(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_font_style(&self) -> T
pub fn clone_font_style(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_font_variant_caps(&self) -> T
pub fn clone_font_variant_caps(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_font_weight(&self) -> T
pub fn clone_font_weight(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_image_rendering(&self) -> T
pub fn clone_image_rendering(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_justify_content(&self) -> T
pub fn clone_justify_content(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_list_style_position(&self) -> T
pub fn clone_list_style_position(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_list_style_type(&self) -> T
pub fn clone_list_style_type(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_mix_blend_mode(&self) -> T
pub fn clone_mix_blend_mode(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_opacity(&self) -> T
pub fn clone_opacity(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_order(&self) -> T
pub fn clone_order(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_outline_style(&self) -> T
pub fn clone_outline_style(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_overflow_wrap(&self) -> T
pub fn clone_overflow_wrap(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_pointer_events(&self) -> T
pub fn clone_pointer_events(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_position(&self) -> T
pub fn clone_position(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone__servo_overflow_clip_box(&self) -> T
pub fn clone__servo_overflow_clip_box(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone__servo_top_layer(&self) -> T
pub fn clone__servo_top_layer(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_table_layout(&self) -> T
pub fn clone_table_layout(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_text_align(&self) -> T
pub fn clone_text_align(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_text_align_last(&self) -> T
pub fn clone_text_align_last(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_text_decoration_line(&self) -> T
pub fn clone_text_decoration_line(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_text_decoration_style(&self) -> T
pub fn clone_text_decoration_style(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_text_justify(&self) -> T
pub fn clone_text_justify(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_text_rendering(&self) -> T
pub fn clone_text_rendering(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_text_transform(&self) -> T
pub fn clone_text_transform(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_transform_style(&self) -> T
pub fn clone_transform_style(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_unicode_bidi(&self) -> T
pub fn clone_unicode_bidi(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_visibility(&self) -> T
pub fn clone_visibility(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_white_space(&self) -> T
pub fn clone_white_space(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_word_break(&self) -> T
pub fn clone_word_break(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_writing_mode(&self) -> T
pub fn clone_writing_mode(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_z_index(&self) -> T
pub fn clone_z_index(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_flex_grow(&self) -> T
pub fn clone_flex_grow(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_flex_shrink(&self) -> T
pub fn clone_flex_shrink(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_overflow_x(&self) -> T
pub fn clone_overflow_x(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_overflow_y(&self) -> T
pub fn clone_overflow_y(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_bottom_style(&self) -> T
pub fn clone_border_bottom_style(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_left_style(&self) -> T
pub fn clone_border_left_style(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_right_style(&self) -> T
pub fn clone_border_right_style(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_top_style(&self) -> T
pub fn clone_border_top_style(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_animation_composition(&self) -> T
pub fn clone_animation_composition(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_animation_delay(&self) -> T
pub fn clone_animation_delay(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_animation_direction(&self) -> T
pub fn clone_animation_direction(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_animation_duration(&self) -> T
pub fn clone_animation_duration(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_animation_fill_mode(&self) -> T
pub fn clone_animation_fill_mode(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_animation_iteration_count(&self) -> T
pub fn clone_animation_iteration_count(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_animation_name(&self) -> T
pub fn clone_animation_name(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_animation_play_state(&self) -> T
pub fn clone_animation_play_state(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_animation_timeline(&self) -> T
pub fn clone_animation_timeline(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_animation_timing_function(&self) -> T
pub fn clone_animation_timing_function(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_background_attachment(&self) -> T
pub fn clone_background_attachment(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_background_clip(&self) -> T
pub fn clone_background_clip(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_background_image(&self) -> T
pub fn clone_background_image(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_background_origin(&self) -> T
pub fn clone_background_origin(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_background_position_x(&self) -> T
pub fn clone_background_position_x(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_background_position_y(&self) -> T
pub fn clone_background_position_y(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_background_repeat(&self) -> T
pub fn clone_background_repeat(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_background_size(&self) -> T
pub fn clone_background_size(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_image_outset(&self) -> T
pub fn clone_border_image_outset(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_image_slice(&self) -> T
pub fn clone_border_image_slice(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_image_width(&self) -> T
pub fn clone_border_image_width(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_spacing(&self) -> T
pub fn clone_border_spacing(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_box_shadow(&self) -> T
pub fn clone_box_shadow(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_clip(&self) -> T
pub fn clone_clip(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_color(&self) -> T
pub fn clone_color(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_column_gap(&self) -> T
pub fn clone_column_gap(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_column_width(&self) -> T
pub fn clone_column_width(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_container_name(&self) -> T
pub fn clone_container_name(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_content(&self) -> T
pub fn clone_content(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_counter_increment(&self) -> T
pub fn clone_counter_increment(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_counter_reset(&self) -> T
pub fn clone_counter_reset(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_cursor(&self) -> T
pub fn clone_cursor(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_filter(&self) -> T
pub fn clone_filter(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_flex_basis(&self) -> T
pub fn clone_flex_basis(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_font_family(&self) -> T
pub fn clone_font_family(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_font_size(&self) -> T
pub fn clone_font_size(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_letter_spacing(&self) -> T
pub fn clone_letter_spacing(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_line_height(&self) -> T
pub fn clone_line_height(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_outline_offset(&self) -> T
pub fn clone_outline_offset(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_perspective(&self) -> T
pub fn clone_perspective(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_perspective_origin(&self) -> T
pub fn clone_perspective_origin(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_quotes(&self) -> T
pub fn clone_quotes(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_rotate(&self) -> T
pub fn clone_rotate(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_scale(&self) -> T
pub fn clone_scale(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_text_indent(&self) -> T
pub fn clone_text_indent(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_text_overflow(&self) -> T
pub fn clone_text_overflow(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_text_shadow(&self) -> T
pub fn clone_text_shadow(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_transform(&self) -> T
pub fn clone_transform(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_transform_origin(&self) -> T
pub fn clone_transform_origin(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_transition_behavior(&self) -> T
pub fn clone_transition_behavior(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_transition_delay(&self) -> T
pub fn clone_transition_delay(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_transition_duration(&self) -> T
pub fn clone_transition_duration(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_transition_property(&self) -> T
pub fn clone_transition_property(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_transition_timing_function(&self) -> T
pub fn clone_transition_timing_function(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_translate(&self) -> T
pub fn clone_translate(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_vertical_align(&self) -> T
pub fn clone_vertical_align(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_word_spacing(&self) -> T
pub fn clone_word_spacing(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone__x_lang(&self) -> T
pub fn clone__x_lang(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_image_source(&self) -> T
pub fn clone_border_image_source(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_list_style_image(&self) -> T
pub fn clone_list_style_image(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_max_height(&self) -> T
pub fn clone_max_height(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_max_width(&self) -> T
pub fn clone_max_width(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_bottom_left_radius(&self) -> T
pub fn clone_border_bottom_left_radius(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_bottom_right_radius(&self) -> T
pub fn clone_border_bottom_right_radius(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_top_left_radius(&self) -> T
pub fn clone_border_top_left_radius(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_top_right_radius(&self) -> T
pub fn clone_border_top_right_radius(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_padding_bottom(&self) -> T
pub fn clone_padding_bottom(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_padding_left(&self) -> T
pub fn clone_padding_left(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_padding_right(&self) -> T
pub fn clone_padding_right(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_padding_top(&self) -> T
pub fn clone_padding_top(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_height(&self) -> T
pub fn clone_height(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_min_height(&self) -> T
pub fn clone_min_height(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_min_width(&self) -> T
pub fn clone_min_width(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_width(&self) -> T
pub fn clone_width(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_bottom_width(&self) -> T
pub fn clone_border_bottom_width(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_left_width(&self) -> T
pub fn clone_border_left_width(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_right_width(&self) -> T
pub fn clone_border_right_width(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_top_width(&self) -> T
pub fn clone_border_top_width(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_outline_width(&self) -> T
pub fn clone_outline_width(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_background_color(&self) -> T
pub fn clone_background_color(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_bottom_color(&self) -> T
pub fn clone_border_bottom_color(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_left_color(&self) -> T
pub fn clone_border_left_color(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_right_color(&self) -> T
pub fn clone_border_right_color(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_border_top_color(&self) -> T
pub fn clone_border_top_color(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_outline_color(&self) -> T
pub fn clone_outline_color(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_text_decoration_color(&self) -> T
pub fn clone_text_decoration_color(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_bottom(&self) -> T
pub fn clone_bottom(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_left(&self) -> T
pub fn clone_left(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_margin_bottom(&self) -> T
pub fn clone_margin_bottom(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_margin_left(&self) -> T
pub fn clone_margin_left(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_margin_right(&self) -> T
pub fn clone_margin_right(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_margin_top(&self) -> T
pub fn clone_margin_top(&self) -> T
Gets the computed value of a given property.
sourcepub fn clone_right(&self) -> T
pub fn clone_right(&self) -> T
Gets the computed value of a given property.
sourcepub fn computed_or_resolved_value(
&self,
property_id: LonghandId,
context: Option<&Context<'_>>,
dest: &mut CssStringWriter
) -> Result
pub fn computed_or_resolved_value( &self, property_id: LonghandId, context: Option<&Context<'_>>, dest: &mut CssStringWriter ) -> Result
Writes the (resolved or computed) value of the given longhand as a string in dest
.
TODO(emilio): We should move all the special resolution from nsComputedDOMStyle to ToResolvedValue instead.
sourcepub fn computed_or_resolved_declaration(
&self,
property_id: LonghandId,
context: Option<&Context<'_>>
) -> PropertyDeclaration
pub fn computed_or_resolved_declaration( &self, property_id: LonghandId, context: Option<&Context<'_>> ) -> PropertyDeclaration
Returns the given longhand’s resolved value as a property declaration.
sourcepub fn resolve_color(&self, color: Color) -> AbsoluteColor
pub fn resolve_color(&self, color: Color) -> AbsoluteColor
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());
sourcepub fn transition_properties<'a>(&'a self) -> TransitionPropertyIterator<'a> ⓘ
pub fn transition_properties<'a>(&'a self) -> TransitionPropertyIterator<'a> ⓘ
Create a TransitionPropertyIterator
for this styles transition properties.
source§impl ComputedValues
impl ComputedValues
sourcepub fn new(
pseudo: Option<&PseudoElement>,
custom_properties: ComputedCustomProperties,
writing_mode: WritingMode,
effective_zoom: Zoom,
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>,
ui: Arc<UI>
) -> Arc<Self>
pub fn new( pseudo: Option<&PseudoElement>, custom_properties: ComputedCustomProperties, writing_mode: WritingMode, effective_zoom: Zoom, 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>, ui: Arc<UI> ) -> Arc<Self>
Create a new refcounted ComputedValues
sourcepub fn initial_values() -> &'static Self
pub fn initial_values() -> &'static Self
Get the initial computed values.
sourcepub fn computed_value_to_string(
&self,
property: PropertyDeclarationId<'_>
) -> String
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>§
sourcepub fn visited_style(&self) -> Option<&ComputedValues>
pub fn visited_style(&self) -> Option<&ComputedValues>
Returns the visited style, if any.
sourcepub fn clone_background(&self) -> Arc<Background>
pub fn clone_background(&self) -> Arc<Background>
Clone the Background struct.
sourcepub fn get_background(&self) -> &Background
pub fn get_background(&self) -> &Background
Get a immutable reference to the Background struct.
sourcepub fn mutate_background(&mut self) -> &mut Background
pub fn mutate_background(&mut self) -> &mut Background
Get a mutable reference to the Background struct.
sourcepub fn clone_border(&self) -> Arc<Border>
pub fn clone_border(&self) -> Arc<Border>
Clone the Border struct.
sourcepub fn get_border(&self) -> &Border
pub fn get_border(&self) -> &Border
Get a immutable reference to the Border struct.
sourcepub fn mutate_border(&mut self) -> &mut Border
pub fn mutate_border(&mut self) -> &mut Border
Get a mutable reference to the Border struct.
sourcepub fn mutate_box(&mut self) -> &mut Box
pub fn mutate_box(&mut self) -> &mut Box
Get a mutable reference to the Box struct.
sourcepub fn clone_column(&self) -> Arc<Column>
pub fn clone_column(&self) -> Arc<Column>
Clone the Column struct.
sourcepub fn get_column(&self) -> &Column
pub fn get_column(&self) -> &Column
Get a immutable reference to the Column struct.
sourcepub fn mutate_column(&mut self) -> &mut Column
pub fn mutate_column(&mut self) -> &mut Column
Get a mutable reference to the Column struct.
sourcepub fn clone_counters(&self) -> Arc<Counters>
pub fn clone_counters(&self) -> Arc<Counters>
Clone the Counters struct.
sourcepub fn get_counters(&self) -> &Counters
pub fn get_counters(&self) -> &Counters
Get a immutable reference to the Counters struct.
sourcepub fn mutate_counters(&mut self) -> &mut Counters
pub fn mutate_counters(&mut self) -> &mut Counters
Get a mutable reference to the Counters struct.
sourcepub fn clone_effects(&self) -> Arc<Effects>
pub fn clone_effects(&self) -> Arc<Effects>
Clone the Effects struct.
sourcepub fn get_effects(&self) -> &Effects
pub fn get_effects(&self) -> &Effects
Get a immutable reference to the Effects struct.
sourcepub fn mutate_effects(&mut self) -> &mut Effects
pub fn mutate_effects(&mut self) -> &mut Effects
Get a mutable reference to the Effects struct.
sourcepub fn clone_font(&self) -> Arc<Font>
pub fn clone_font(&self) -> Arc<Font>
Clone the Font struct.
sourcepub fn mutate_font(&mut self) -> &mut Font
pub fn mutate_font(&mut self) -> &mut Font
Get a mutable reference to the Font struct.
sourcepub fn clone_inherited_box(&self) -> Arc<InheritedBox>
pub fn clone_inherited_box(&self) -> Arc<InheritedBox>
Clone the InheritedBox struct.
sourcepub fn get_inherited_box(&self) -> &InheritedBox
pub fn get_inherited_box(&self) -> &InheritedBox
Get a immutable reference to the InheritedBox struct.
sourcepub fn mutate_inherited_box(&mut self) -> &mut InheritedBox
pub fn mutate_inherited_box(&mut self) -> &mut InheritedBox
Get a mutable reference to the InheritedBox struct.
sourcepub fn clone_inherited_table(&self) -> Arc<InheritedTable>
pub fn clone_inherited_table(&self) -> Arc<InheritedTable>
Clone the InheritedTable struct.
sourcepub fn get_inherited_table(&self) -> &InheritedTable
pub fn get_inherited_table(&self) -> &InheritedTable
Get a immutable reference to the InheritedTable struct.
sourcepub fn mutate_inherited_table(&mut self) -> &mut InheritedTable
pub fn mutate_inherited_table(&mut self) -> &mut InheritedTable
Get a mutable reference to the InheritedTable struct.
sourcepub fn clone_inherited_text(&self) -> Arc<InheritedText>
pub fn clone_inherited_text(&self) -> Arc<InheritedText>
Clone the InheritedText struct.
sourcepub fn get_inherited_text(&self) -> &InheritedText
pub fn get_inherited_text(&self) -> &InheritedText
Get a immutable reference to the InheritedText struct.
sourcepub fn mutate_inherited_text(&mut self) -> &mut InheritedText
pub fn mutate_inherited_text(&mut self) -> &mut InheritedText
Get a mutable reference to the InheritedText struct.
sourcepub fn clone_inherited_ui(&self) -> Arc<InheritedUI>
pub fn clone_inherited_ui(&self) -> Arc<InheritedUI>
Clone the InheritedUI struct.
sourcepub fn get_inherited_ui(&self) -> &InheritedUI
pub fn get_inherited_ui(&self) -> &InheritedUI
Get a immutable reference to the InheritedUI struct.
sourcepub fn mutate_inherited_ui(&mut self) -> &mut InheritedUI
pub fn mutate_inherited_ui(&mut self) -> &mut InheritedUI
Get a mutable reference to the InheritedUI struct.
sourcepub fn clone_list(&self) -> Arc<List>
pub fn clone_list(&self) -> Arc<List>
Clone the List struct.
sourcepub fn mutate_list(&mut self) -> &mut List
pub fn mutate_list(&mut self) -> &mut List
Get a mutable reference to the List struct.
sourcepub fn clone_margin(&self) -> Arc<Margin>
pub fn clone_margin(&self) -> Arc<Margin>
Clone the Margin struct.
sourcepub fn get_margin(&self) -> &Margin
pub fn get_margin(&self) -> &Margin
Get a immutable reference to the Margin struct.
sourcepub fn mutate_margin(&mut self) -> &mut Margin
pub fn mutate_margin(&mut self) -> &mut Margin
Get a mutable reference to the Margin struct.
sourcepub fn clone_outline(&self) -> Arc<Outline>
pub fn clone_outline(&self) -> Arc<Outline>
Clone the Outline struct.
sourcepub fn get_outline(&self) -> &Outline
pub fn get_outline(&self) -> &Outline
Get a immutable reference to the Outline struct.
sourcepub fn mutate_outline(&mut self) -> &mut Outline
pub fn mutate_outline(&mut self) -> &mut Outline
Get a mutable reference to the Outline struct.
sourcepub fn clone_padding(&self) -> Arc<Padding>
pub fn clone_padding(&self) -> Arc<Padding>
Clone the Padding struct.
sourcepub fn get_padding(&self) -> &Padding
pub fn get_padding(&self) -> &Padding
Get a immutable reference to the Padding struct.
sourcepub fn mutate_padding(&mut self) -> &mut Padding
pub fn mutate_padding(&mut self) -> &mut Padding
Get a mutable reference to the Padding struct.
sourcepub fn clone_position(&self) -> Arc<Position>
pub fn clone_position(&self) -> Arc<Position>
Clone the Position struct.
sourcepub fn get_position(&self) -> &Position
pub fn get_position(&self) -> &Position
Get a immutable reference to the Position struct.
sourcepub fn mutate_position(&mut self) -> &mut Position
pub fn mutate_position(&mut self) -> &mut Position
Get a mutable reference to the Position struct.
sourcepub fn clone_table(&self) -> Arc<Table>
pub fn clone_table(&self) -> Arc<Table>
Clone the Table struct.
sourcepub fn mutate_table(&mut self) -> &mut Table
pub fn mutate_table(&mut self) -> &mut Table
Get a mutable reference to the Table struct.
sourcepub fn clone_text(&self) -> Arc<Text>
pub fn clone_text(&self) -> Arc<Text>
Clone the Text struct.
sourcepub fn mutate_text(&mut self) -> &mut Text
pub fn mutate_text(&mut self) -> &mut Text
Get a mutable reference to the Text struct.
sourcepub fn rules(&self) -> &StrongRuleNode
pub fn rules(&self) -> &StrongRuleNode
Gets a reference to the rule node. Panic if no rule node exists.
sourcepub fn ineffective_content_property(&self) -> bool
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.
sourcepub fn can_be_fragmented(&self) -> bool
pub fn can_be_fragmented(&self) -> bool
Whether the current style or any of its ancestors is multicolumn.
sourcepub fn is_multicol(&self) -> bool
pub fn is_multicol(&self) -> bool
Whether the current style is multicolumn.
sourcepub fn content_inline_size(&self) -> &Size
pub fn content_inline_size(&self) -> &Size
Get the logical computed inline size.
sourcepub fn content_block_size(&self) -> &Size
pub fn content_block_size(&self) -> &Size
Get the logical computed block size.
sourcepub fn min_inline_size(&self) -> &Size
pub fn min_inline_size(&self) -> &Size
Get the logical computed min inline size.
sourcepub fn min_block_size(&self) -> &Size
pub fn min_block_size(&self) -> &Size
Get the logical computed min block size.
sourcepub fn max_inline_size(&self) -> &MaxSize
pub fn max_inline_size(&self) -> &MaxSize
Get the logical computed max inline size.
sourcepub fn max_block_size(&self) -> &MaxSize
pub fn max_block_size(&self) -> &MaxSize
Get the logical computed max block size.
sourcepub fn logical_padding(&self) -> LogicalMargin<&LengthPercentage>
pub fn logical_padding(&self) -> LogicalMargin<&LengthPercentage>
Get the logical computed padding for this writing mode.
sourcepub fn border_width_for_writing_mode(
&self,
writing_mode: WritingMode
) -> LogicalMargin<Au>
pub fn border_width_for_writing_mode( &self, writing_mode: WritingMode ) -> LogicalMargin<Au>
Get the logical border width
sourcepub fn logical_border_width(&self) -> LogicalMargin<Au>
pub fn logical_border_width(&self) -> LogicalMargin<Au>
Gets the logical computed border widths for this style.
sourcepub fn logical_margin(&self) -> LogicalMargin<&LengthPercentageOrAuto>
pub fn logical_margin(&self) -> LogicalMargin<&LengthPercentageOrAuto>
Gets the logical computed margin from this style.
sourcepub fn logical_position(&self) -> LogicalMargin<&LengthPercentageOrAuto>
pub fn logical_position(&self) -> LogicalMargin<&LengthPercentageOrAuto>
Gets the logical position from this style.
sourcepub fn overrides_transform_style(&self) -> bool
pub fn overrides_transform_style(&self) -> bool
Return true if the effects force the transform style to be Flat
sourcepub fn get_used_transform_style(&self) -> T
pub fn get_used_transform_style(&self) -> T
sourcepub fn transform_requires_layer(&self) -> bool
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
impl Clone for ComputedValues
source§fn clone(&self) -> ComputedValues
fn clone(&self) -> ComputedValues
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ComputedValues
impl Debug for ComputedValues
source§impl Deref for ComputedValues
impl Deref for ComputedValues
§type Target = ComputedValuesInner
type Target = ComputedValuesInner
source§fn deref(&self) -> &ComputedValuesInner
fn deref(&self) -> &ComputedValuesInner
source§impl DerefMut for ComputedValues
impl DerefMut for ComputedValues
source§fn deref_mut(&mut self) -> &mut ComputedValuesInner
fn deref_mut(&mut self) -> &mut ComputedValuesInner
Auto Trait Implementations§
impl !RefUnwindSafe for ComputedValues
impl Send for ComputedValues
impl Sync for ComputedValues
impl Unpin for ComputedValues
impl !UnwindSafe for ComputedValues
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where F: FnOnce(&Self) -> bool,
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more