aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
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