aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2015-03-18 13:18:12 -0700
committerPatrick Walton <pcwalton@mimiga.net>2015-03-20 10:09:52 -0700
commit2c22467d530bce33f65c348b7136d44b4c65cdc0 (patch)
tree606527f36d14094a437a1a1c90886364a7bef2b0 /components/script/script_task.rs
parentfda3791487abeee9f910d8476632eeebe69c3685 (diff)
downloadservo-2c22467d530bce33f65c348b7136d44b4c65cdc0.tar.gz
servo-2c22467d530bce33f65c348b7136d44b4c65cdc0.zip
script: Stop rebuilding every flow in the document when an image
finishes loading.
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index ce4dd123d00..80441a60c9b 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -1212,7 +1212,11 @@ impl ScriptTask {
fn handle_reflow_event(&self, pipeline_id: PipelineId) {
debug!("script got reflow event");
let page = get_page(&self.root_page(), pipeline_id);
- self.force_reflow(&*page, ReflowReason::ReceivedReflowEvent);
+ let document = page.document().root();
+ let window = window_from_node(document.r()).root();
+ window.r().reflow(ReflowGoal::ForDisplay,
+ ReflowQueryType::NoQuery,
+ ReflowReason::ReceivedReflowEvent);
}
/// Initiate a non-blocking fetch for a specified resource. Stores the InProgressLoad