Struct style::properties::ComputedValues
[−]
[src]
pub struct ComputedValues { /* fields omitted */ }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.
Methods
impl ComputedValues[src]
pub fn is_style_if_visited(&self) -> bool[src]
Whether we're a visited style.
pub fn rules(&self) -> &StrongRuleNode[src]
Gets a reference to the rule node. Panic if no rule node exists.
pub fn visited_style(&self) -> Option<&ComputedValues>[src]
Returns the visited style, if any.
pub fn visited_rules(&self) -> Option<&StrongRuleNode>[src]
Returns the visited rules, if applicable.
pub fn is_in_display_none_subtree(&self) -> bool[src]
Returns whether we're in a display: none subtree.
pub fn custom_properties(&self) -> Option<&Arc<CustomPropertiesMap>>[src]
Gets a reference to the custom properties map (if one exists).
impl ComputedValues[src]
pub fn new(
_: &Device,
_: Option<&ComputedValues>,
_: 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>,
color: Arc<Color>,
column: Arc<Column>,
counters: Arc<Counters>,
effects: Arc<Effects>,
font: Arc<Font>,
inheritedbox: Arc<InheritedBox>,
inheritedtable: Arc<InheritedTable>,
inheritedtext: Arc<InheritedText>,
list: Arc<List>,
margin: Arc<Margin>,
outline: Arc<Outline>,
padding: Arc<Padding>,
pointing: Arc<Pointing>,
position: Arc<Position>,
table: Arc<Table>,
text: Arc<Text>
) -> Arc<Self>[src]
_: &Device,
_: Option<&ComputedValues>,
_: 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>,
color: Arc<Color>,
column: Arc<Column>,
counters: Arc<Counters>,
effects: Arc<Effects>,
font: Arc<Font>,
inheritedbox: Arc<InheritedBox>,
inheritedtable: Arc<InheritedTable>,
inheritedtext: Arc<InheritedText>,
list: Arc<List>,
margin: Arc<Margin>,
outline: Arc<Outline>,
padding: Arc<Padding>,
pointing: Arc<Pointing>,
position: Arc<Position>,
table: Arc<Table>,
text: Arc<Text>
) -> Arc<Self>
Create a new refcounted ComputedValues
ⓘImportant traits for &'a mut Wpub fn initial_values() -> &'static Self[src]
Get the initial computed values.
Methods from Deref<Target = ComputedValuesInner>
pub fn clone_background(&self) -> Arc<Background>[src]
Clone the Background struct.
pub fn get_background(&self) -> &Background[src]
Get a immutable reference to the Background struct.
pub fn background_arc(&self) -> &Arc<Background>[src]
Gets an immutable reference to the refcounted value that wraps
Background.
pub fn mutate_background(&mut self) -> &mut Background[src]
Get a mutable reference to the Background struct.
pub fn clone_border(&self) -> Arc<Border>[src]
Clone the Border struct.
pub fn get_border(&self) -> &Border[src]
Get a immutable reference to the Border struct.
pub fn border_arc(&self) -> &Arc<Border>[src]
Gets an immutable reference to the refcounted value that wraps
Border.
pub fn mutate_border(&mut self) -> &mut Border[src]
Get a mutable reference to the Border struct.
pub fn clone_box(&self) -> Arc<Box>[src]
Clone the Box struct.
pub fn get_box(&self) -> &Box[src]
Get a immutable reference to the Box struct.
pub fn box_arc(&self) -> &Arc<Box>[src]
Gets an immutable reference to the refcounted value that wraps
Box.
pub fn mutate_box(&mut self) -> &mut Box[src]
Get a mutable reference to the Box struct.
pub fn clone_color(&self) -> Arc<Color>[src]
Clone the Color struct.
pub fn get_color(&self) -> &Color[src]
Get a immutable reference to the Color struct.
pub fn color_arc(&self) -> &Arc<Color>[src]
Gets an immutable reference to the refcounted value that wraps
Color.
pub fn mutate_color(&mut self) -> &mut Color[src]
Get a mutable reference to the Color struct.
pub fn clone_column(&self) -> Arc<Column>[src]
Clone the Column struct.
pub fn get_column(&self) -> &Column[src]
Get a immutable reference to the Column struct.
pub fn column_arc(&self) -> &Arc<Column>[src]
Gets an immutable reference to the refcounted value that wraps
Column.
pub fn mutate_column(&mut self) -> &mut Column[src]
Get a mutable reference to the Column struct.
pub fn clone_counters(&self) -> Arc<Counters>[src]
Clone the Counters struct.
pub fn get_counters(&self) -> &Counters[src]
Get a immutable reference to the Counters struct.
pub fn counters_arc(&self) -> &Arc<Counters>[src]
Gets an immutable reference to the refcounted value that wraps
Counters.
pub fn mutate_counters(&mut self) -> &mut Counters[src]
Get a mutable reference to the Counters struct.
pub fn clone_effects(&self) -> Arc<Effects>[src]
Clone the Effects struct.
pub fn get_effects(&self) -> &Effects[src]
Get a immutable reference to the Effects struct.
pub fn effects_arc(&self) -> &Arc<Effects>[src]
Gets an immutable reference to the refcounted value that wraps
Effects.
pub fn mutate_effects(&mut self) -> &mut Effects[src]
Get a mutable reference to the Effects struct.
pub fn clone_font(&self) -> Arc<Font>[src]
Clone the Font struct.
pub fn get_font(&self) -> &Font[src]
Get a immutable reference to the Font struct.
pub fn font_arc(&self) -> &Arc<Font>[src]
Gets an immutable reference to the refcounted value that wraps
Font.
pub fn mutate_font(&mut self) -> &mut Font[src]
Get a mutable reference to the Font struct.
pub fn clone_inheritedbox(&self) -> Arc<InheritedBox>[src]
Clone the InheritedBox struct.
pub fn get_inheritedbox(&self) -> &InheritedBox[src]
Get a immutable reference to the InheritedBox struct.
pub fn inheritedbox_arc(&self) -> &Arc<InheritedBox>[src]
Gets an immutable reference to the refcounted value that wraps
InheritedBox.
pub fn mutate_inheritedbox(&mut self) -> &mut InheritedBox[src]
Get a mutable reference to the InheritedBox struct.
pub fn clone_inheritedtable(&self) -> Arc<InheritedTable>[src]
Clone the InheritedTable struct.
pub fn get_inheritedtable(&self) -> &InheritedTable[src]
Get a immutable reference to the InheritedTable struct.
pub fn inheritedtable_arc(&self) -> &Arc<InheritedTable>[src]
Gets an immutable reference to the refcounted value that wraps
InheritedTable.
pub fn mutate_inheritedtable(&mut self) -> &mut InheritedTable[src]
Get a mutable reference to the InheritedTable struct.
pub fn clone_inheritedtext(&self) -> Arc<InheritedText>[src]
Clone the InheritedText struct.
pub fn get_inheritedtext(&self) -> &InheritedText[src]
Get a immutable reference to the InheritedText struct.
pub fn inheritedtext_arc(&self) -> &Arc<InheritedText>[src]
Gets an immutable reference to the refcounted value that wraps
InheritedText.
pub fn mutate_inheritedtext(&mut self) -> &mut InheritedText[src]
Get a mutable reference to the InheritedText struct.
pub fn clone_list(&self) -> Arc<List>[src]
Clone the List struct.
pub fn get_list(&self) -> &List[src]
Get a immutable reference to the List struct.
pub fn list_arc(&self) -> &Arc<List>[src]
Gets an immutable reference to the refcounted value that wraps
List.
pub fn mutate_list(&mut self) -> &mut List[src]
Get a mutable reference to the List struct.
pub fn clone_margin(&self) -> Arc<Margin>[src]
Clone the Margin struct.
pub fn get_margin(&self) -> &Margin[src]
Get a immutable reference to the Margin struct.
pub fn margin_arc(&self) -> &Arc<Margin>[src]
Gets an immutable reference to the refcounted value that wraps
Margin.
pub fn mutate_margin(&mut self) -> &mut Margin[src]
Get a mutable reference to the Margin struct.
pub fn clone_outline(&self) -> Arc<Outline>[src]
Clone the Outline struct.
pub fn get_outline(&self) -> &Outline[src]
Get a immutable reference to the Outline struct.
pub fn outline_arc(&self) -> &Arc<Outline>[src]
Gets an immutable reference to the refcounted value that wraps
Outline.
pub fn mutate_outline(&mut self) -> &mut Outline[src]
Get a mutable reference to the Outline struct.
pub fn clone_padding(&self) -> Arc<Padding>[src]
Clone the Padding struct.
pub fn get_padding(&self) -> &Padding[src]
Get a immutable reference to the Padding struct.
pub fn padding_arc(&self) -> &Arc<Padding>[src]
Gets an immutable reference to the refcounted value that wraps
Padding.
pub fn mutate_padding(&mut self) -> &mut Padding[src]
Get a mutable reference to the Padding struct.
pub fn clone_pointing(&self) -> Arc<Pointing>[src]
Clone the Pointing struct.
pub fn get_pointing(&self) -> &Pointing[src]
Get a immutable reference to the Pointing struct.
pub fn pointing_arc(&self) -> &Arc<Pointing>[src]
Gets an immutable reference to the refcounted value that wraps
Pointing.
pub fn mutate_pointing(&mut self) -> &mut Pointing[src]
Get a mutable reference to the Pointing struct.
pub fn clone_position(&self) -> Arc<Position>[src]
Clone the Position struct.
pub fn get_position(&self) -> &Position[src]
Get a immutable reference to the Position struct.
pub fn position_arc(&self) -> &Arc<Position>[src]
Gets an immutable reference to the refcounted value that wraps
Position.
pub fn mutate_position(&mut self) -> &mut Position[src]
Get a mutable reference to the Position struct.
pub fn clone_table(&self) -> Arc<Table>[src]
Clone the Table struct.
pub fn get_table(&self) -> &Table[src]
Get a immutable reference to the Table struct.
pub fn table_arc(&self) -> &Arc<Table>[src]
Gets an immutable reference to the refcounted value that wraps
Table.
pub fn mutate_table(&mut self) -> &mut Table[src]
Get a mutable reference to the Table struct.
pub fn clone_text(&self) -> Arc<Text>[src]
Clone the Text struct.
pub fn get_text(&self) -> &Text[src]
Get a immutable reference to the Text struct.
pub fn text_arc(&self) -> &Arc<Text>[src]
Gets an immutable reference to the refcounted value that wraps
Text.
pub fn mutate_text(&mut self) -> &mut Text[src]
Get a mutable reference to the Text struct.
pub fn rules(&self) -> &StrongRuleNode[src]
Gets a reference to the rule node. Panic if no rule node exists.
pub fn has_moz_binding(&self) -> bool[src]
Whether this style has a -moz-binding value. This is always false for Servo for obvious reasons.
pub fn clone_visited_style(&self) -> Option<Arc<ComputedValues>>[src]
Clone the visited style. Used for inheriting parent styles in StyleBuilder::for_derived_style.
pub fn is_display_contents(&self) -> bool[src]
Returns whether this style's display value is equal to contents.
Since this isn't supported in Servo, this is always false for Servo.
pub fn ineffective_content_property(&self) -> bool[src]
Returns whether the "content" property for the given style is completely
ineffective, and would yield an empty ::before or ::after
pseudo-element.
pub fn is_multicol(&self) -> bool[src]
Whether the current style is multicolumn.
pub fn resolve_color(&self, color: Color) -> RGBA[src]
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.Border.border_top_color);
pub fn content_inline_size(&self) -> LengthOrPercentageOrAuto[src]
Get the logical computed inline size.
pub fn content_block_size(&self) -> LengthOrPercentageOrAuto[src]
Get the logical computed block size.
pub fn min_inline_size(&self) -> LengthOrPercentage[src]
Get the logical computed min inline size.
pub fn min_block_size(&self) -> LengthOrPercentage[src]
Get the logical computed min block size.
pub fn max_inline_size(&self) -> LengthOrPercentageOrNone[src]
Get the logical computed max inline size.
pub fn max_block_size(&self) -> LengthOrPercentageOrNone[src]
Get the logical computed max block size.
pub fn logical_padding(&self) -> LogicalMargin<LengthOrPercentage>[src]
Get the logical computed padding for this writing mode.
pub fn border_width_for_writing_mode(
&self,
writing_mode: WritingMode
) -> LogicalMargin<Au>[src]
&self,
writing_mode: WritingMode
) -> LogicalMargin<Au>
Get the logical border width
pub fn logical_border_width(&self) -> LogicalMargin<Au>[src]
Gets the logical computed border widths for this style.
pub fn logical_margin(&self) -> LogicalMargin<LengthOrPercentageOrAuto>[src]
Gets the logical computed margin from this style.
pub fn logical_position(&self) -> LogicalMargin<LengthOrPercentageOrAuto>[src]
Gets the logical position from this style.
pub fn overrides_transform_style(&self) -> bool[src]
Return true if the effects force the transform style to be Flat
pub fn get_used_transform_style(&self) -> T[src]
pub fn transform_requires_layer(&self) -> bool[src]
Whether given this transform value, the compositor would require a layer.
pub fn computed_value_to_string(
&self,
property: PropertyDeclarationId
) -> String[src]
&self,
property: PropertyDeclarationId
) -> String
Serializes the computed value of this property as a string.
Trait Implementations
impl Clone for ComputedValues[src]
fn clone(&self) -> ComputedValues[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for ComputedValues[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Deref for ComputedValues[src]
type Target = ComputedValuesInner
The resulting type after dereferencing.
fn deref(&self) -> &ComputedValuesInner[src]
Dereferences the value.
impl DerefMut for ComputedValues[src]
fn deref_mut(&mut self) -> &mut ComputedValuesInner[src]
Mutably dereferences the value.