From dc9f7560b058e1cb5acc8122c43f0ee9632b8608 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Wed, 24 Jul 2013 14:57:59 -0700 Subject: [PATCH] Reflow and redisplay after script timers fire We don't know what the script changed. This will be less painful with incremental layout. Fixes a crash from calling reflow() with self.damage = None. --- src/components/script/script_task.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs index c3b574413c9..b0d9af20cfc 100644 --- a/src/components/script/script_task.rs +++ b/src/components/script/script_task.rs @@ -16,7 +16,7 @@ use dom::window::Window; use layout_interface::{AddStylesheetMsg, DocumentDamage}; use layout_interface::{DocumentDamageLevel, HitTestQuery, HitTestResponse, LayoutQuery}; use layout_interface::{LayoutChan, MatchSelectorsDocumentDamage, QueryMsg, Reflow}; -use layout_interface::{ReflowDocumentDamage, ReflowForDisplay, ReflowForScriptQuery, ReflowGoal}; +use layout_interface::{ReflowDocumentDamage, ReflowForDisplay, ReflowGoal}; use layout_interface::ReflowMsg; use layout_interface; use servo_msg::constellation_msg::{ConstellationChan, LoadUrlMsg, NavigationDirection}; @@ -321,7 +321,8 @@ impl ScriptTask { null(), &rval); - self.reflow(ReflowForScriptQuery) + // We don't know what the script changed, so for now we will do a total redisplay. + self.reflow_all(ReflowForDisplay) } }