mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Make reflect_dom_object take a &GlobalScope
This commit is contained in:
parent
093b189b48
commit
fcb59d3057
132 changed files with 488 additions and 407 deletions
|
@ -495,17 +495,17 @@ impl WindowMethods for Window {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-sessionstorage
|
||||
fn SessionStorage(&self) -> Root<Storage> {
|
||||
self.session_storage.or_init(|| Storage::new(&GlobalRef::Window(self), StorageType::Session))
|
||||
self.session_storage.or_init(|| Storage::new(self.upcast(), StorageType::Session))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-localstorage
|
||||
fn LocalStorage(&self) -> Root<Storage> {
|
||||
self.local_storage.or_init(|| Storage::new(&GlobalRef::Window(self), StorageType::Local))
|
||||
self.local_storage.or_init(|| Storage::new(self.upcast(), StorageType::Local))
|
||||
}
|
||||
|
||||
// https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#dfn-GlobalCrypto
|
||||
fn Crypto(&self) -> Root<Crypto> {
|
||||
self.crypto.or_init(|| Crypto::new(GlobalRef::Window(self)))
|
||||
self.crypto.or_init(|| Crypto::new(self.upcast()))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-frameelement
|
||||
|
@ -1708,7 +1708,7 @@ impl Window {
|
|||
|
||||
// Steps 3-12.
|
||||
// FIXME(#13195): muted errors.
|
||||
let event = ErrorEvent::new(GlobalRef::Window(self),
|
||||
let event = ErrorEvent::new(self.upcast(),
|
||||
atom!("error"),
|
||||
EventBubbles::DoesNotBubble,
|
||||
EventCancelable::Cancelable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue