pub struct LayoutTreeSnapshot { /* private fields */ }Expand description
Table of details of an element in the DOM tree with a LayoutObject.
Implementations§
Source§impl LayoutTreeSnapshot
impl LayoutTreeSnapshot
Sourcepub fn builder(
node_index: Vec<i64>,
styles: Vec<ArrayOfStrings>,
bounds: Vec<Rectangle>,
text: Vec<StringIndex>,
stacking_contexts: RareBooleanData,
) -> LayoutTreeSnapshotBuilder
pub fn builder( node_index: Vec<i64>, styles: Vec<ArrayOfStrings>, bounds: Vec<Rectangle>, text: Vec<StringIndex>, stacking_contexts: RareBooleanData, ) -> LayoutTreeSnapshotBuilder
Creates a builder for this type with the required parameters:
node_index: Index of the corresponding node in theNodeTreeSnapshotarray returned bycaptureSnapshot.styles: Array of indexes specifying computed style strings, filtered according to thecomputedStylesparameter passed tocaptureSnapshot.bounds: The absolute position bounding box.text: Contents of the LayoutText, if any.stacking_contexts: Stacking context information.
Sourcepub fn node_index(&self) -> &[i64]
pub fn node_index(&self) -> &[i64]
Index of the corresponding node in the ‘NodeTreeSnapshot’ array returned by ‘captureSnapshot’.
Sourcepub fn styles(&self) -> &[ArrayOfStrings] ⓘ
pub fn styles(&self) -> &[ArrayOfStrings] ⓘ
Array of indexes specifying computed style strings, filtered according to the ‘computedStyles’ parameter passed to ‘captureSnapshot’.
Sourcepub fn text(&self) -> &[StringIndex] ⓘ
pub fn text(&self) -> &[StringIndex] ⓘ
Contents of the LayoutText, if any.
Sourcepub fn stacking_contexts(&self) -> &RareBooleanData
pub fn stacking_contexts(&self) -> &RareBooleanData
Stacking context information.
Sourcepub fn paint_orders(&self) -> Option<&[i64]>
pub fn paint_orders(&self) -> Option<&[i64]>
Global paint order index, which is determined by the stacking order of the nodes. Nodes that are painted together will have the same index. Only provided if includePaintOrder in captureSnapshot was true.
Sourcepub fn offset_rects(&self) -> Option<&[Rectangle]>
pub fn offset_rects(&self) -> Option<&[Rectangle]>
The offset rect of nodes. Only available when includeDOMRects is set to true
Sourcepub fn scroll_rects(&self) -> Option<&[Rectangle]>
pub fn scroll_rects(&self) -> Option<&[Rectangle]>
The scroll rect of nodes. Only available when includeDOMRects is set to true
Sourcepub fn client_rects(&self) -> Option<&[Rectangle]>
pub fn client_rects(&self) -> Option<&[Rectangle]>
The client rect of nodes. Only available when includeDOMRects is set to true
Sourcepub fn blended_background_colors(&self) -> Option<&[StringIndex]>
pub fn blended_background_colors(&self) -> Option<&[StringIndex]>
The list of background colors that are blended with colors of overlapping elements.
Sourcepub fn text_color_opacities(&self) -> Option<&[f64]>
pub fn text_color_opacities(&self) -> Option<&[f64]>
The list of computed text opacities.
Trait Implementations§
Source§impl Clone for LayoutTreeSnapshot
impl Clone for LayoutTreeSnapshot
Source§fn clone(&self) -> LayoutTreeSnapshot
fn clone(&self) -> LayoutTreeSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more