mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Handle AttachLayout before ResizeMsg. Fixes #3333 for yahoo static suite.
This commit is contained in:
parent
2f12d5628f
commit
102e06f46b
1 changed files with 7 additions and 2 deletions
|
@ -419,6 +419,12 @@ impl ScriptTask {
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
match event {
|
match event {
|
||||||
|
// This has to be handled before the ResizeMsg below,
|
||||||
|
// otherwise the page may not have been added to the
|
||||||
|
// child list yet, causing the find() to fail.
|
||||||
|
FromConstellation(AttachLayoutMsg(new_layout_info)) => {
|
||||||
|
self.handle_new_layout(new_layout_info);
|
||||||
|
}
|
||||||
FromConstellation(ResizeMsg(id, size)) => {
|
FromConstellation(ResizeMsg(id, size)) => {
|
||||||
let mut page = self.page.borrow_mut();
|
let mut page = self.page.borrow_mut();
|
||||||
let page = page.find(id).expect("resize sent to nonexistent pipeline");
|
let page = page.find(id).expect("resize sent to nonexistent pipeline");
|
||||||
|
@ -442,8 +448,7 @@ impl ScriptTask {
|
||||||
for msg in sequential.move_iter() {
|
for msg in sequential.move_iter() {
|
||||||
match msg {
|
match msg {
|
||||||
// TODO(tkuehn) need to handle auxiliary layouts for iframes
|
// TODO(tkuehn) need to handle auxiliary layouts for iframes
|
||||||
FromConstellation(AttachLayoutMsg(new_layout_info)) =>
|
FromConstellation(AttachLayoutMsg(_)) => fail!("should have handled AttachLayoutMsg already"),
|
||||||
self.handle_new_layout(new_layout_info),
|
|
||||||
FromConstellation(LoadMsg(id, url)) => self.load(id, url),
|
FromConstellation(LoadMsg(id, url)) => self.load(id, url),
|
||||||
FromScript(TriggerLoadMsg(id, url)) => self.trigger_load(id, url),
|
FromScript(TriggerLoadMsg(id, url)) => self.trigger_load(id, url),
|
||||||
FromScript(TriggerFragmentMsg(id, url)) => self.trigger_fragment(id, url),
|
FromScript(TriggerFragmentMsg(id, url)) => self.trigger_fragment(id, url),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue