auto merge of #619 : kmcallister/servo/script-redisplay, r=jdm

Stuff I found in the process of working on incremental layout.
This commit is contained in:
bors-servo 2013-07-25 09:51:23 -07:00
commit f34a13a8b5
3 changed files with 8 additions and 3 deletions

View file

@ -35,6 +35,7 @@ use layout::float_context::{FloatContext, Invalid, FloatType};
use std::cell::Cell; use std::cell::Cell;
use std::uint; use std::uint;
use std::io::stderr;
use geom::point::Point2D; use geom::point::Point2D;
use geom::rect::Rect; use geom::rect::Rect;
use gfx::display_list::DisplayList; use gfx::display_list::DisplayList;
@ -414,7 +415,7 @@ impl<'self> FlowContext {
} }
s.push_str(self.debug_str()); s.push_str(self.debug_str());
println(s); stderr().write_line(s);
// FIXME: this should have a pure/const version? // FIXME: this should have a pure/const version?
for self.each_child |child| { for self.each_child |child| {

View file

@ -481,6 +481,9 @@ pub fn parse_html(url: Url,
debug!("received data"); debug!("received data");
parser.parse_chunk(data); parser.parse_chunk(data);
} }
Done(Err(*)) => {
fail!("Failed to load page URL %s", url.to_str());
}
Done(*) => { Done(*) => {
break; break;
} }

View file

@ -16,7 +16,7 @@ use dom::window::Window;
use layout_interface::{AddStylesheetMsg, DocumentDamage}; use layout_interface::{AddStylesheetMsg, DocumentDamage};
use layout_interface::{DocumentDamageLevel, HitTestQuery, HitTestResponse, LayoutQuery}; use layout_interface::{DocumentDamageLevel, HitTestQuery, HitTestResponse, LayoutQuery};
use layout_interface::{LayoutChan, MatchSelectorsDocumentDamage, QueryMsg, Reflow}; use layout_interface::{LayoutChan, MatchSelectorsDocumentDamage, QueryMsg, Reflow};
use layout_interface::{ReflowDocumentDamage, ReflowForDisplay, ReflowForScriptQuery, ReflowGoal}; use layout_interface::{ReflowDocumentDamage, ReflowForDisplay, ReflowGoal};
use layout_interface::ReflowMsg; use layout_interface::ReflowMsg;
use layout_interface; use layout_interface;
use servo_msg::constellation_msg::{ConstellationChan, LoadUrlMsg, NavigationDirection}; use servo_msg::constellation_msg::{ConstellationChan, LoadUrlMsg, NavigationDirection};
@ -321,7 +321,8 @@ impl ScriptTask {
null(), null(),
&rval); &rval);
self.reflow(ReflowForScriptQuery) // We don't know what the script changed, so for now we will do a total redisplay.
self.reflow_all(ReflowForDisplay)
} }
} }