Rename variables that refer to global objects.

This clarifies whether those variables will point to a Window object or an
arbitrary global object.

Note in particular that all IDL Constructors will accept an arbitrary global
object.
This commit is contained in:
Ms2ger 2014-07-15 12:09:21 +02:00
parent ab1a188e95
commit f963ed99ac
21 changed files with 95 additions and 92 deletions

View file

@ -40,8 +40,8 @@ impl DocumentFragment {
Node::reflect_node(box node, document, DocumentFragmentBinding::Wrap)
}
pub fn Constructor(owner: &JSRef<Window>) -> Fallible<Temporary<DocumentFragment>> {
let document = owner.Document();
pub fn Constructor(global: &JSRef<Window>) -> Fallible<Temporary<DocumentFragment>> {
let document = global.Document();
let document = document.root();
Ok(DocumentFragment::new(&document.root_ref()))