mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Issue #1071 - Ensure that Documents always have a non-null Window.
This commit is contained in:
parent
c9c9eec3d8
commit
60b6d1bb57
7 changed files with 29 additions and 53 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue