Ensure that clicking a link in an iframe gets the existing iframe rect.

Otherwise, the new iframe may not get a valid window size until the
parent frame does another reflow.
This commit is contained in:
Glenn Watson 2015-03-17 13:46:47 +10:00
parent 2281bca892
commit 84c5db900f
2 changed files with 33 additions and 19 deletions

View file

@ -1148,7 +1148,9 @@ impl ScriptTask {
.find(|node| node.subpage_id() == Some(subpage_id))
.map(Temporary::from_rooted)
}).root();
iframe.r().unwrap().navigate_child_browsing_context(load_data.url);
if let Some(iframe) = iframe.r() {
iframe.navigate_child_browsing_context(load_data.url);
}
}
None => {
let ConstellationChan(ref const_chan) = self.constellation_chan;