mirror of
https://github.com/servo/servo.git
synced 2025-06-10 17:43:16 +00:00
Due to changes on Page/Window interfaces, we no longer have use
for flush_layout().
This commit is contained in:
parent
761f7f056c
commit
a31d3d7f70
3 changed files with 6 additions and 11 deletions
|
@ -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>>) {
|
||||
|
|
|
@ -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>) {
|
||||
|
|
|
@ -1007,7 +1007,7 @@ impl ScriptTask {
|
|||
debug!("kicking off initial reflow of {:?}", final_url);
|
||||
document.r().content_changed(NodeCast::from_ref(document.r()),
|
||||
NodeDamage::OtherNodeDamage);
|
||||
window.r().flush_layout(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery);
|
||||
window.r().reflow(ReflowGoal::ForDisplay, ReflowQueryType::NoQuery);
|
||||
|
||||
// No more reflow required
|
||||
page.set_reflow_status(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue