From 973f77c00698938c1333c0df7da30993075264d1 Mon Sep 17 00:00:00 2001 From: Rohan Prinja Date: Thu, 10 Nov 2016 02:24:01 -0500 Subject: Make WebIDL constructors take a more specific global if possible (fixes #14071) --- components/script/dom/range.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'components/script/dom/range.rs') diff --git a/components/script/dom/range.rs b/components/script/dom/range.rs index 8e8b9888b87..0a5ab7a66df 100644 --- a/components/script/dom/range.rs +++ b/components/script/dom/range.rs @@ -22,11 +22,11 @@ use dom::characterdata::CharacterData; use dom::document::Document; use dom::documentfragment::DocumentFragment; use dom::element::Element; -use dom::globalscope::GlobalScope; use dom::htmlbodyelement::HTMLBodyElement; use dom::htmlscriptelement::HTMLScriptElement; use dom::node::{Node, UnbindContext}; use dom::text::Text; +use dom::window::Window; use heapsize::HeapSizeOf; use js::jsapi::JSTracer; use std::cell::{Cell, UnsafeCell}; @@ -70,8 +70,8 @@ impl Range { } // https://dom.spec.whatwg.org/#dom-range - pub fn Constructor(global: &GlobalScope) -> Fallible> { - let document = global.as_window().Document(); + pub fn Constructor(window: &Window) -> Fallible> { + let document = window.Document(); Ok(Range::new_with_doc(&document)) } -- cgit v1.2.3