aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorAdenilson Cavalcanti <cavalcantii@gmail.com>2015-03-04 11:39:29 -0800
committerAdenilson Cavalcanti <cavalcantii@gmail.com>2015-03-04 11:39:29 -0800
commita31d3d7f701b0194d9d83d6b684ab7718b9a954a (patch)
treef223a953decc549e66779684ff5a974deae67dce /components/script/dom
parent761f7f056c607ed67adc0c4927ae63847aef8f0d (diff)
downloadservo-a31d3d7f701b0194d9d83d6b684ab7718b9a954a.tar.gz
servo-a31d3d7f701b0194d9d83d6b684ab7718b9a954a.zip
Due to changes on Page/Window interfaces, we no longer have use
for flush_layout().
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/document.rs4
-rw-r--r--components/script/dom/window.rs11
2 files changed, 5 insertions, 10 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 6d559483e1e..059f568f873 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -523,7 +523,7 @@ impl<'a> DocumentHelpers<'a> for JSRef<'a, Document> {
el.authentic_click_activation(event);
self.commit_focus_transaction();
- window.r().flush_layout(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery);
+ window.r().reflow(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery);
}
/// Return need force reflow or not
@@ -664,7 +664,7 @@ impl<'a> DocumentHelpers<'a> for JSRef<'a, Document> {
_ => ()
}
- window.r().flush_layout(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery);
+ window.r().reflow(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery);
}
fn set_current_script(self, script: Option<JSRef<HTMLScriptElement>>) {
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 097d8ed4ea0..29551114315 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -394,7 +394,6 @@ impl<'a> WindowMethods for JSRef<'a, Window> {
pub trait WindowHelpers {
fn clear_js_context(self);
fn clear_js_context_for_script_deallocation(self);
- fn flush_layout(self, goal: ReflowGoal, query: ReflowQueryType);
fn init_browser_context(self, doc: JSRef<Document>, frame_element: Option<JSRef<Element>>);
fn load_url(self, href: DOMString);
fn handle_fire_timer(self, timer_id: TimerId);
@@ -476,10 +475,6 @@ impl<'a> WindowHelpers for JSRef<'a, Window> {
}
}
- fn flush_layout(self, goal: ReflowGoal, query: ReflowQueryType) {
- self.reflow(goal, query);
- }
-
/// Reflows the page if it's possible to do so and the page is dirty. This method will wait
/// for the layout thread to complete (but see the `TODO` below). If there is no window size
/// yet, the page is presumed invisible and no reflow is performed.
@@ -567,14 +562,14 @@ impl<'a> WindowHelpers for JSRef<'a, Window> {
}
fn content_box_query(self, content_box_request: TrustedNodeAddress) -> Rect<Au> {
- self.flush_layout(ReflowGoal::ForScriptQuery, ReflowQueryType::ContentBoxQuery(content_box_request));
+ self.reflow(ReflowGoal::ForScriptQuery, ReflowQueryType::ContentBoxQuery(content_box_request));
self.join_layout(); //FIXME: is this necessary, or is layout_rpc's mutex good enough?
let ContentBoxResponse(rect) = self.layout_rpc.content_box();
rect
}
fn content_boxes_query(self, content_boxes_request: TrustedNodeAddress) -> Vec<Rect<Au>> {
- self.flush_layout(ReflowGoal::ForScriptQuery, ReflowQueryType::ContentBoxesQuery(content_boxes_request));
+ self.reflow(ReflowGoal::ForScriptQuery, ReflowQueryType::ContentBoxesQuery(content_boxes_request));
self.join_layout(); //FIXME: is this necessary, or is layout_rpc's mutex good enough?
let ContentBoxesResponse(rects) = self.layout_rpc.content_boxes();
rects
@@ -614,7 +609,7 @@ impl<'a> WindowHelpers for JSRef<'a, Window> {
fn handle_fire_timer(self, timer_id: TimerId) {
self.timers.fire_timer(timer_id, self);
- self.flush_layout(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery);
+ self.reflow(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery);
}
fn set_fragment_name(self, fragment: Option<String>) {