mirror of
https://github.com/servo/servo.git
synced 2025-08-01 03:30:33 +01:00
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.
This commit is contained in:
parent
fe123ad07c
commit
f39e01b336
1 changed files with 1 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue