Enum script_layout_interface::message::Msg
source · pub enum Msg {
Show 15 variants
AddStylesheet(ServoArc<Stylesheet>, Option<ServoArc<Stylesheet>>),
RemoveStylesheet(ServoArc<Stylesheet>),
SetQuirksMode(QuirksMode),
Reflow(ScriptReflow),
GetRPC(Sender<Box<dyn LayoutRPC + Send>>),
CollectReports(ReportsChan),
PrepareToExit(Sender<()>),
ExitNow,
GetCurrentEpoch(IpcSender<Epoch>),
GetWebFontLoadState(IpcSender<bool>),
CreateLayoutThread(LayoutThreadInit),
SetFinalUrl(ServoUrl),
SetScrollStates(Vec<ScrollState>),
RegisterPaint(Atom, Vec<Atom>, Box<dyn Painter>),
SetNavigationStart(u64),
}
Expand description
Asynchronous messages that script can send to layout.
Variants§
AddStylesheet(ServoArc<Stylesheet>, Option<ServoArc<Stylesheet>>)
Adds the given stylesheet to the document. The second stylesheet is the insertion point (if it exists, the sheet needs to be inserted before it).
RemoveStylesheet(ServoArc<Stylesheet>)
Removes a stylesheet from the document.
SetQuirksMode(QuirksMode)
Change the quirks mode.
Reflow(ScriptReflow)
Requests a reflow.
GetRPC(Sender<Box<dyn LayoutRPC + Send>>)
Get an RPC interface.
CollectReports(ReportsChan)
Requests that the layout thread measure its memory usage. The resulting reports are sent back via the supplied channel.
PrepareToExit(Sender<()>)
Requests that the layout thread enter a quiescent state in which no more messages are
accepted except ExitMsg
. A response message will be sent on the supplied channel when
this happens.
ExitNow
Requests that the layout thread immediately shut down. There must be no more nodes left after this, or layout will crash.
GetCurrentEpoch(IpcSender<Epoch>)
Get the last epoch counter for this layout thread.
GetWebFontLoadState(IpcSender<bool>)
Asks the layout thread whether any Web fonts have yet to load (if true, loads are pending; false otherwise).
CreateLayoutThread(LayoutThreadInit)
Creates a new layout thread.
This basically exists to keep the script-layout dependency one-way.
SetFinalUrl(ServoUrl)
Set the final Url.
SetScrollStates(Vec<ScrollState>)
Tells layout about the new scrolling offsets of each scrollable stacking context.
RegisterPaint(Atom, Vec<Atom>, Box<dyn Painter>)
Tells layout that script has added some paint worklet modules.
Send to layout the precise time when the navigation started.