From 9a0e7e609fc965166f8b5a05e0712a6bf533dd24 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 11 Nov 2016 16:09:05 -0500 Subject: [PATCH] Bug 1316111. Move the 'caches' attribute to WindowOrWorkerGlobalScope, to align with the spec. r=bkelly --- dom/webidl/Window.webidl | 6 ------ dom/webidl/WindowOrWorkerGlobalScope.webidl | 7 +++++++ dom/webidl/WorkerGlobalScope.webidl | 6 ------ 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/dom/webidl/Window.webidl b/dom/webidl/Window.webidl index 017eb3179d62..48773678056d 100644 --- a/dom/webidl/Window.webidl +++ b/dom/webidl/Window.webidl @@ -255,12 +255,6 @@ interface WindowModal { }; Window implements WindowModal; -// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#self-caches -partial interface Window { -[Throws, Func="mozilla::dom::cache::CacheStorage::PrefEnabled", SameObject] -readonly attribute CacheStorage caches; -}; - // Mozilla-specific stuff partial interface Window { //[NewObject, Throws] CSSStyleDeclaration getDefaultComputedStyle(Element elt, optional DOMString pseudoElt = ""); diff --git a/dom/webidl/WindowOrWorkerGlobalScope.webidl b/dom/webidl/WindowOrWorkerGlobalScope.webidl index 02a75525a439..8f0d0029ffeb 100644 --- a/dom/webidl/WindowOrWorkerGlobalScope.webidl +++ b/dom/webidl/WindowOrWorkerGlobalScope.webidl @@ -7,6 +7,7 @@ * https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin * https://fetch.spec.whatwg.org/#fetch-method * https://w3c.github.io/webappsec-secure-contexts/#monkey-patching-global-object + * https://w3c.github.io/ServiceWorker/#self-caches */ // https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin @@ -60,6 +61,12 @@ partial interface WindowOrWorkerGlobalScope { readonly attribute IDBFactory? indexedDB; }; +// https://w3c.github.io/ServiceWorker/#self-caches +partial interface WindowOrWorkerGlobalScope { + [Throws, Func="mozilla::dom::cache::CacheStorage::PrefEnabled", SameObject] + readonly attribute CacheStorage caches; +}; + // Mozilla extensions partial interface WindowOrWorkerGlobalScope { // Extensions to ImageBitmap bits. diff --git a/dom/webidl/WorkerGlobalScope.webidl b/dom/webidl/WorkerGlobalScope.webidl index 3243a5f93fc0..25cfe9e29459 100644 --- a/dom/webidl/WorkerGlobalScope.webidl +++ b/dom/webidl/WorkerGlobalScope.webidl @@ -35,12 +35,6 @@ partial interface WorkerGlobalScope { readonly attribute WorkerNavigator navigator; }; -// https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#self-caches -partial interface WorkerGlobalScope { -[Throws, Func="mozilla::dom::cache::CacheStorage::PrefEnabled", SameObject] -readonly attribute CacheStorage caches; -}; - WorkerGlobalScope implements GlobalCrypto; WorkerGlobalScope implements WindowOrWorkerGlobalScope;