mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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 {
|
||||
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)) => {
|
||||
let mut page = self.page.borrow_mut();
|
||||
let page = page.find(id).expect("resize sent to nonexistent pipeline");
|
||||
|
@ -442,8 +448,7 @@ impl ScriptTask {
|
|||
for msg in sequential.move_iter() {
|
||||
match msg {
|
||||
// TODO(tkuehn) need to handle auxiliary layouts for iframes
|
||||
FromConstellation(AttachLayoutMsg(new_layout_info)) =>
|
||||
self.handle_new_layout(new_layout_info),
|
||||
FromConstellation(AttachLayoutMsg(_)) => fail!("should have handled AttachLayoutMsg already"),
|
||||
FromConstellation(LoadMsg(id, url)) => self.load(id, url),
|
||||
FromScript(TriggerLoadMsg(id, url)) => self.trigger_load(id, url),
|
||||
FromScript(TriggerFragmentMsg(id, url)) => self.trigger_fragment(id, url),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue