Backed out changeset 9da3d7718f82 (bug 1717613) for causing BR build bustages. CLOSED TREE

This commit is contained in:
Sandor Molnar 2021-06-24 22:24:55 +03:00
Родитель aa48ebcb68
Коммит e6880a9bb9
5 изменённых файлов: 28 добавлений и 0 удалений

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

@ -555,6 +555,9 @@ include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = "xul"
if CONFIG["MOZ_BUILD_APP"] in ["browser", "mobile/android", "xulrunner"]:
DEFINES["HAVE_SIDEBAR"] = True
if CONFIG["MOZ_X11"]:
CXXFLAGS += CONFIG["TK_CFLAGS"]

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

@ -316,6 +316,10 @@
# include "nsIWebBrowserPrint.h"
#endif
#ifdef HAVE_SIDEBAR
# include "mozilla/dom/ExternalBinding.h"
#endif
#ifdef MOZ_WEBSPEECH
# include "mozilla/dom/SpeechSynthesis.h"
#endif
@ -7266,15 +7270,21 @@ bool nsGlobalWindowInner::IsSecureContext() const {
}
External* nsGlobalWindowInner::GetExternal(ErrorResult& aRv) {
#ifdef HAVE_SIDEBAR
if (!mExternal) {
mExternal = new dom::External(ToSupports(this));
}
return mExternal;
#else
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
return nullptr;
#endif
}
void nsGlobalWindowInner::GetSidebar(OwningExternalOrWindowProxy& aResult,
ErrorResult& aRv) {
#ifdef HAVE_SIDEBAR
// First check for a named frame named "sidebar"
RefPtr<BrowsingContext> domWindow = GetChildWindow(u"sidebar"_ns);
if (domWindow) {
@ -7286,6 +7296,9 @@ void nsGlobalWindowInner::GetSidebar(OwningExternalOrWindowProxy& aResult,
if (external) {
aResult.SetAsExternal() = external;
}
#else
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
#endif
}
void nsGlobalWindowInner::ClearDocumentDependentSlots(JSContext* aCx) {

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

@ -252,6 +252,10 @@
#include "mozilla/dom/Worklet.h"
#include "AccessCheck.h"
#ifdef HAVE_SIDEBAR
# include "mozilla/dom/ExternalBinding.h"
#endif
#ifdef MOZ_WEBSPEECH
# include "mozilla/dom/SpeechSynthesis.h"
#endif

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

@ -163,6 +163,10 @@ SPHINX_PYTHON_PACKAGE_DIRS += ["mozwebidlcodegen"]
with Files("mozwebidlcodegen/**.py"):
SCHEDULES.inclusive += ["docs"]
if CONFIG["MOZ_BUILD_APP"] in ["browser", "mobile/android", "xulrunner"]:
# This is needed for Window.webidl
DEFINES["HAVE_SIDEBAR"] = True
PYTHON_UNITTEST_MANIFESTS += [
"mozwebidlcodegen/test/python.ini",

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

@ -247,7 +247,9 @@ typedef OfflineResourceList ApplicationCache;
[Pref="dom.window.clientinformation.enabled", BinaryName="Navigator"]
readonly attribute Navigator clientInformation;
#ifdef HAVE_SIDEBAR
[Replaceable, Throws] readonly attribute External external;
#endif
[Throws, SecureContext, Pref="browser.cache.offline.enable"] readonly attribute ApplicationCache applicationCache;
// user prompts
@ -567,12 +569,14 @@ partial interface Window {
};
#endif
#ifdef HAVE_SIDEBAR
// Mozilla extension
// Sidebar is deprecated and it will be removed in the next cycles. See bug 1640138.
partial interface Window {
[Replaceable, Throws, UseCounter, Pref="dom.window.sidebar.enabled"]
readonly attribute (External or WindowProxy) sidebar;
};
#endif
[MOZ_CAN_RUN_SCRIPT_BOUNDARY]
callback PromiseDocumentFlushedCallback = any ();