2017-10-27 20:33:53 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2006-05-19 13:31:57 +04:00
|
|
|
|
2012-08-16 05:46:03 +04:00
|
|
|
#include "base/basictypes.h"
|
|
|
|
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsLayoutStatics.h"
|
|
|
|
#include "nscore.h"
|
|
|
|
|
2016-11-22 02:58:37 +03:00
|
|
|
#include "DateTimeFormat.h"
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsAttrValue.h"
|
|
|
|
#include "nsAutoCopyListener.h"
|
|
|
|
#include "nsColorNames.h"
|
|
|
|
#include "nsComputedDOMStyle.h"
|
|
|
|
#include "nsContentDLF.h"
|
|
|
|
#include "nsContentUtils.h"
|
|
|
|
#include "nsCSSAnonBoxes.h"
|
2012-11-15 20:36:15 +04:00
|
|
|
#include "mozilla/css/ErrorReporter.h"
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsCSSKeywords.h"
|
2010-03-02 23:59:32 +03:00
|
|
|
#include "nsCSSParser.h"
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsCSSProps.h"
|
|
|
|
#include "nsCSSPseudoClasses.h"
|
|
|
|
#include "nsCSSPseudoElements.h"
|
2007-03-14 22:48:51 +03:00
|
|
|
#include "nsCSSRendering.h"
|
2017-02-03 01:26:39 +03:00
|
|
|
#include "nsGenericHTMLFrameElement.h"
|
2013-04-09 19:29:44 +04:00
|
|
|
#include "mozilla/dom/Attr.h"
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsDOMClassInfo.h"
|
2014-03-17 10:56:53 +04:00
|
|
|
#include "mozilla/EventListenerManager.h"
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsFrame.h"
|
|
|
|
#include "nsGlobalWindow.h"
|
2007-01-30 03:06:41 +03:00
|
|
|
#include "nsGkAtoms.h"
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsImageFrame.h"
|
|
|
|
#include "nsLayoutStylesheetCache.h"
|
2018-02-01 07:04:04 +03:00
|
|
|
#ifdef MOZ_OLD_STYLE
|
2015-06-26 06:52:47 +03:00
|
|
|
#include "mozilla/RuleProcessorCache.h"
|
2018-02-01 07:04:04 +03:00
|
|
|
#endif
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsRange.h"
|
2009-09-10 05:22:03 +04:00
|
|
|
#include "nsRegion.h"
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsRepeatService.h"
|
2009-01-05 03:39:54 +03:00
|
|
|
#include "nsFloatManager.h"
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsSprocketLayout.h"
|
|
|
|
#include "nsStackLayout.h"
|
2018-02-01 07:04:04 +03:00
|
|
|
#ifdef MOZ_OLD_STYLE
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsStyleSet.h"
|
2018-02-01 07:04:04 +03:00
|
|
|
#endif
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsTextControlFrame.h"
|
2012-05-23 22:46:04 +04:00
|
|
|
#include "nsXBLService.h"
|
2006-12-22 20:22:18 +03:00
|
|
|
#include "txMozillaXSLTProcessor.h"
|
2011-07-29 15:48:04 +04:00
|
|
|
#include "nsTreeSanitizer.h"
|
2007-02-13 19:23:19 +03:00
|
|
|
#include "nsCellMap.h"
|
2013-11-03 06:33:23 +04:00
|
|
|
#include "nsTextFrame.h"
|
2007-05-11 00:21:12 +04:00
|
|
|
#include "nsCCUncollectableMarker.h"
|
2007-07-03 03:36:59 +04:00
|
|
|
#include "nsTextFragment.h"
|
2017-11-17 10:35:26 +03:00
|
|
|
#include "nsMediaFeatures.h"
|
2014-12-31 02:54:59 +03:00
|
|
|
#include "nsCORSListenerProxy.h"
|
2008-11-08 02:00:26 +03:00
|
|
|
#include "nsHTMLDNSPrefetch.h"
|
2009-06-29 02:44:22 +04:00
|
|
|
#include "nsHtml5Module.h"
|
2017-01-26 23:43:39 +03:00
|
|
|
#include "nsHTMLTags.h"
|
2017-01-26 23:43:39 +03:00
|
|
|
#include "nsIRDFContentSink.h" // for RDF atom initialization
|
2013-11-04 15:24:33 +04:00
|
|
|
#include "mozilla/dom/FallbackEncoding.h"
|
Bug 178324, refactor focus by moving all focus handling into one place and simplifying it, add many tests, fixes many other bugs too numerous to mention in this small checkin comment, r=josh,smichaud,ere,dbaron,marco,neil,gavin,smaug,sr=smaug (CLOSED TREE)
2009-06-10 22:00:39 +04:00
|
|
|
#include "nsFocusManager.h"
|
2009-08-09 02:00:26 +04:00
|
|
|
#include "nsListControlFrame.h"
|
2013-03-28 23:41:32 +04:00
|
|
|
#include "mozilla/dom/HTMLInputElement.h"
|
2013-02-09 00:24:47 +04:00
|
|
|
#include "SVGElementFactory.h"
|
2010-06-18 13:21:13 +04:00
|
|
|
#include "nsSVGUtils.h"
|
2011-06-02 15:11:33 +04:00
|
|
|
#include "nsMathMLAtoms.h"
|
|
|
|
#include "nsMathMLOperators.h"
|
2011-11-02 17:44:16 +04:00
|
|
|
#include "Navigator.h"
|
2017-01-04 16:53:01 +03:00
|
|
|
#include "StorageObserver.h"
|
2013-09-20 13:11:25 +04:00
|
|
|
#include "CacheObserver.h"
|
2013-03-06 15:08:11 +04:00
|
|
|
#include "DisplayItemClip.h"
|
2013-09-04 15:30:57 +04:00
|
|
|
#include "ActiveLayerTracker.h"
|
2014-08-06 09:19:25 +04:00
|
|
|
#include "FrameLayerBuilder.h"
|
2015-04-01 01:05:54 +03:00
|
|
|
#include "AnimationCommon.h"
|
2015-09-03 23:59:00 +03:00
|
|
|
#include "LayerAnimationInfo.h"
|
2006-05-19 13:31:57 +04:00
|
|
|
|
2012-12-04 23:46:07 +04:00
|
|
|
#include "AudioChannelService.h"
|
2015-04-10 18:27:57 +03:00
|
|
|
#include "mozilla/dom/PromiseDebugging.h"
|
2015-09-11 17:01:20 +03:00
|
|
|
#include "mozilla/dom/WebCryptoThreadPool.h"
|
2012-12-04 23:46:07 +04:00
|
|
|
|
2006-05-19 13:31:57 +04:00
|
|
|
#ifdef MOZ_XUL
|
2007-07-24 04:04:36 +04:00
|
|
|
#include "nsXULPopupManager.h"
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsXULContentUtils.h"
|
2007-03-12 08:53:33 +03:00
|
|
|
#include "nsXULPrototypeCache.h"
|
2007-04-13 00:59:01 +04:00
|
|
|
#include "nsXULTooltipListener.h"
|
2007-07-18 09:41:40 +04:00
|
|
|
|
|
|
|
#include "inDOMView.h"
|
2014-02-18 21:07:27 +04:00
|
|
|
|
|
|
|
#include "nsMenuBarListener.h"
|
2007-07-18 09:41:40 +04:00
|
|
|
#endif
|
2006-05-19 13:31:57 +04:00
|
|
|
|
2014-08-25 17:26:09 +04:00
|
|
|
#include "CubebUtils.h"
|
2013-01-28 22:22:37 +04:00
|
|
|
#include "Latency.h"
|
2013-08-09 02:07:42 +04:00
|
|
|
#include "WebAudioUtils.h"
|
2008-07-30 10:50:14 +04:00
|
|
|
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsError.h"
|
|
|
|
|
2008-09-11 17:20:56 +04:00
|
|
|
#include "nsJSEnvironment.h"
|
2010-04-27 13:57:32 +04:00
|
|
|
#include "nsContentSink.h"
|
2010-08-10 21:18:26 +04:00
|
|
|
#include "nsFrameMessageManager.h"
|
2012-03-31 20:30:13 +04:00
|
|
|
#include "nsDOMMutationObserver.h"
|
2011-05-04 15:29:56 +04:00
|
|
|
#include "nsHyphenationManager.h"
|
2012-02-24 06:43:33 +04:00
|
|
|
#include "nsWindowMemoryReporter.h"
|
2012-08-16 05:46:03 +04:00
|
|
|
#include "mozilla/dom/ContentParent.h"
|
2013-04-26 04:53:26 +04:00
|
|
|
#include "mozilla/ProcessPriorityManager.h"
|
2012-08-31 18:34:28 +04:00
|
|
|
#include "nsPermissionManager.h"
|
2012-09-28 01:37:28 +04:00
|
|
|
#include "nsCookieService.h"
|
2012-10-03 04:39:09 +04:00
|
|
|
#include "nsApplicationCacheService.h"
|
2016-10-12 10:26:02 +03:00
|
|
|
#include "mozilla/dom/CustomElementRegistry.h"
|
2014-03-18 08:48:22 +04:00
|
|
|
#include "mozilla/EventDispatcher.h"
|
2014-03-08 05:20:07 +04:00
|
|
|
#include "mozilla/IMEStateManager.h"
|
2013-06-11 19:23:13 +04:00
|
|
|
#include "mozilla/dom/HTMLVideoElement.h"
|
2015-02-25 06:20:00 +03:00
|
|
|
#include "TouchManager.h"
|
2017-12-04 02:52:51 +03:00
|
|
|
#include "DecoderDoctorLogger.h"
|
2017-11-08 10:34:19 +03:00
|
|
|
#include "MediaDecoder.h"
|
2016-05-09 07:59:02 +03:00
|
|
|
#include "MediaPrefs.h"
|
2016-05-05 01:34:21 +03:00
|
|
|
#include "mozilla/ServoBindings.h"
|
2016-03-31 22:47:20 +03:00
|
|
|
#include "mozilla/StaticPresData.h"
|
2017-07-18 03:54:32 +03:00
|
|
|
#include "mozilla/StylePrefs.h"
|
2016-05-09 18:08:31 +03:00
|
|
|
#include "mozilla/dom/WebIDLGlobalNameHash.h"
|
2017-04-24 13:09:40 +03:00
|
|
|
#include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
|
2017-05-05 03:48:34 +03:00
|
|
|
#include "mozilla/dom/U2FTokenManager.h"
|
2017-09-06 10:47:49 +03:00
|
|
|
#include "mozilla/dom/PointerEventHandler.h"
|
2017-11-29 11:40:16 +03:00
|
|
|
#include "nsHostObjectProtocolHandler.h"
|
2018-01-28 10:41:36 +03:00
|
|
|
#include "nsThreadManager.h"
|
2011-05-04 15:29:56 +04:00
|
|
|
|
2011-03-24 06:13:56 +03:00
|
|
|
using namespace mozilla;
|
2013-09-20 13:11:25 +04:00
|
|
|
using namespace mozilla::net;
|
2011-12-20 16:07:16 +04:00
|
|
|
using namespace mozilla::dom;
|
2012-08-05 09:09:39 +04:00
|
|
|
using namespace mozilla::dom::ipc;
|
2011-03-24 06:13:56 +03:00
|
|
|
|
2010-04-19 19:41:39 +04:00
|
|
|
nsrefcnt nsLayoutStatics::sLayoutStaticRefcnt = 0;
|
2006-05-19 13:31:57 +04:00
|
|
|
|
|
|
|
nsresult
|
|
|
|
nsLayoutStatics::Initialize()
|
|
|
|
{
|
|
|
|
NS_ASSERTION(sLayoutStaticRefcnt == 0,
|
|
|
|
"nsLayoutStatics isn't zero!");
|
|
|
|
|
|
|
|
sLayoutStaticRefcnt = 1;
|
|
|
|
NS_LOG_ADDREF(&sLayoutStaticRefcnt, sLayoutStaticRefcnt,
|
2006-07-21 01:32:22 +04:00
|
|
|
"nsLayoutStatics", 1);
|
2006-05-19 13:31:57 +04:00
|
|
|
|
|
|
|
nsresult rv;
|
|
|
|
|
2012-08-16 05:46:03 +04:00
|
|
|
ContentParent::StartUp();
|
|
|
|
|
2007-04-02 21:17:36 +04:00
|
|
|
// Register all of our atoms once
|
|
|
|
nsCSSAnonBoxes::AddRefAtoms();
|
|
|
|
nsCSSPseudoClasses::AddRefAtoms();
|
|
|
|
nsCSSPseudoElements::AddRefAtoms();
|
|
|
|
nsCSSKeywords::AddRefTable();
|
|
|
|
nsCSSProps::AddRefTable();
|
|
|
|
nsColorNames::AddRefTable();
|
|
|
|
nsGkAtoms::AddRefAtoms();
|
2017-01-26 23:43:39 +03:00
|
|
|
nsHTMLTags::RegisterAtoms();
|
2017-01-26 23:43:39 +03:00
|
|
|
nsRDFAtoms::RegisterAtoms();
|
2007-04-02 21:17:36 +04:00
|
|
|
|
2017-01-26 23:43:38 +03:00
|
|
|
NS_SealStaticAtomTable();
|
|
|
|
|
2013-08-20 03:24:29 +04:00
|
|
|
StartupJSEnvironment();
|
2009-09-10 05:22:03 +04:00
|
|
|
rv = nsRegion::InitStatic();
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
NS_ERROR("Could not initialize nsRegion");
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2017-11-09 23:44:10 +03:00
|
|
|
nsGlobalWindowInner::Init();
|
Bug 1416384 - Part 2e: Eliminate duplicate declarations, and get gecko building again, r=smaug
There are many helper methods and structs in nsGlobalWindow.cpp. Many of these
are used by only the inner or only the outer window, while some are used by
both. In the case of the items used by both, I extracted them into
nsGlobalWindow.cpp, which includes nsGlobalWindowInner.cpp and
nsGlobalWindowOuter.cpp as the compilation unit entry point.
In the case of items used by just one or the other, I removed them from the
other file, and deleted the bodies of functions which used them, replacing them,
with a MOZ_CRASH.
This gets gecko building again, so that we can make further incremental
improvements.
MozReview-Commit-ID: 8QnJ1PX6TAO
--HG--
extra : rebase_source : 0eac00ad757f825a22a1af95d0a01d6fa92d824d
2017-11-15 19:33:58 +03:00
|
|
|
nsGlobalWindowOuter::Init();
|
2011-12-20 16:07:16 +04:00
|
|
|
Navigator::Init();
|
2012-05-23 22:46:04 +04:00
|
|
|
nsXBLService::Init();
|
2011-08-31 18:54:39 +04:00
|
|
|
|
2006-05-19 13:31:57 +04:00
|
|
|
rv = nsContentUtils::Init();
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
NS_ERROR("Could not initialize nsContentUtils");
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
rv = nsAttrValue::Init();
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
NS_ERROR("Could not initialize nsAttrValue");
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
rv = nsTextFragment::Init();
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
NS_ERROR("Could not initialize nsTextFragment");
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2011-07-15 14:18:33 +04:00
|
|
|
nsCellMap::Init();
|
2007-02-13 19:23:19 +03:00
|
|
|
|
2017-10-03 07:27:45 +03:00
|
|
|
mozilla::SharedFontList::Initialize();
|
2016-03-31 22:47:20 +03:00
|
|
|
StaticPresData::Init();
|
2011-06-02 16:56:46 +04:00
|
|
|
nsCSSRendering::Init();
|
2007-03-14 22:48:51 +03:00
|
|
|
|
2008-11-08 02:00:26 +03:00
|
|
|
rv = nsHTMLDNSPrefetch::Initialize();
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
NS_ERROR("Could not initialize HTML DNS prefetch");
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2006-05-19 13:31:57 +04:00
|
|
|
#ifdef MOZ_XUL
|
|
|
|
rv = nsXULContentUtils::Init();
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
NS_ERROR("Could not initialize nsXULContentUtils");
|
|
|
|
return rv;
|
|
|
|
}
|
2007-07-18 09:35:23 +04:00
|
|
|
|
2006-05-19 13:31:57 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
nsMathMLOperators::AddRefTable();
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
nsFrame::DisplayReflowStartup();
|
|
|
|
#endif
|
2013-04-09 19:29:44 +04:00
|
|
|
Attr::Initialize();
|
2006-05-19 13:31:57 +04:00
|
|
|
|
2007-07-18 01:15:49 +04:00
|
|
|
rv = txMozillaXSLTProcessor::Startup();
|
2006-12-22 20:22:18 +03:00
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
NS_ERROR("Could not initialize txMozillaXSLTProcessor");
|
|
|
|
return rv;
|
2006-05-19 13:31:57 +04:00
|
|
|
}
|
|
|
|
|
2017-01-04 16:53:01 +03:00
|
|
|
rv = StorageObserver::Init();
|
2006-09-16 01:28:48 +04:00
|
|
|
if (NS_FAILED(rv)) {
|
2017-01-04 16:53:01 +03:00
|
|
|
NS_ERROR("Could not initialize StorageObserver");
|
2006-09-16 01:28:48 +04:00
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2007-05-11 00:21:12 +04:00
|
|
|
rv = nsCCUncollectableMarker::Init();
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
NS_ERROR("Could not initialize nsCCUncollectableMarker");
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2017-07-18 03:54:32 +03:00
|
|
|
StylePrefs::Init();
|
2008-10-21 11:15:03 +04:00
|
|
|
|
2007-07-24 04:04:36 +04:00
|
|
|
#ifdef MOZ_XUL
|
2007-07-04 19:49:38 +04:00
|
|
|
rv = nsXULPopupManager::Init();
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
NS_ERROR("Could not initialize nsXULPopupManager");
|
|
|
|
return rv;
|
|
|
|
}
|
2007-07-24 04:04:36 +04:00
|
|
|
#endif
|
2007-07-04 19:49:38 +04:00
|
|
|
|
Bug 178324, refactor focus by moving all focus handling into one place and simplifying it, add many tests, fixes many other bugs too numerous to mention in this small checkin comment, r=josh,smichaud,ere,dbaron,marco,neil,gavin,smaug,sr=smaug (CLOSED TREE)
2009-06-10 22:00:39 +04:00
|
|
|
rv = nsFocusManager::Init();
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
NS_ERROR("Could not initialize nsFocusManager");
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2013-01-28 22:22:37 +04:00
|
|
|
AsyncLatencyLogger::InitializeStatics();
|
2017-12-04 02:52:51 +03:00
|
|
|
DecoderDoctorLogger::Init();
|
2016-01-07 22:57:42 +03:00
|
|
|
MediaManager::StartupInit();
|
2014-08-25 17:26:09 +04:00
|
|
|
CubebUtils::InitLibrary();
|
2008-07-30 10:50:14 +04:00
|
|
|
|
2010-04-27 13:57:32 +04:00
|
|
|
nsContentSink::InitializeStatics();
|
2009-06-29 02:44:22 +04:00
|
|
|
nsHtml5Module::InitializeStatics();
|
2013-11-04 15:24:33 +04:00
|
|
|
mozilla::dom::FallbackEncoding::Initialize();
|
2011-11-24 06:48:23 +04:00
|
|
|
nsLayoutUtils::Initialize();
|
2017-09-06 10:47:49 +03:00
|
|
|
PointerEventHandler::InitializeStatics();
|
2015-02-25 06:20:00 +03:00
|
|
|
TouchManager::InitializeStatics();
|
2010-06-01 06:19:35 +04:00
|
|
|
|
2011-03-29 00:18:45 +04:00
|
|
|
nsCORSListenerProxy::Startup();
|
2009-05-21 03:07:18 +04:00
|
|
|
|
2012-02-24 06:43:33 +04:00
|
|
|
nsWindowMemoryReporter::Init();
|
2011-06-29 15:01:07 +04:00
|
|
|
|
2013-02-09 00:24:47 +04:00
|
|
|
SVGElementFactory::Init();
|
2012-05-17 08:05:04 +04:00
|
|
|
nsSVGUtils::Init();
|
|
|
|
|
2013-04-26 04:53:26 +04:00
|
|
|
ProcessPriorityManager::Init();
|
2012-08-05 09:09:39 +04:00
|
|
|
|
2015-10-13 05:27:42 +03:00
|
|
|
nsPermissionManager::ClearOriginDataObserverInit();
|
2012-09-29 04:03:00 +04:00
|
|
|
nsCookieService::AppClearDataObserverInit();
|
2012-10-03 04:39:09 +04:00
|
|
|
nsApplicationCacheService::AppClearDataObserverInit();
|
2012-08-31 18:34:28 +04:00
|
|
|
|
2013-06-11 19:23:13 +04:00
|
|
|
HTMLVideoElement::Init();
|
2017-02-03 01:26:39 +03:00
|
|
|
nsGenericHTMLFrameElement::InitStatics();
|
2013-06-11 19:23:13 +04:00
|
|
|
|
2014-02-18 21:07:27 +04:00
|
|
|
#ifdef MOZ_XUL
|
|
|
|
nsMenuBarListener::InitializeStatics();
|
|
|
|
#endif
|
|
|
|
|
2013-09-20 13:11:25 +04:00
|
|
|
CacheObserver::Init();
|
|
|
|
|
2014-07-16 09:13:28 +04:00
|
|
|
IMEStateManager::Init();
|
|
|
|
|
2015-02-11 14:53:00 +03:00
|
|
|
ServiceWorkerRegistrar::Initialize();
|
|
|
|
|
2015-03-05 04:48:45 +03:00
|
|
|
#ifdef DEBUG
|
2018-02-01 07:04:04 +03:00
|
|
|
#ifdef MOZ_OLD_STYLE
|
2017-07-17 21:42:04 +03:00
|
|
|
GeckoStyleContext::Initialize();
|
2018-02-01 07:04:04 +03:00
|
|
|
#endif
|
2015-09-03 23:59:00 +03:00
|
|
|
mozilla::LayerAnimationInfo::Initialize();
|
2015-03-05 04:48:45 +03:00
|
|
|
#endif
|
|
|
|
|
2017-11-08 10:34:19 +03:00
|
|
|
MediaDecoder::InitStatics();
|
|
|
|
|
2015-04-10 18:27:57 +03:00
|
|
|
PromiseDebugging::Init();
|
|
|
|
|
2015-09-11 17:01:20 +03:00
|
|
|
mozilla::dom::WebCryptoThreadPool::Initialize();
|
|
|
|
|
2017-01-08 22:12:55 +03:00
|
|
|
#ifdef MOZ_STYLO
|
2017-09-13 12:13:11 +03:00
|
|
|
if (XRE_IsParentProcess() || XRE_IsContentProcess()) {
|
|
|
|
InitializeServo();
|
|
|
|
}
|
2017-01-08 22:12:55 +03:00
|
|
|
#endif
|
2016-05-05 01:34:21 +03:00
|
|
|
|
2016-06-21 23:23:58 +03:00
|
|
|
#ifndef MOZ_WIDGET_ANDROID
|
|
|
|
// On Android, we instantiate it when constructing AndroidBridge.
|
|
|
|
MediaPrefs::GetSingleton();
|
|
|
|
#endif
|
|
|
|
|
2017-04-24 13:09:40 +03:00
|
|
|
// This must be initialized on the main-thread.
|
|
|
|
mozilla::dom::IPCBlobInputStreamStorage::Initialize();
|
|
|
|
|
2017-05-05 03:48:34 +03:00
|
|
|
mozilla::dom::U2FTokenManager::Initialize();
|
2018-01-08 16:05:07 +03:00
|
|
|
|
|
|
|
if (XRE_IsParentProcess()) {
|
|
|
|
// On content process we initialize DOMPrefs when PContentChild is fully
|
|
|
|
// initialized.
|
|
|
|
mozilla::dom::DOMPrefs::Initialize();
|
|
|
|
}
|
|
|
|
|
2018-01-28 10:41:36 +03:00
|
|
|
nsThreadManager::InitializeShutdownObserver();
|
|
|
|
|
2006-05-19 13:31:57 +04:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
nsLayoutStatics::Shutdown()
|
|
|
|
{
|
2012-02-24 06:43:33 +04:00
|
|
|
// Don't need to shutdown nsWindowMemoryReporter, that will be done by the
|
|
|
|
// memory reporter manager.
|
2011-06-29 15:01:07 +04:00
|
|
|
|
2017-01-08 22:12:55 +03:00
|
|
|
#ifdef MOZ_STYLO
|
2017-09-13 12:13:11 +03:00
|
|
|
if (XRE_IsParentProcess() || XRE_IsContentProcess()) {
|
|
|
|
ShutdownServo();
|
|
|
|
URLExtraData::ReleaseDummy();
|
|
|
|
}
|
2017-01-08 22:12:55 +03:00
|
|
|
#endif
|
|
|
|
|
2015-02-20 04:10:44 +03:00
|
|
|
nsMessageManagerScriptExecutor::Shutdown();
|
Bug 178324, refactor focus by moving all focus handling into one place and simplifying it, add many tests, fixes many other bugs too numerous to mention in this small checkin comment, r=josh,smichaud,ere,dbaron,marco,neil,gavin,smaug,sr=smaug (CLOSED TREE)
2009-06-10 22:00:39 +04:00
|
|
|
nsFocusManager::Shutdown();
|
2007-07-24 04:04:36 +04:00
|
|
|
#ifdef MOZ_XUL
|
2007-07-04 19:49:38 +04:00
|
|
|
nsXULPopupManager::Shutdown();
|
2007-07-24 04:04:36 +04:00
|
|
|
#endif
|
2017-01-04 16:53:01 +03:00
|
|
|
StorageObserver::Shutdown();
|
2006-12-22 20:22:18 +03:00
|
|
|
txMozillaXSLTProcessor::Shutdown();
|
2013-04-09 19:29:44 +04:00
|
|
|
Attr::Shutdown();
|
2014-03-17 10:56:53 +04:00
|
|
|
EventListenerManager::Shutdown();
|
2014-03-08 05:20:07 +04:00
|
|
|
IMEStateManager::Shutdown();
|
2018-02-01 07:04:04 +03:00
|
|
|
#ifdef MOZ_OLD_STYLE
|
2010-03-02 23:59:32 +03:00
|
|
|
nsCSSParser::Shutdown();
|
2018-02-01 07:04:04 +03:00
|
|
|
#endif
|
2017-11-17 10:35:26 +03:00
|
|
|
nsMediaFeatures::Shutdown();
|
2008-11-08 02:00:26 +03:00
|
|
|
nsHTMLDNSPrefetch::Shutdown();
|
2007-03-14 22:48:51 +03:00
|
|
|
nsCSSRendering::Shutdown();
|
2016-03-31 22:47:20 +03:00
|
|
|
StaticPresData::Shutdown();
|
2006-05-19 13:31:57 +04:00
|
|
|
#ifdef DEBUG
|
|
|
|
nsFrame::DisplayReflowShutdown();
|
|
|
|
#endif
|
2007-02-13 19:23:19 +03:00
|
|
|
nsCellMap::Shutdown();
|
2013-09-04 15:30:57 +04:00
|
|
|
ActiveLayerTracker::Shutdown();
|
2006-05-19 13:31:57 +04:00
|
|
|
|
|
|
|
// Release all of our atoms
|
|
|
|
nsColorNames::ReleaseTable();
|
|
|
|
nsCSSProps::ReleaseTable();
|
|
|
|
nsCSSKeywords::ReleaseTable();
|
|
|
|
nsRepeatService::Shutdown();
|
|
|
|
nsStackLayout::Shutdown();
|
|
|
|
nsBox::Shutdown();
|
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
nsXULContentUtils::Finish();
|
2007-03-12 08:53:33 +03:00
|
|
|
nsXULPrototypeCache::ReleaseGlobals();
|
2006-05-19 13:31:57 +04:00
|
|
|
nsSprocketLayout::Shutdown();
|
|
|
|
#endif
|
|
|
|
|
2013-02-09 00:24:47 +04:00
|
|
|
SVGElementFactory::Shutdown();
|
2006-05-19 13:31:57 +04:00
|
|
|
nsMathMLOperators::ReleaseTable();
|
|
|
|
|
2009-01-05 03:39:54 +03:00
|
|
|
nsFloatManager::Shutdown();
|
2006-05-19 13:31:57 +04:00
|
|
|
nsImageFrame::ReleaseGlobals();
|
|
|
|
|
2012-11-15 20:36:15 +04:00
|
|
|
mozilla::css::ErrorReporter::ReleaseGlobals();
|
2006-05-19 13:31:57 +04:00
|
|
|
|
|
|
|
nsTextFragment::Shutdown();
|
|
|
|
|
|
|
|
nsAttrValue::Shutdown();
|
|
|
|
nsContentUtils::Shutdown();
|
|
|
|
nsLayoutStylesheetCache::Shutdown();
|
2018-02-01 07:04:04 +03:00
|
|
|
#ifdef MOZ_OLD_STYLE
|
2015-06-26 06:52:47 +03:00
|
|
|
RuleProcessorCache::Shutdown();
|
2018-02-01 07:04:04 +03:00
|
|
|
#endif
|
2006-05-19 13:31:57 +04:00
|
|
|
|
2013-08-20 03:24:29 +04:00
|
|
|
ShutdownJSEnvironment();
|
2017-11-09 23:44:10 +03:00
|
|
|
nsGlobalWindowInner::ShutDown();
|
Bug 1416384 - Part 2e: Eliminate duplicate declarations, and get gecko building again, r=smaug
There are many helper methods and structs in nsGlobalWindow.cpp. Many of these
are used by only the inner or only the outer window, while some are used by
both. In the case of the items used by both, I extracted them into
nsGlobalWindow.cpp, which includes nsGlobalWindowInner.cpp and
nsGlobalWindowOuter.cpp as the compilation unit entry point.
In the case of items used by just one or the other, I removed them from the
other file, and deleted the bodies of functions which used them, replacing them,
with a MOZ_CRASH.
This gets gecko building again, so that we can make further incremental
improvements.
MozReview-Commit-ID: 8QnJ1PX6TAO
--HG--
extra : rebase_source : 0eac00ad757f825a22a1af95d0a01d6fa92d824d
2017-11-15 19:33:58 +03:00
|
|
|
nsGlobalWindowOuter::ShutDown();
|
2006-05-19 13:31:57 +04:00
|
|
|
nsDOMClassInfo::ShutDown();
|
2016-05-09 18:08:31 +03:00
|
|
|
WebIDLGlobalNameHash::Shutdown();
|
2009-08-09 02:00:26 +04:00
|
|
|
nsListControlFrame::Shutdown();
|
2012-05-23 22:46:04 +04:00
|
|
|
nsXBLService::Shutdown();
|
2006-05-19 13:31:57 +04:00
|
|
|
nsAutoCopyListener::Shutdown();
|
2012-06-26 06:43:30 +04:00
|
|
|
FrameLayerBuilder::Shutdown();
|
2016-09-21 12:25:33 +03:00
|
|
|
|
2014-08-25 17:26:09 +04:00
|
|
|
CubebUtils::ShutdownLibrary();
|
2013-09-25 06:10:24 +04:00
|
|
|
AsyncLatencyLogger::ShutdownLogger();
|
2013-08-09 02:07:42 +04:00
|
|
|
WebAudioUtils::Shutdown();
|
2008-10-01 10:17:15 +04:00
|
|
|
|
2011-03-29 00:18:45 +04:00
|
|
|
nsCORSListenerProxy::Shutdown();
|
2012-12-18 12:49:58 +04:00
|
|
|
|
2017-09-06 10:47:49 +03:00
|
|
|
PointerEventHandler::ReleaseStatics();
|
2010-06-01 06:19:35 +04:00
|
|
|
|
2015-02-25 06:20:00 +03:00
|
|
|
TouchManager::ReleaseStatics();
|
|
|
|
|
2011-07-29 15:48:04 +04:00
|
|
|
nsTreeSanitizer::ReleaseStatics();
|
|
|
|
|
2009-06-29 02:44:22 +04:00
|
|
|
nsHtml5Module::ReleaseStatics();
|
2009-06-16 13:15:46 +04:00
|
|
|
|
2013-11-04 15:24:33 +04:00
|
|
|
mozilla::dom::FallbackEncoding::Shutdown();
|
|
|
|
|
2009-09-10 05:22:03 +04:00
|
|
|
nsRegion::ShutdownStatic();
|
|
|
|
|
2014-03-18 08:48:22 +04:00
|
|
|
mozilla::EventDispatcher::Shutdown();
|
2013-08-27 13:01:37 +04:00
|
|
|
|
2013-03-28 23:41:32 +04:00
|
|
|
HTMLInputElement::DestroyUploadLastDir();
|
2011-01-13 20:45:14 +03:00
|
|
|
|
|
|
|
nsLayoutUtils::Shutdown();
|
2017-10-03 07:27:45 +03:00
|
|
|
mozilla::SharedFontList::Shutdown();
|
2011-05-04 15:29:56 +04:00
|
|
|
|
|
|
|
nsHyphenationManager::Shutdown();
|
2012-03-31 20:30:13 +04:00
|
|
|
nsDOMMutationObserver::Shutdown();
|
2012-08-16 05:46:03 +04:00
|
|
|
|
2016-11-22 02:58:37 +03:00
|
|
|
DateTimeFormat::Shutdown();
|
|
|
|
|
2012-08-16 05:46:03 +04:00
|
|
|
ContentParent::ShutDown();
|
2012-12-12 02:15:32 +04:00
|
|
|
|
2013-03-06 15:08:11 +04:00
|
|
|
DisplayItemClip::Shutdown();
|
|
|
|
|
2013-09-20 13:11:25 +04:00
|
|
|
CacheObserver::Shutdown();
|
2014-06-19 17:20:49 +04:00
|
|
|
|
2015-04-10 18:27:57 +03:00
|
|
|
PromiseDebugging::Shutdown();
|
2017-11-29 11:40:16 +03:00
|
|
|
|
|
|
|
nsHostObjectProtocolHandler::RemoveDataEntries();
|
2006-05-19 13:31:57 +04:00
|
|
|
}
|