Backed out 2 changesets (bug 1677718) for causing appcache wpt failures.

Backed out changeset 2b6b58a6fe2f (bug 1677718)
Backed out changeset d1cfc37a01b3 (bug 1677718)
This commit is contained in:
Cosmin Sabou 2023-06-01 02:18:51 +03:00
Родитель 6229818500
Коммит e678b16e56
32 изменённых файлов: 555 добавлений и 1 удалений

Просмотреть файл

@ -3,6 +3,8 @@ support-files=
head.js
dummy.js
dummy_page.html
prefs=
browser.cache.offline.enable=true
[browser_cookiePermission.js]
[browser_cookiePermission_aboutURL.js]

Просмотреть файл

@ -48,6 +48,19 @@ method PushSubscription.unsubscribe
// window.sidebar
attribute Window.sidebar
// AppCache API
method OfflineResourceList.swapCache
method OfflineResourceList.update
attribute OfflineResourceList.status
attribute OfflineResourceList.onchecking
attribute OfflineResourceList.onerror
attribute OfflineResourceList.onnoupdate
attribute OfflineResourceList.ondownloading
attribute OfflineResourceList.onprogress
attribute OfflineResourceList.onupdateready
attribute OfflineResourceList.oncached
attribute OfflineResourceList.onobsolete
// DataTransfer API (gecko-only methods)
method DataTransfer.addElement
attribute DataTransfer.mozItemCount

Просмотреть файл

@ -209,6 +209,7 @@
#include "nsCycleCollectionNoteChild.h"
#include "nsCycleCollectionTraversalCallback.h"
#include "nsDOMNavigationTiming.h"
#include "nsDOMOfflineResourceList.h"
#include "nsDebug.h"
#include "nsDeviceContext.h"
#include "nsDocShell.h"
@ -1180,6 +1181,12 @@ void nsGlobalWindowInner::FreeInnerObjects() {
// Remove our reference to the document and the document principal.
mFocusedElement = nullptr;
if (mApplicationCache) {
static_cast<nsDOMOfflineResourceList*>(mApplicationCache.get())
->Disconnect();
mApplicationCache = nullptr;
}
if (mIndexedDB) {
mIndexedDB->DisconnectFromGlobal(this);
mIndexedDB = nullptr;
@ -1401,6 +1408,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsGlobalWindowInner)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSharedWorkers)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mLocalStorage)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSessionStorage)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mApplicationCache)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIndexedDB)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocumentPrincipal)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocumentCookiePrincipal)
@ -1512,6 +1520,11 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsGlobalWindowInner)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mLocalStorage)
}
NS_IMPL_CYCLE_COLLECTION_UNLINK(mSessionStorage)
if (tmp->mApplicationCache) {
static_cast<nsDOMOfflineResourceList*>(tmp->mApplicationCache.get())
->Disconnect();
NS_IMPL_CYCLE_COLLECTION_UNLINK(mApplicationCache)
}
if (tmp->mIndexedDB) {
tmp->mIndexedDB->DisconnectFromGlobal(tmp);
NS_IMPL_CYCLE_COLLECTION_UNLINK(mIndexedDB)
@ -3325,6 +3338,38 @@ bool nsGlobalWindowInner::CachesEnabled(JSContext* aCx, JSObject*) {
return true;
}
nsDOMOfflineResourceList* nsGlobalWindowInner::GetApplicationCache(
ErrorResult& aError) {
if (!mApplicationCache) {
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(GetDocShell()));
if (!webNav || !mDoc) {
aError.Throw(NS_ERROR_FAILURE);
return nullptr;
}
nsCOMPtr<nsIURI> uri;
aError = webNav->GetCurrentURI(getter_AddRefs(uri));
if (aError.Failed()) {
return nullptr;
}
nsCOMPtr<nsIURI> manifestURI;
nsContentUtils::GetOfflineAppManifest(mDoc, getter_AddRefs(manifestURI));
RefPtr<nsDOMOfflineResourceList> applicationCache =
new nsDOMOfflineResourceList(manifestURI, uri, mDoc->NodePrincipal(),
this);
mApplicationCache = applicationCache;
}
return mApplicationCache;
}
nsDOMOfflineResourceList* nsGlobalWindowInner::GetApplicationCache() {
return GetApplicationCache(IgnoreErrors());
}
Crypto* nsGlobalWindowInner::GetCrypto(ErrorResult& aError) {
if (!mCrypto) {
mCrypto = new Crypto(this);
@ -5403,6 +5448,18 @@ nsresult nsGlobalWindowInner::Observe(nsISupports* aSubject, const char* aTopic,
return NS_OK;
}
if (!nsCRT::strcmp(aTopic, "offline-cache-update-added")) {
if (mApplicationCache) return NS_OK;
// Instantiate the application object now. It observes update belonging to
// this window's document and correctly updates the applicationCache object
// state.
nsCOMPtr<nsIObserver> observer = GetApplicationCache();
if (observer) observer->Observe(aSubject, aTopic, aData);
return NS_OK;
}
if (!nsCRT::strcmp(aTopic, PERMISSION_CHANGED_TOPIC)) {
nsCOMPtr<nsIPermission> perm(do_QueryInterface(aSubject));
if (!perm) {
@ -6095,6 +6152,11 @@ StorageAccess nsGlobalWindowInner::GetStorageAccess() {
}
nsresult nsGlobalWindowInner::FireDelayedDOMEvents(bool aIncludeSubWindows) {
if (mApplicationCache) {
static_cast<nsDOMOfflineResourceList*>(mApplicationCache.get())
->FirePendingEvents();
}
// Fires an offline status event if the offline status has changed
FireOfflineStatusEventIfChanged();

Просмотреть файл

@ -57,6 +57,7 @@ class nsIContent;
class nsICSSDeclaration;
class nsIDocShellTreeOwner;
class nsIDOMWindowUtils;
class nsDOMOfflineResourceList;
class nsIScrollableFrame;
class nsIControllers;
class nsIScriptContext;
@ -650,6 +651,9 @@ class nsGlobalWindowInner final : public mozilla::dom::EventTarget,
mozilla::dom::Nullable<mozilla::dom::WindowProxyHolder> Open(
const nsAString& aUrl, const nsAString& aName, const nsAString& aOptions,
mozilla::ErrorResult& aError);
nsDOMOfflineResourceList* GetApplicationCache(mozilla::ErrorResult& aError);
nsDOMOfflineResourceList* GetApplicationCache() override;
int16_t Orientation(mozilla::dom::CallerType aCallerType);
already_AddRefed<mozilla::dom::Console> GetConsole(JSContext* aCx,
@ -1500,6 +1504,8 @@ class nsGlobalWindowInner final : public mozilla::dom::EventTarget,
nsCOMPtr<nsIURI> mLastOpenedURI;
#endif
RefPtr<nsDOMOfflineResourceList> mApplicationCache;
RefPtr<mozilla::dom::IDBFactory> mIndexedDB;
// This flag keeps track of whether this window is currently

Просмотреть файл

@ -26,6 +26,7 @@
#define DOM_WINDOW_FROZEN_TOPIC "dom-window-frozen"
#define DOM_WINDOW_THAWED_TOPIC "dom-window-thawed"
class nsDOMOfflineResourceList;
class nsGlobalWindowInner;
class nsGlobalWindowOuter;
class nsIArray;
@ -613,6 +614,8 @@ class nsPIDOMWindowInner : public mozIDOMWindow {
mozilla::dom::Element& aElt, const nsAString& aPseudoElt,
mozilla::ErrorResult& aError) = 0;
virtual nsDOMOfflineResourceList* GetApplicationCache() = 0;
virtual bool GetFullScreen() = 0;
virtual nsresult Focus(mozilla::dom::CallerType aCallerType) = 0;

Просмотреть файл

@ -611,6 +611,10 @@ DOMInterfaces = {
'nativeType': 'mozilla::dom::AudioContext',
},
'OfflineResourceList': {
'nativeType': 'nsDOMOfflineResourceList',
},
'OffscreenCanvasRenderingContext2D': {
'implicitJSContext': [
'createImageData', 'getImageData', 'isPointInPath', 'isPointInStroke'

Просмотреть файл

@ -58,6 +58,7 @@ DIRS += [
"media",
"midi",
"notification",
"offline",
"power",
"push",
"quota",

Просмотреть файл

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<script>
try {
navigator.pendingOfflineLoads[0];
} catch (e) {
}
try {
navigator.pendingOfflineLoads[1000];
} catch (e) {
}
try {
navigator.pendingOfflineLoads[-1];
} catch (e) {
}
</script>
</head>
<body>
</body>
</html>

Просмотреть файл

@ -0,0 +1 @@
load 408431-1.html

22
dom/offline/moz.build Normal file
Просмотреть файл

@ -0,0 +1,22 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
with Files("**"):
BUG_COMPONENT = ("Core", "Networking")
EXPORTS += [
"nsDOMOfflineResourceList.h",
]
UNIFIED_SOURCES += [
"nsDOMOfflineResourceList.cpp",
]
LOCAL_INCLUDES += [
"/dom/base",
"/uriloader/prefetch",
]
FINAL_LIBRARY = "xul"

Просмотреть файл

@ -0,0 +1,160 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsDOMOfflineResourceList.h"
#include "nsError.h"
#include "mozilla/Components.h"
#include "mozilla/dom/DOMStringList.h"
#include "nsNetUtil.h"
#include "nsNetCID.h"
#include "nsServiceManagerUtils.h"
#include "nsICookieJarSettings.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsContentUtils.h"
#include "nsILoadContext.h"
#include "nsIObserverService.h"
#include "nsIScriptGlobalObject.h"
#include "nsIWebNavigation.h"
#include "mozilla/dom/Document.h"
#include "mozilla/dom/Event.h"
#include "mozilla/dom/OfflineResourceListBinding.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventListenerManager.h"
#include "mozilla/Preferences.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/StaticPrefs_browser.h"
#include "nsXULAppAPI.h"
#define IS_CHILD_PROCESS() (GeckoProcessType_Default != XRE_GetProcessType())
using namespace mozilla;
using namespace mozilla::dom;
//
// nsDOMOfflineResourceList
//
NS_IMPL_CYCLE_COLLECTION_WEAK_INHERITED(nsDOMOfflineResourceList,
DOMEventTargetHelper)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDOMOfflineResourceList)
NS_INTERFACE_MAP_ENTRY(nsIObserver)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(nsDOMOfflineResourceList, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(nsDOMOfflineResourceList, DOMEventTargetHelper)
nsDOMOfflineResourceList::nsDOMOfflineResourceList(
nsIURI* aManifestURI, nsIURI* aDocumentURI, nsIPrincipal* aLoadingPrincipal,
nsPIDOMWindowInner* aWindow)
: DOMEventTargetHelper(aWindow) {}
nsDOMOfflineResourceList::~nsDOMOfflineResourceList() { ClearCachedKeys(); }
JSObject* nsDOMOfflineResourceList::WrapObject(
JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
return OfflineResourceList_Binding::Wrap(aCx, this, aGivenProto);
}
void nsDOMOfflineResourceList::Disconnect() {}
already_AddRefed<DOMStringList> nsDOMOfflineResourceList::GetMozItems(
ErrorResult& aRv) {
if (IS_CHILD_PROCESS()) {
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
return nullptr;
}
RefPtr<DOMStringList> items = new DOMStringList();
return items.forget();
}
bool nsDOMOfflineResourceList::MozHasItem(const nsAString& aURI,
ErrorResult& aRv) {
return false;
}
uint32_t nsDOMOfflineResourceList::GetMozLength(ErrorResult& aRv) {
if (IS_CHILD_PROCESS()) {
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
return 0;
}
return 0;
}
void nsDOMOfflineResourceList::MozItem(uint32_t aIndex, nsAString& aURI,
ErrorResult& aRv) {
aRv.Throw(NS_ERROR_NOT_AVAILABLE);
}
void nsDOMOfflineResourceList::IndexedGetter(uint32_t aIndex, bool& aFound,
nsAString& aURI,
ErrorResult& aRv) {
if (IS_CHILD_PROCESS()) {
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
return;
}
aFound = false;
}
void nsDOMOfflineResourceList::MozAdd(const nsAString& aURI, ErrorResult& aRv) {
}
void nsDOMOfflineResourceList::MozRemove(const nsAString& aURI,
ErrorResult& aRv) {}
uint16_t nsDOMOfflineResourceList::GetStatus(ErrorResult& aRv) {
return OfflineResourceList_Binding::UNCACHED;
}
void nsDOMOfflineResourceList::Update(ErrorResult& aRv) {}
void nsDOMOfflineResourceList::SwapCache(ErrorResult& aRv) {}
void nsDOMOfflineResourceList::FirePendingEvents() {}
void nsDOMOfflineResourceList::SendEvent(const nsAString& aEventName) {}
//
// nsDOMOfflineResourceList::nsIObserver
//
NS_IMETHODIMP
nsDOMOfflineResourceList::Observe(nsISupports* aSubject, const char* aTopic,
const char16_t* aData) {
return NS_OK;
}
nsresult nsDOMOfflineResourceList::GetCacheKey(const nsAString& aURI,
nsCString& aKey) {
nsCOMPtr<nsIURI> requestedURI;
nsresult rv = NS_NewURI(getter_AddRefs(requestedURI), aURI);
NS_ENSURE_SUCCESS(rv, rv);
return GetCacheKey(requestedURI, aKey);
}
nsresult nsDOMOfflineResourceList::GetCacheKey(nsIURI* aURI, nsCString& aKey) {
nsresult rv = aURI->GetAsciiSpec(aKey);
NS_ENSURE_SUCCESS(rv, rv);
// url fragments aren't used in cache keys
nsAutoCString::const_iterator specStart, specEnd;
aKey.BeginReading(specStart);
aKey.EndReading(specEnd);
if (FindCharInReadable('#', specStart, specEnd)) {
aKey.BeginReading(specEnd);
aKey = Substring(specEnd, specStart);
}
return NS_OK;
}
nsresult nsDOMOfflineResourceList::CacheKeys() { return NS_OK; }
void nsDOMOfflineResourceList::ClearCachedKeys() {}

Просмотреть файл

@ -0,0 +1,95 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsDOMOfflineResourceList_h___
#define nsDOMOfflineResourceList_h___
#include "nscore.h"
#include "nsTArray.h"
#include "nsString.h"
#include "nsIURI.h"
#include "nsCOMPtr.h"
#include "nsWeakReference.h"
#include "nsCOMArray.h"
#include "nsIObserver.h"
#include "nsIScriptContext.h"
#include "nsCycleCollectionParticipant.h"
#include "nsPIDOMWindow.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/Maybe.h"
namespace mozilla::dom {
class DOMStringList;
class Event;
} // namespace mozilla::dom
class nsDOMOfflineResourceList final : public mozilla::DOMEventTargetHelper,
public nsIObserver,
public nsSupportsWeakReference {
using ErrorResult = mozilla::ErrorResult;
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIOBSERVER
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsDOMOfflineResourceList,
mozilla::DOMEventTargetHelper)
nsDOMOfflineResourceList(nsIURI* aManifestURI, nsIURI* aDocumentURI,
nsIPrincipal* aLoadingPrincipal,
nsPIDOMWindowInner* aWindow);
void FirePendingEvents();
void Disconnect();
nsPIDOMWindowInner* GetParentObject() const { return GetOwner(); }
virtual JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
uint16_t GetStatus(ErrorResult& aRv);
void Update(ErrorResult& aRv);
void SwapCache(ErrorResult& aRv);
IMPL_EVENT_HANDLER(checking)
IMPL_EVENT_HANDLER(error)
IMPL_EVENT_HANDLER(noupdate)
IMPL_EVENT_HANDLER(downloading)
IMPL_EVENT_HANDLER(progress)
IMPL_EVENT_HANDLER(cached)
IMPL_EVENT_HANDLER(updateready)
IMPL_EVENT_HANDLER(obsolete)
already_AddRefed<mozilla::dom::DOMStringList> GetMozItems(ErrorResult& aRv);
bool MozHasItem(const nsAString& aURI, ErrorResult& aRv);
uint32_t GetMozLength(ErrorResult& aRv);
void MozItem(uint32_t aIndex, nsAString& aURI, ErrorResult& aRv);
void IndexedGetter(uint32_t aIndex, bool& aFound, nsAString& aURI,
ErrorResult& aRv);
uint32_t Length() {
mozilla::IgnoredErrorResult rv;
uint32_t length = GetMozLength(rv);
return rv.Failed() ? 0 : length;
}
void MozAdd(const nsAString& aURI, ErrorResult& aRv);
void MozRemove(const nsAString& aURI, ErrorResult& aRv);
protected:
virtual ~nsDOMOfflineResourceList();
private:
void SendEvent(const nsAString& aEventName);
nsresult GetCacheKey(const nsAString& aURI, nsCString& aKey);
nsresult GetCacheKey(nsIURI* aURI, nsCString& aKey);
nsresult CacheKeys();
void ClearCachedKeys();
};
#endif

Просмотреть файл

@ -893,6 +893,12 @@ let interfaceNamesInGlobalScope = [
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "OfflineAudioContext", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{
name: "OfflineResourceList",
insecureContext: false,
disabled: isEarlyBetaOrEarlier,
},
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "OffscreenCanvas", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "OffscreenCanvasRenderingContext2D", insecureContext: true },

Просмотреть файл

@ -0,0 +1,124 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
[SecureContext, Pref="browser.cache.offline.enable",
Exposed=Window]
interface OfflineResourceList : EventTarget {
/**
* State of the application cache this object is associated with.
*/
/* This object is not associated with an application cache. */
const unsigned short UNCACHED = 0;
/* The application cache is not being updated. */
const unsigned short IDLE = 1;
/* The manifest is being fetched and checked for updates */
const unsigned short CHECKING = 2;
/* Resources are being downloaded to be added to the cache */
const unsigned short DOWNLOADING = 3;
/* There is a new version of the application cache available */
const unsigned short UPDATEREADY = 4;
/* The application cache group is now obsolete. */
const unsigned short OBSOLETE = 5;
[Throws, UseCounter]
readonly attribute unsigned short status;
/**
* Begin the application update process on the associated application cache.
*/
[Throws, UseCounter]
undefined update();
/**
* Swap in the newest version of the application cache, or disassociate
* from the cache if the cache group is obsolete.
*/
[Throws, UseCounter]
undefined swapCache();
/* Events */
[UseCounter]
attribute EventHandler onchecking;
[UseCounter]
attribute EventHandler onerror;
[UseCounter]
attribute EventHandler onnoupdate;
[UseCounter]
attribute EventHandler ondownloading;
[UseCounter]
attribute EventHandler onprogress;
[UseCounter]
attribute EventHandler onupdateready;
[UseCounter]
attribute EventHandler oncached;
[UseCounter]
attribute EventHandler onobsolete;
};
// Mozilla extensions.
partial interface OfflineResourceList {
/**
* Get the list of dynamically-managed entries.
*/
[Throws]
readonly attribute DOMStringList mozItems;
/**
* Check that an entry exists in the list of dynamically-managed entries.
*
* @param uri
* The resource to check.
*/
[Throws]
boolean mozHasItem(DOMString uri);
/**
* Get the number of dynamically-managed entries.
* @status DEPRECATED
* Clients should use the "items" attribute.
*/
[Throws]
readonly attribute unsigned long mozLength;
/**
* Get the URI of a dynamically-managed entry.
* @status DEPRECATED
* Clients should use the "items" attribute.
*/
[Throws]
getter DOMString mozItem(unsigned long index);
/**
* We need a "length" to actually be valid Web IDL, given that we have an
* indexed getter.
*/
readonly attribute unsigned long length;
/**
* Add an item to the list of dynamically-managed entries. The resource
* will be fetched into the application cache.
*
* @param uri
* The resource to add.
*/
[Throws]
undefined mozAdd(DOMString uri);
/**
* Remove an item from the list of dynamically-managed entries. If this
* was the last reference to a URI in the application cache, the cache
* entry will be removed.
*
* @param uri
* The resource to remove.
*/
[Throws]
undefined mozRemove(DOMString uri);
};

Просмотреть файл

@ -25,11 +25,15 @@ interface XULControllers;
interface nsIDOMWindowUtils;
interface nsIPrintSettings;
typedef OfflineResourceList ApplicationCache;
// http://www.whatwg.org/specs/web-apps/current-work/
[Global, LegacyUnenumerableNamedProperties, NeedResolve,
Exposed=Window,
InstrumentedProps=(AbsoluteOrientationSensor,
Accelerometer,
ApplicationCache,
ApplicationCacheErrorEvent,
Atomics,
AudioParamMap,
AudioWorklet,
@ -244,6 +248,7 @@ interface nsIPrintSettings;
readonly attribute Navigator clientInformation;
[Replaceable] readonly attribute External external;
[Throws, SecureContext, Pref="browser.cache.offline.enable"] readonly attribute ApplicationCache applicationCache;
// user prompts
[Throws, NeedsSubjectPrincipal] undefined alert();

Просмотреть файл

@ -756,6 +756,7 @@ WEBIDL_FILES = [
"NotificationEvent.webidl",
"NotifyPaintEvent.webidl",
"OfflineAudioContext.webidl",
"OfflineResourceList.webidl",
"OffscreenCanvas.webidl",
"OffscreenCanvasRenderingContext2D.webidl",
"OscillatorNode.webidl",

Просмотреть файл

@ -40,6 +40,7 @@ LOCAL_INCLUDES += [
"/dom/html",
"/dom/jsurl",
"/dom/media",
"/dom/offline",
"/dom/storage",
"/dom/xslt/base",
"/dom/xslt/xml",

Просмотреть файл

@ -968,6 +968,11 @@
value: true
mirror: always
- name: browser.cache.offline.enable
type: bool
value: @IS_NOT_EARLY_BETA_OR_EARLIER@
mirror: always
- name: browser.cache.disk.enable
type: RelaxedAtomicBool
value: true

Просмотреть файл

@ -6,6 +6,7 @@
interface nsICacheStorage;
interface nsILoadContextInfo;
interface nsIApplicationCache;
interface nsIEventTarget;
interface nsICacheStorageConsumptionObserver;
interface nsICacheStorageVisitor;

Просмотреть файл

@ -338,6 +338,7 @@ struct HttpChannelOpenArgs
bool uploadStreamHasHeaders;
bool allowSTS;
bool resumeAt;
bool chooseApplicationCache;
bool allowSpdy;
bool allowHttp3;
bool allowAltSvc;

Просмотреть файл

@ -166,6 +166,7 @@ function run_test() {
httpserver.registerPathHandler("/bug650995", handler);
httpserver.start(-1);
prefService.setBoolPref("browser.cache.offline.enable", false);
prefService.setBoolPref("network.http.rcwn.enabled", false);
nextTest();

Просмотреть файл

@ -25,6 +25,7 @@ include ../../dom/media/webvtt/test/crashtests/crashtests.list
skip-if(!webrtc) include ../../dom/media/tests/crashtests/crashtests.list
skip-if(!webrtc) include ../../dom/media/webrtc/tests/crashtests/crashtests.list
include ../../dom/media/webspeech/synth/crashtests/crashtests.list
include ../../dom/offline/crashtests/crashtests.list
include ../../dom/plugins/test/crashtests/crashtests.list
include ../../dom/security/test/crashtests/crashtests.list
include ../../dom/serializers/crashtests/crashtests.list

Просмотреть файл

@ -69,6 +69,8 @@ user_pref("widget.disable-dark-scrollbar", true);
// be confusing for tests that send click events before the first paint.
user_pref("nglayout.initialpaint.unsuppress_with_no_background", true);
user_pref("media.block-autoplay-until-in-foreground", false);
// Enable AppCache globally for now whilst it's being removed in Bug 1584984
user_pref("browser.cache.offline.enable", true);
// Force a light color scheme unless explicitly overriden by pref.
user_pref("layout.css.prefers-color-scheme.content-override", 1);
// Force OffscreenCanvas support

Просмотреть файл

@ -1,2 +1 @@
disabled: true
lsan-allowed: [Alloc, AllocateProtoAndIfaceCache, Malloc, Realloc, mozilla::detail::HashTable, mozilla::dom::Console::CreateInstance, mozilla::dom::Performance::CreateForMainThread, mozilla::dom::PerformanceMainThread::CreateNavigationTimingEntry, mozilla::dom::ProtoAndIfaceCache::PageTableCache::EntrySlotOrCreate, mozilla::net::nsStandardURL::TemplatedMutator, nsGlobalWindowInner::GetApplicationCache, nsSupportsWeakReference::GetWeakReference]

Просмотреть файл

@ -0,0 +1,2 @@
[api_status_checking-manual.html]
prefs: [browser.cache.offline.enable:true]

Просмотреть файл

@ -0,0 +1,2 @@
[api_status_downloading-manual.html]
prefs: [browser.cache.offline.enable:true]

Просмотреть файл

@ -0,0 +1,2 @@
[api_status_obsolete-manual.html]
prefs: [browser.cache.offline.enable:true]

Просмотреть файл

@ -0,0 +1,2 @@
[api_status_updateready-manual.html]
prefs: [browser.cache.offline.enable:true]

Просмотреть файл

@ -0,0 +1,2 @@
[api_swapcache-manual.html]
prefs: [browser.cache.offline.enable:true]

Просмотреть файл

@ -1,4 +1,5 @@
[clients-get.https.html]
prefs: [browser.cache.offline.enable:true]
disabled:
if debug and (os == "mac"): https://bugzilla.mozilla.org/show_bug.cgi?id=1586420
expected:

Просмотреть файл

@ -11,6 +11,7 @@
pref("browser.dom.window.dump.enabled", true);
pref("devtools.console.stdout.chrome", true);
pref("browser.cache.offline.enable", false);
pref("browser.cache.disk.enable", false);
pref("permissions.memory_only", true);

Просмотреть файл

@ -223,6 +223,7 @@ const DEFAULT_ENVIRONMENT_PREFS = new Map([
["browser.cache.disk.enable", { what: RECORD_PREF_VALUE }],
["browser.cache.disk.capacity", { what: RECORD_PREF_VALUE }],
["browser.cache.memory.enable", { what: RECORD_PREF_VALUE }],
["browser.cache.offline.enable", { what: RECORD_PREF_VALUE }],
["browser.formfill.enable", { what: RECORD_PREF_VALUE }],
["browser.fixup.alternate.enabled", { what: RECORD_DEFAULTPREF_VALUE }],
["browser.migrate.interactions.bookmarks", { what: RECORD_PREF_VALUE }],