layout_2020::style_ext

Trait ComputedValuesExt

Source
pub(crate) trait ComputedValuesExt {
Show 28 methods // Required methods fn physical_box_offsets(&self) -> PhysicalSides<LengthPercentageOrAuto<'_>>; fn box_offsets( &self, writing_mode: WritingMode, ) -> LogicalSides<LengthPercentageOrAuto<'_>>; fn box_size( &self, containing_block_writing_mode: WritingMode, ) -> LogicalVec2<Size<LengthPercentage>>; fn min_box_size( &self, containing_block_writing_mode: WritingMode, ) -> LogicalVec2<Size<LengthPercentage>>; fn max_box_size( &self, containing_block_writing_mode: WritingMode, ) -> LogicalVec2<Size<LengthPercentage>>; fn content_box_size_for_box_size( &self, box_size: LogicalVec2<Size<Au>>, pbm: &PaddingBorderMargin, ) -> LogicalVec2<Size<Au>>; fn content_min_box_size_for_min_size( &self, box_size: LogicalVec2<Size<Au>>, pbm: &PaddingBorderMargin, ) -> LogicalVec2<Size<Au>>; fn content_max_box_size_for_max_size( &self, box_size: LogicalVec2<Size<Au>>, pbm: &PaddingBorderMargin, ) -> LogicalVec2<Size<Au>>; fn border_style_color( &self, containing_block_writing_mode: WritingMode, ) -> LogicalSides<BorderStyleColor>; fn physical_margin(&self) -> PhysicalSides<LengthPercentageOrAuto<'_>>; fn margin( &self, containing_block_writing_mode: WritingMode, ) -> LogicalSides<LengthPercentageOrAuto<'_>>; fn is_transformable(&self, fragment_flags: FragmentFlags) -> bool; fn has_transform_or_perspective( &self, fragment_flags: FragmentFlags, ) -> bool; fn z_index_applies(&self, fragment_flags: FragmentFlags) -> bool; fn effective_z_index(&self, fragment_flags: FragmentFlags) -> i32; fn effective_overflow(&self, fragment_flags: FragmentFlags) -> AxesOverflow; fn establishes_block_formatting_context( &self, fragment_flags: FragmentFlags, ) -> bool; fn establishes_stacking_context( &self, fragment_flags: FragmentFlags, ) -> bool; fn establishes_scroll_container( &self, fragment_flags: FragmentFlags, ) -> bool; fn establishes_containing_block_for_absolute_descendants( &self, fragment_flags: FragmentFlags, ) -> bool; fn establishes_containing_block_for_all_descendants( &self, fragment_flags: FragmentFlags, ) -> bool; fn preferred_aspect_ratio( &self, natural_aspect_ratio: Option<CSSFloat>, padding_border_sums: &LogicalVec2<Au>, ) -> Option<AspectRatio>; fn background_is_transparent(&self) -> bool; fn get_webrender_primitive_flags(&self) -> PrimitiveFlags; fn bidi_control_chars(&self) -> (&'static str, &'static str); fn resolve_align_self( &self, resolved_auto_value: AlignItems, resolved_normal_value: AlignItems, ) -> AlignItems; fn depends_on_block_constraints_due_to_relative_positioning( &self, writing_mode: WritingMode, ) -> bool; fn is_inline_box(&self, fragment_flags: FragmentFlags) -> bool;
}

Required Methods§

Source

fn physical_box_offsets(&self) -> PhysicalSides<LengthPercentageOrAuto<'_>>

Source

fn box_offsets( &self, writing_mode: WritingMode, ) -> LogicalSides<LengthPercentageOrAuto<'_>>

Source

fn box_size( &self, containing_block_writing_mode: WritingMode, ) -> LogicalVec2<Size<LengthPercentage>>

Source

fn min_box_size( &self, containing_block_writing_mode: WritingMode, ) -> LogicalVec2<Size<LengthPercentage>>

Source

fn max_box_size( &self, containing_block_writing_mode: WritingMode, ) -> LogicalVec2<Size<LengthPercentage>>

Source

fn content_box_size_for_box_size( &self, box_size: LogicalVec2<Size<Au>>, pbm: &PaddingBorderMargin, ) -> LogicalVec2<Size<Au>>

Source

fn content_min_box_size_for_min_size( &self, box_size: LogicalVec2<Size<Au>>, pbm: &PaddingBorderMargin, ) -> LogicalVec2<Size<Au>>

Source

fn content_max_box_size_for_max_size( &self, box_size: LogicalVec2<Size<Au>>, pbm: &PaddingBorderMargin, ) -> LogicalVec2<Size<Au>>

Source

fn border_style_color( &self, containing_block_writing_mode: WritingMode, ) -> LogicalSides<BorderStyleColor>

Source

fn physical_margin(&self) -> PhysicalSides<LengthPercentageOrAuto<'_>>

Source

fn margin( &self, containing_block_writing_mode: WritingMode, ) -> LogicalSides<LengthPercentageOrAuto<'_>>

Source

fn is_transformable(&self, fragment_flags: FragmentFlags) -> bool

Source

fn has_transform_or_perspective(&self, fragment_flags: FragmentFlags) -> bool

Source

fn z_index_applies(&self, fragment_flags: FragmentFlags) -> bool

Source

fn effective_z_index(&self, fragment_flags: FragmentFlags) -> i32

Source

fn effective_overflow(&self, fragment_flags: FragmentFlags) -> AxesOverflow

Source

fn establishes_block_formatting_context( &self, fragment_flags: FragmentFlags, ) -> bool

Source

fn establishes_stacking_context(&self, fragment_flags: FragmentFlags) -> bool

Source

fn establishes_scroll_container(&self, fragment_flags: FragmentFlags) -> bool

Source

fn establishes_containing_block_for_absolute_descendants( &self, fragment_flags: FragmentFlags, ) -> bool

Source

fn establishes_containing_block_for_all_descendants( &self, fragment_flags: FragmentFlags, ) -> bool

Source

fn preferred_aspect_ratio( &self, natural_aspect_ratio: Option<CSSFloat>, padding_border_sums: &LogicalVec2<Au>, ) -> Option<AspectRatio>

Source

fn background_is_transparent(&self) -> bool

Source

fn get_webrender_primitive_flags(&self) -> PrimitiveFlags

Source

fn bidi_control_chars(&self) -> (&'static str, &'static str)

Source

fn resolve_align_self( &self, resolved_auto_value: AlignItems, resolved_normal_value: AlignItems, ) -> AlignItems

Source

fn depends_on_block_constraints_due_to_relative_positioning( &self, writing_mode: WritingMode, ) -> bool

Source

fn is_inline_box(&self, fragment_flags: FragmentFlags) -> bool

Implementations on Foreign Types§

Source§

impl ComputedValuesExt for ComputedValues

Source§

fn is_transformable(&self, fragment_flags: FragmentFlags) -> bool

Returns true if this is a transformable element.

Source§

fn has_transform_or_perspective(&self, fragment_flags: FragmentFlags) -> bool

Returns true if this style has a transform, or perspective property set and it applies to this element.

Source§

fn z_index_applies(&self, fragment_flags: FragmentFlags) -> bool

Whether the z-index property applies to this fragment.

Source§

fn effective_z_index(&self, fragment_flags: FragmentFlags) -> i32

Get the effective z-index of this fragment. Z-indices only apply to positioned elements per CSS 2 9.9.1 (http://www.w3.org/TR/CSS2/visuren.html#z-index), so this value may differ from the value specified in the style.

Source§

fn effective_overflow(&self, fragment_flags: FragmentFlags) -> AxesOverflow

Get the effective overflow of this box. The property only applies to block containers, flex containers, and grid containers. And some box types only accept a few values. https://www.w3.org/TR/css-overflow-3/#overflow-control

Source§

fn establishes_block_formatting_context( &self, fragment_flags: FragmentFlags, ) -> bool

Return true if this style is a normal block and establishes a new block formatting context.

Source§

fn establishes_scroll_container(&self, fragment_flags: FragmentFlags) -> bool

Whether or not the overflow value of this style establishes a scroll container.

Source§

fn establishes_stacking_context(&self, fragment_flags: FragmentFlags) -> bool

Returns true if this fragment establishes a new stacking context and false otherwise.

Source§

fn establishes_containing_block_for_absolute_descendants( &self, fragment_flags: FragmentFlags, ) -> bool

Returns true if this style establishes a containing block for absolute descendants (position: absolute). If this style happens to establish a containing block for “all descendants” (ie including position: fixed descendants) this method will return true, but a true return value does not imply that the style establishes a containing block for all descendants. Use establishes_containing_block_for_all_descendants() instead.

Source§

fn establishes_containing_block_for_all_descendants( &self, fragment_flags: FragmentFlags, ) -> bool

Returns true if this style establishes a containing block for all descendants, including fixed descendants (position: fixed). Note that this also implies that it establishes a containing block for absolute descendants (position: absolute).

Source§

fn preferred_aspect_ratio( &self, natural_aspect_ratio: Option<CSSFloat>, padding_border_sums: &LogicalVec2<Au>, ) -> Option<AspectRatio>

Resolve the preferred aspect ratio according to the given natural aspect ratio and the aspect-ratio property. See https://drafts.csswg.org/css-sizing-4/#aspect-ratio.

Source§

fn background_is_transparent(&self) -> bool

Whether or not this style specifies a non-transparent background.

Source§

fn get_webrender_primitive_flags(&self) -> PrimitiveFlags

Generate appropriate WebRender PrimitiveFlags that should be used for display items generated by the Fragment which owns this style.

Source§

fn bidi_control_chars(&self) -> (&'static str, &'static str)

If the ‘unicode-bidi’ property has a value other than ‘normal’, return the bidi control codes to inject before and after the text content of the element. See the table in http://dev.w3.org/csswg/css-writing-modes/#unicode-bidi.

Source§

fn physical_box_offsets(&self) -> PhysicalSides<LengthPercentageOrAuto<'_>>

Source§

fn box_offsets( &self, writing_mode: WritingMode, ) -> LogicalSides<LengthPercentageOrAuto<'_>>

Source§

fn box_size( &self, containing_block_writing_mode: WritingMode, ) -> LogicalVec2<Size<LengthPercentage>>

Source§

fn min_box_size( &self, containing_block_writing_mode: WritingMode, ) -> LogicalVec2<Size<LengthPercentage>>

Source§

fn max_box_size( &self, containing_block_writing_mode: WritingMode, ) -> LogicalVec2<Size<LengthPercentage>>

Source§

fn content_box_size_for_box_size( &self, box_size: LogicalVec2<Size<Au>>, pbm: &PaddingBorderMargin, ) -> LogicalVec2<Size<Au>>

Source§

fn content_min_box_size_for_min_size( &self, min_box_size: LogicalVec2<Size<Au>>, pbm: &PaddingBorderMargin, ) -> LogicalVec2<Size<Au>>

Source§

fn content_max_box_size_for_max_size( &self, max_box_size: LogicalVec2<Size<Au>>, pbm: &PaddingBorderMargin, ) -> LogicalVec2<Size<Au>>

Source§

fn border_style_color( &self, containing_block_writing_mode: WritingMode, ) -> LogicalSides<BorderStyleColor>

Source§

fn physical_margin(&self) -> PhysicalSides<LengthPercentageOrAuto<'_>>

Source§

fn margin( &self, containing_block_writing_mode: WritingMode, ) -> LogicalSides<LengthPercentageOrAuto<'_>>

Source§

fn is_inline_box(&self, fragment_flags: FragmentFlags) -> bool

Source§

fn resolve_align_self( &self, resolved_auto_value: AlignItems, resolved_normal_value: AlignItems, ) -> AlignItems

Source§

fn depends_on_block_constraints_due_to_relative_positioning( &self, writing_mode: WritingMode, ) -> bool

Implementors§