pub trait Layout {
Show 24 methods // Required methods fn handle_constellation_msg(&mut self, msg: LayoutControlMsg); fn handle_font_cache_msg(&mut self); fn device(&self) -> &Device; fn waiting_for_web_fonts_to_load(&self) -> bool; fn current_epoch(&self) -> Epoch; fn load_web_fonts_from_stylesheet(&self, stylesheet: ServoArc<Stylesheet>); fn add_stylesheet( &mut self, stylesheet: ServoArc<Stylesheet>, before_stylsheet: Option<ServoArc<Stylesheet>> ); fn exit_now(&mut self); fn collect_reports(&self, reports_chan: ReportsChan); fn set_quirks_mode(&mut self, quirks_mode: QuirksMode); fn remove_stylesheet(&mut self, stylesheet: ServoArc<Stylesheet>); fn reflow(&mut self, script_reflow: ScriptReflow); fn register_paint_worklet_modules( &mut self, name: Atom, properties: Vec<Atom>, painter: Box<dyn Painter> ); fn query_content_box(&self, node: OpaqueNode) -> Option<Rect<Au>>; fn query_content_boxes(&self, node: OpaqueNode) -> Vec<Rect<Au>>; fn query_client_rect(&self, node: OpaqueNode) -> Rect<i32>; fn query_element_inner_text(&self, node: TrustedNodeAddress) -> String; fn query_inner_window_dimension( &self, context: BrowsingContextId ) -> Option<Size2D<f32, CSSPixel>>; fn query_nodes_from_point( &self, point: Point2D<f32>, query_type: NodesFromPointQueryType ) -> Vec<UntrustedNodeAddress>; fn query_offset_parent(&self, node: OpaqueNode) -> OffsetParentResponse; fn query_resolved_style( &self, node: TrustedNodeAddress, pseudo: Option<PseudoElement>, property_id: PropertyId, animations: DocumentAnimationSet, animation_timeline_value: f64 ) -> String; fn query_resolved_font_style( &self, node: TrustedNodeAddress, value: &str, animations: DocumentAnimationSet, animation_timeline_value: f64 ) -> Option<ServoArc<Font>>; fn query_scrolling_area(&self, node: Option<OpaqueNode>) -> Rect<i32>; fn query_text_indext( &self, node: OpaqueNode, point: Point2D<f32> ) -> Option<usize>;
}

Required Methods§

source

fn handle_constellation_msg(&mut self, msg: LayoutControlMsg)

Handle a single message from the Constellation.

source

fn handle_font_cache_msg(&mut self)

Handle a a single mesasge from the FontCacheThread.

source

fn device(&self) -> &Device

Get a reference to this Layout’s Stylo Device used to handle media queries and resolve font metrics.

source

fn waiting_for_web_fonts_to_load(&self) -> bool

Whether or not this layout is waiting for fonts from loaded stylesheets to finish loading.

source

fn current_epoch(&self) -> Epoch

The currently laid out Epoch that this Layout has finished.

source

fn load_web_fonts_from_stylesheet(&self, stylesheet: ServoArc<Stylesheet>)

Load all fonts from the given stylesheet, returning the number of fonts that need to be loaded.

source

fn add_stylesheet( &mut self, stylesheet: ServoArc<Stylesheet>, before_stylsheet: Option<ServoArc<Stylesheet>> )

Add a stylesheet to this Layout. This will add it to the Layout’s Stylist as well as loading all web fonts defined in the stylesheet. The second stylesheet is the insertion point (if it exists, the sheet needs to be inserted before it).

source

fn exit_now(&mut self)

Inform the layout that its ScriptThread is about to exit.

source

fn collect_reports(&self, reports_chan: ReportsChan)

Requests that layout measure its memory usage. The resulting reports are sent back via the supplied channel.

source

fn set_quirks_mode(&mut self, quirks_mode: QuirksMode)

Sets quirks mode for the document, causing the quirks mode stylesheet to be used.

source

fn remove_stylesheet(&mut self, stylesheet: ServoArc<Stylesheet>)

Removes a stylesheet from the Layout.

source

fn reflow(&mut self, script_reflow: ScriptReflow)

Requests a reflow.

source

fn register_paint_worklet_modules( &mut self, name: Atom, properties: Vec<Atom>, painter: Box<dyn Painter> )

Tells layout that script has added some paint worklet modules.

source

fn query_content_box(&self, node: OpaqueNode) -> Option<Rect<Au>>

source

fn query_content_boxes(&self, node: OpaqueNode) -> Vec<Rect<Au>>

source

fn query_client_rect(&self, node: OpaqueNode) -> Rect<i32>

source

fn query_element_inner_text(&self, node: TrustedNodeAddress) -> String

source

fn query_inner_window_dimension( &self, context: BrowsingContextId ) -> Option<Size2D<f32, CSSPixel>>

source

fn query_nodes_from_point( &self, point: Point2D<f32>, query_type: NodesFromPointQueryType ) -> Vec<UntrustedNodeAddress>

source

fn query_offset_parent(&self, node: OpaqueNode) -> OffsetParentResponse

source

fn query_resolved_style( &self, node: TrustedNodeAddress, pseudo: Option<PseudoElement>, property_id: PropertyId, animations: DocumentAnimationSet, animation_timeline_value: f64 ) -> String

source

fn query_resolved_font_style( &self, node: TrustedNodeAddress, value: &str, animations: DocumentAnimationSet, animation_timeline_value: f64 ) -> Option<ServoArc<Font>>

source

fn query_scrolling_area(&self, node: Option<OpaqueNode>) -> Rect<i32>

source

fn query_text_indext( &self, node: OpaqueNode, point: Point2D<f32> ) -> Option<usize>

Implementors§