Issue #1071 - Ensure that Documents always have a non-null Window.

This commit is contained in:
Ms2ger 2013-10-16 10:00:38 +02:00
parent c9c9eec3d8
commit 60b6d1bb57
7 changed files with 29 additions and 53 deletions

View file

@ -274,7 +274,7 @@ impl Element {
pub fn GetClientRects(&self, abstract_self: AbstractNode<ScriptView>) -> @mut ClientRectList {
let document = self.node.owner_doc;
let win = document.with_base(|doc| doc.window).expect("no window");
let win = document.with_base(|doc| doc.window);
let node = abstract_self;
assert!(node.is_element());
let (port, chan) = comm::stream();
@ -301,7 +301,7 @@ impl Element {
pub fn GetBoundingClientRect(&self, abstract_self: AbstractNode<ScriptView>) -> @mut ClientRect {
let document = self.node.owner_doc;
let win = document.with_base(|doc| doc.window).expect("no window");
let win = document.with_base(|doc| doc.window);
let node = abstract_self;
assert!(node.is_element());
let (port, chan) = comm::stream();