From f39e01b3366eabb5dca5d9cf1eb705731e56972f Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Fri, 17 Oct 2014 10:31:45 -0700 Subject: [PATCH] Don't force reflow on content changes This fixes a performance regression caused by the previous patches. Once we allowed script and layout to run during parsing, it was running too often (every time the document changed and called window.reflow). Fixes #1269. --- components/script/dom/window.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index b35752b08c0..71c8890ab6f 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -19,7 +19,7 @@ use dom::location::Location; use dom::navigator::Navigator; use dom::performance::Performance; use dom::screen::Screen; -use layout_interface::{ReflowGoal, ReflowForDisplay}; +use layout_interface::ReflowGoal; use page::Page; use script_task::{ExitWindowMsg, ScriptChan, TriggerLoadMsg, TriggerFragmentMsg}; use script_task::FromWindow; @@ -348,10 +348,6 @@ impl<'a> WindowHelpers for JSRef<'a, Window> { fn reflow(self) { self.page().damage(); - // FIXME This should probably be ReflowForQuery, not Display. All queries currently - // currently rely on the display list, which means we can't destroy it by - // doing a query reflow. - self.page().reflow(ReflowForDisplay, self.control_chan.clone(), &*self.compositor); } fn flush_layout(self, goal: ReflowGoal) {