Stop rendering when script queries layout

This commit is contained in:
Patrick Walton 2013-06-04 11:43:52 -07:00
parent e6ff135c01
commit 8d3b6aefa8
3 changed files with 42 additions and 28 deletions

View file

@ -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.