mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
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:
parent
ab1a188e95
commit
f963ed99ac
21 changed files with 95 additions and 92 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue