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

@ -17,9 +17,9 @@ pub struct File {
}
impl File {
pub fn new_inherited(window: &JSRef<Window>, _file_bits: &JSRef<Blob>, name: DOMString) -> File {
pub fn new_inherited(global: &JSRef<Window>, _file_bits: &JSRef<Blob>, name: DOMString) -> File {
File {
blob: Blob::new_inherited(window),
blob: Blob::new_inherited(global),
name: name,
type_: FileTypeId
}
@ -27,9 +27,9 @@ impl File {
// the relevant subfields of file_bits should be copied over
}
pub fn new(window: &JSRef<Window>, file_bits: &JSRef<Blob>, name: DOMString) -> Temporary<File> {
reflect_dom_object(box File::new_inherited(window, file_bits, name),
window,
pub fn new(global: &JSRef<Window>, file_bits: &JSRef<Blob>, name: DOMString) -> Temporary<File> {
reflect_dom_object(box File::new_inherited(global, file_bits, name),
global,
FileBinding::Wrap)
}
}