Bug 1316111. Move the 'caches' attribute to WindowOrWorkerGlobalScope, to align with the spec. r=bkelly

This commit is contained in:
Boris Zbarsky 2016-11-11 16:09:05 -05:00
parent 20b0a84702
commit 9a0e7e609f
3 changed files with 7 additions and 12 deletions

View File

@ -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 = "");

View File

@ -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.

View File

@ -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;