mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Stop rendering when script queries layout
This commit is contained in:
parent
e6ff135c01
commit
8d3b6aefa8
3 changed files with 42 additions and 28 deletions
|
@ -86,11 +86,22 @@ impl Damage {
|
|||
}
|
||||
}
|
||||
|
||||
/// Why we're doing reflow.
|
||||
#[deriving(Eq)]
|
||||
pub enum ReflowGoal {
|
||||
/// We're reflowing in order to send a display list to the screen.
|
||||
ReflowForDisplay,
|
||||
/// We're reflowing in order to satisfy a script query. No display list will be created.
|
||||
ReflowForScriptQuery,
|
||||
}
|
||||
|
||||
/// Information needed for a reflow.
|
||||
pub struct BuildData {
|
||||
node: AbstractNode<ScriptView>,
|
||||
/// What reflow needs to be done.
|
||||
damage: Damage,
|
||||
/// The goal of reflow: either to render to the screen or to flush layout info for script.
|
||||
goal: ReflowGoal,
|
||||
/// The URL of the page.
|
||||
url: Url,
|
||||
/// The channel through which messages can be sent back to the script task.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue