aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2014-10-29 19:02:31 -0700
committerMartin Robinson <mrobinson@igalia.com>2014-11-03 10:30:28 -0800
commit2d72f00ccf8abfd5805dccdca5a635fa4e8e0cb8 (patch)
treeb49ad076db1f72b40102aaaa99683775749d883f /components/script/script_task.rs
parent1a3ff8739c2a17d61f295f213f31ddee25e0b3ae (diff)
downloadservo-2d72f00ccf8abfd5805dccdca5a635fa4e8e0cb8.tar.gz
servo-2d72f00ccf8abfd5805dccdca5a635fa4e8e0cb8.zip
Have ContentBox(es)Queries consult the flow tree
Instead of looking at the display tree, have ContentBox(es)Query consult the flow tree. This allow optimizing away parts of the display tree later. To do this we need to be more careful about how we send reflow requests, only querying the flow tree when possible. Fixes #3790.
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index deb6aaded80..7ef0d095545 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -29,7 +29,7 @@ use dom::window::{Window, WindowHelpers};
use dom::worker::{Worker, TrustedWorkerAddress};
use dom::xmlhttprequest::{TrustedXHRAddress, XMLHttpRequest, XHRProgress};
use parse::html::{InputString, InputUrl, parse_html};
-use layout_interface::{ScriptLayoutChan, LayoutChan, ReflowForDisplay};
+use layout_interface::{ScriptLayoutChan, LayoutChan, NoQuery, ReflowForDisplay};
use layout_interface;
use page::{Page, IterablePage, Frame};
use timers::TimerId;
@@ -815,7 +815,7 @@ impl ScriptTask {
let document_as_node = NodeCast::from_ref(document_js_ref);
document.content_changed(document_as_node);
}
- window.flush_layout(ReflowForDisplay);
+ window.flush_layout();
{
// No more reflow required
@@ -870,7 +870,7 @@ impl ScriptTask {
}
page.damage();
- page.reflow(ReflowForDisplay, self.control_chan.clone(), &*self.compositor);
+ page.reflow(ReflowForDisplay, self.control_chan.clone(), &*self.compositor, NoQuery);
}
/// This is the main entry point for receiving and dispatching DOM events.
@@ -969,7 +969,7 @@ impl ScriptTask {
let eventtarget: JSRef<EventTarget> = EventTargetCast::from_ref(node);
let _ = eventtarget.dispatch_event_with_target(None, *event);
- window.flush_layout(ReflowForDisplay);
+ window.flush_layout();
}
None => {}
}