aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlimageelement.rs
diff options
context:
space:
mode:
authorRohan Prinja <rohan@cs.unc.edu>2016-11-10 02:24:01 -0500
committerAnthony Ramine <n.oxyde@gmail.com>2016-11-30 23:23:41 +0100
commit973f77c00698938c1333c0df7da30993075264d1 (patch)
tree1f7533d43218cb3916acb812b7f5139848ed64d9 /components/script/dom/htmlimageelement.rs
parent8af2327e95fe2f229df27074b868aad56bce2252 (diff)
downloadservo-973f77c00698938c1333c0df7da30993075264d1.tar.gz
servo-973f77c00698938c1333c0df7da30993075264d1.zip
Make WebIDL constructors take a more specific global if possible (fixes #14071)
Diffstat (limited to 'components/script/dom/htmlimageelement.rs')
-rw-r--r--components/script/dom/htmlimageelement.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs
index 3b58b383bf4..a86f0258918 100644
--- a/components/script/dom/htmlimageelement.rs
+++ b/components/script/dom/htmlimageelement.rs
@@ -16,11 +16,11 @@ use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
use dom::htmlelement::HTMLElement;
use dom::node::{Node, NodeDamage, document_from_node, window_from_node};
use dom::values::UNSIGNED_LONG_MAX;
use dom::virtualmethods::VirtualMethods;
+use dom::window::Window;
use html5ever_atoms::LocalName;
use ipc_channel::ipc;
use ipc_channel::router::ROUTER;
@@ -220,10 +220,10 @@ impl HTMLImageElement {
HTMLImageElementBinding::Wrap)
}
- pub fn Image(global: &GlobalScope,
+ pub fn Image(window: &Window,
width: Option<u32>,
height: Option<u32>) -> Fallible<Root<HTMLImageElement>> {
- let document = global.as_window().Document();
+ let document = window.Document();
let image = HTMLImageElement::new(local_name!("img"), None, &document);
if let Some(w) = width {
image.SetWidth(w);