Bug 1674637 - Use nested namespaces in dom/ r=sg,andi

Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
This commit is contained in:
Sylvestre Ledru 2020-11-04 17:04:01 +00:00
parent 31599d2440
commit fde06f6d21
686 changed files with 1399 additions and 2897 deletions

View File

@ -9,8 +9,7 @@
#include "mozilla/dom/AbortControllerBinding.h"
#include "mozilla/dom/WorkerPrivate.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(AbortController, mGlobal, mSignal)
@ -65,5 +64,4 @@ void AbortController::Abort() {
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -10,8 +10,7 @@
#include "mozilla/dom/AbortSignalBinding.h"
#include "mozilla/RefPtr.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
// AbortSignalImpl
// ----------------------------------------------------------------------------
@ -141,5 +140,4 @@ bool AbortFollower::IsFollowing() const { return !!mFollowingSignal; }
"mFollowingSignal", 0);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -28,8 +28,7 @@
#include "nsTransitionManager.h" // For CSSTransition
#include "PendingAnimationTracker.h" // For PendingAnimationTracker
namespace mozilla {
namespace dom {
namespace mozilla::dom {
// Static members
uint64_t Animation::sNextAnimationIndex = 0;
@ -1857,5 +1856,4 @@ bool Animation::IsRunningOnCompositor() const {
mEffect->AsKeyframeEffect()->IsRunningOnCompositor();
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -14,8 +14,7 @@
#include "mozilla/FloatingPoint.h"
#include "nsDOMMutationObserver.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_CLASS(AnimationEffect)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(AnimationEffect)
@ -340,5 +339,4 @@ Nullable<TimeDuration> AnimationEffect::GetLocalTime() const {
return result;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -8,8 +8,7 @@
#include "mozilla/AnimationComparator.h"
#include "mozilla/dom/Animation.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
AnimationTimeline::~AnimationTimeline() { mAnimationOrder.clear(); }
@ -52,5 +51,4 @@ void AnimationTimeline::RemoveAnimation(Animation* aAnimation) {
mAnimations.RemoveEntry(aAnimation);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -12,8 +12,7 @@
#include "mozilla/TimeStamp.h"
#include "nsPresContext.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
using AnimationPhase = ComputedTiming::AnimationPhase;
@ -363,5 +362,4 @@ void CSSAnimationKeyframeEffect::MaybeFlushUnanimatedStyle() const {
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -10,8 +10,7 @@
#include "mozilla/dom/KeyframeEffectBinding.h"
#include "mozilla/AnimationComparator.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CSSPseudoElement, mOriginatingElement)
@ -93,5 +92,4 @@ nsAtom* CSSPseudoElement::GetCSSPseudoElementPropertyAtom(
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -13,8 +13,7 @@
#include "mozilla/TimeStamp.h"
#include "nsPresContext.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
JSObject* CSSTransition::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
@ -334,5 +333,4 @@ void CSSTransition::SetEffectFromStyle(dom::AnimationEffect* aEffect) {
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -15,8 +15,7 @@
#include "nsPresContext.h"
#include "nsRefreshDriver.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_CLASS(DocumentTimeline)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(DocumentTimeline,
@ -288,5 +287,4 @@ void DocumentTimeline::UnregisterFromRefreshDriver() {
DisconnectRefreshDriver(refreshDriver);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -82,8 +82,7 @@ class AudioPlaybackRunnable final : public Runnable {
} // anonymous namespace
namespace mozilla {
namespace dom {
namespace mozilla::dom {
const char* SuspendTypeToStr(const nsSuspendedTypes& aSuspend) {
MOZ_ASSERT(aSuspend == nsISuspendedTypes::NONE_SUSPENDED ||
@ -623,5 +622,4 @@ void AudioChannelService::AudioChannelWindow::MaybeNotifyMediaBlockStart(
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -18,8 +18,7 @@
#include "nsRange.h"
#include "nsTArray.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
template nsresult AbstractRange::SetStartAndEndInternal(
const RangeBoundary& aStartBoundary, const RangeBoundary& aEndBoundary,
@ -208,5 +207,4 @@ JSObject* AbstractRange::WrapObject(JSContext* aCx,
MOZ_CRASH("Must be overridden");
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -16,8 +16,7 @@
#include "nsStyledElement.h"
#include "HTMLCanvasElement.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
// Ref counting and cycle collection
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(AnonymousContent, AddRef)
@ -219,5 +218,4 @@ void AnonymousContent::SetStyle(const nsACString& aProperty,
declaration->SetProperty(aProperty, aValue, u""_ns, IgnoreErrors());
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -27,8 +27,7 @@
#include "nsWrapperCacheInlines.h"
#include "NodeUbiReporting.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
//----------------------------------------------------------------------
bool Attr::sInitialized;
@ -222,5 +221,4 @@ void Attr::ConstructUbiNode(void* storage) {
JS::ubi::Concrete<Attr>::construct(storage, this);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -11,8 +11,7 @@
#include "nsGlobalWindow.h"
#include "nsIWebBrowserChrome.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
//
// Basic (virtual) BarProp class implementation
@ -205,5 +204,4 @@ void ScrollbarsProp::SetVisible(bool aVisible, CallerType, ErrorResult&) {
/* Do nothing */
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -9,8 +9,7 @@
#include "mozilla/StaticPrefs_browser.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
bool BindContext::AllowsAutoFocus() const {
if (!StaticPrefs::browser_autofocus()) {
@ -45,5 +44,4 @@ bool BindContext::IsSameOriginAsTop() const {
return NS_SUCCEEDED(nsContentUtils::CheckSameOrigin(topLevelDocument, &mDoc));
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -31,8 +31,7 @@
# undef CreateFile
#endif
namespace mozilla {
namespace dom {
namespace mozilla::dom {
namespace {
@ -811,5 +810,4 @@ void BodyConsumer::RunAbortAlgorithm() {
NS_IMPL_ISUPPORTS(BodyConsumer, nsIObserver, nsISupportsWeakReference)
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -18,8 +18,7 @@
static NS_DEFINE_CID(kStreamTransportServiceCID, NS_STREAMTRANSPORTSERVICE_CID);
namespace mozilla {
namespace dom {
namespace mozilla::dom {
// BodyStreamHolder
// ---------------------------------------------------------------------------
@ -573,5 +572,4 @@ BodyStream::Observe(nsISupports* aSubject, const char* aTopic,
return NS_OK;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -29,8 +29,7 @@
#include "mozilla/dom/Promise.h"
#include "mozilla/dom/URLSearchParams.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
namespace {
@ -499,5 +498,4 @@ void BodyUtil::ConsumeJson(JSContext* aCx, JS::MutableHandle<JS::Value> aValue,
aValue.set(json);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -6,8 +6,7 @@
#include "mozilla/dom/BorrowedAttrInfo.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
BorrowedAttrInfo::BorrowedAttrInfo(const nsAttrName* aName,
const nsAttrValue* aValue)
@ -20,5 +19,4 @@ BorrowedAttrInfo::BorrowedAttrInfo(const BorrowedAttrInfo& aOther)
MOZ_ASSERT_IF(mName, mValue);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -7,47 +7,52 @@
#include "mozilla/MainThreadIdlePeriod.h"
#include "nsCycleCollector.h"
static const TimeDuration kOneMinute = TimeDuration::FromSeconds(60.0f);
static const mozilla::TimeDuration kOneMinute =
mozilla::TimeDuration::FromSeconds(60.0f);
// The amount of time we wait between a request to CC (after GC ran)
// and doing the actual CC.
static const TimeDuration kCCDelay = TimeDuration::FromSeconds(6);
static const mozilla::TimeDuration kCCDelay =
mozilla::TimeDuration::FromSeconds(6);
static const TimeDuration kCCSkippableDelay =
TimeDuration::FromMilliseconds(250);
static const mozilla::TimeDuration kCCSkippableDelay =
mozilla::TimeDuration::FromMilliseconds(250);
// In case the cycle collector isn't run at all, we don't want forget skippables
// to run too often. So limit the forget skippable cycle to start at earliest 2
// seconds after the end of the previous cycle.
static const TimeDuration kTimeBetweenForgetSkippableCycles =
TimeDuration::FromSeconds(2);
static const mozilla::TimeDuration kTimeBetweenForgetSkippableCycles =
mozilla::TimeDuration::FromSeconds(2);
// ForgetSkippable is usually fast, so we can use small budgets.
// This isn't a real budget but a hint to IdleTaskRunner whether there
// is enough time to call ForgetSkippable.
static const TimeDuration kForgetSkippableSliceDuration =
TimeDuration::FromMilliseconds(2);
static const mozilla::TimeDuration kForgetSkippableSliceDuration =
mozilla::TimeDuration::FromMilliseconds(2);
// Maximum amount of time that should elapse between incremental CC slices
static const TimeDuration kICCIntersliceDelay =
TimeDuration::FromMilliseconds(64);
static const mozilla::TimeDuration kICCIntersliceDelay =
mozilla::TimeDuration::FromMilliseconds(64);
// Time budget for an incremental CC slice when using timer to run it.
static const TimeDuration kICCSliceBudget = TimeDuration::FromMilliseconds(3);
static const mozilla::TimeDuration kICCSliceBudget =
mozilla::TimeDuration::FromMilliseconds(3);
// Minimum budget for an incremental CC slice when using idle time to run it.
static const TimeDuration kIdleICCSliceBudget =
TimeDuration::FromMilliseconds(2);
static const mozilla::TimeDuration kIdleICCSliceBudget =
mozilla::TimeDuration::FromMilliseconds(2);
// Maximum total duration for an ICC
static const TimeDuration kMaxICCDuration = TimeDuration::FromSeconds(2);
static const mozilla::TimeDuration kMaxICCDuration =
mozilla::TimeDuration::FromSeconds(2);
// Force a CC after this long if there's more than NS_CC_FORCED_PURPLE_LIMIT
// objects in the purple buffer.
static const TimeDuration kCCForced = kOneMinute * 2;
static const mozilla::TimeDuration kCCForced = kOneMinute * 2;
static const uint32_t kCCForcedPurpleLimit = 10;
// Don't allow an incremental GC to lock out the CC for too long.
static const TimeDuration kMaxCCLockedoutTime = TimeDuration::FromSeconds(30);
static const mozilla::TimeDuration kMaxCCLockedoutTime =
mozilla::TimeDuration::FromSeconds(30);
// Trigger a CC if the purple buffer exceeds this size when we check it.
static const uint32_t kCCPurpleLimit = 200;

View File

@ -41,8 +41,7 @@
# include "nsAccessibilityService.h"
#endif
namespace mozilla {
namespace dom {
namespace mozilla::dom {
CharacterData::CharacterData(already_AddRefed<dom::NodeInfo>&& aNodeInfo)
: nsIContent(std::move(aNodeInfo)) {
@ -586,5 +585,4 @@ void CharacterData::AddSizeOfExcludingThis(nsWindowSizes& aSizes,
*aNodeSize += mText.SizeOfExcludingThis(aSizes.mState.mMallocSizeOf);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -14,8 +14,7 @@
#include "nsCSSAnonBoxes.h"
#include "nsLayoutUtils.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
ExplicitChildIterator::ExplicitChildIterator(const nsIContent* aParent,
bool aStartAtBeginning)
@ -371,5 +370,4 @@ nsIContent* AllChildrenIterator::GetPreviousChild() {
return nullptr;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -9,8 +9,7 @@
#include "mozilla/HoldDropJSObjects.h"
#include "mozilla/dom/MessageManagerBinding.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
JSObject* ChromeMessageBroadcaster::WrapObject(
JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
@ -19,5 +18,4 @@ JSObject* ChromeMessageBroadcaster::WrapObject(
return ChromeMessageBroadcaster_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -7,8 +7,7 @@
#include "mozilla/dom/ChromeMessageSender.h"
#include "mozilla/dom/MessageManagerBinding.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
JSObject* ChromeMessageSender::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
@ -17,5 +16,4 @@ JSObject* ChromeMessageSender::WrapObject(JSContext* aCx,
return ChromeMessageSender_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -56,8 +56,7 @@
#endif
#include "nsIException.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/* static */
void ChromeUtils::NondeterministicGetWeakMapKeys(
@ -1364,5 +1363,4 @@ void ChromeUtils::GetAllDOMProcesses(
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -16,8 +16,7 @@
using namespace mozilla;
using namespace dom;
namespace mozilla {
namespace dom {
namespace mozilla::dom {
Comment::~Comment() = default;
@ -67,5 +66,4 @@ JSObject* Comment::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
return Comment_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -17,8 +17,7 @@
using mozilla::dom::ContentChild;
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Crypto)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
@ -100,5 +99,4 @@ SubtleCrypto* Crypto::Subtle() {
return mSubtle;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -26,8 +26,7 @@
#include "xpcprivate.h"
#include "nsGlobalWindow.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
//-----------------------------------------------------
// CustomElementUpgradeReaction
@ -1505,5 +1504,4 @@ CustomElementDefinition::CustomElementDefinition(
mDisableInternals(aDisableInternals),
mDisableShadow(aDisableShadow) {}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -137,8 +137,7 @@ nsresult NS_GetNameAndMessageForDOMNSResult(nsresult aNSResult,
return NS_ERROR_NOT_AVAILABLE;
}
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Exception)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
@ -406,5 +405,4 @@ already_AddRefed<DOMException> DOMException::Create(
return inst.forget();
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -13,8 +13,7 @@
#include "mozilla/dom/DocumentType.h"
#include "nsTextNode.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
// QueryInterface implementation for DOMImplementation
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMImplementation)
@ -187,5 +186,4 @@ already_AddRefed<Document> DOMImplementation::CreateHTMLDocument(
return document.forget();
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -21,8 +21,7 @@
#include "mozilla/dom/HTMLImageElement.h"
#include "Units.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMIntersectionObserverEntry)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
@ -738,5 +737,4 @@ void DOMIntersectionObserver::Notify() {
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -22,8 +22,7 @@
#include "js/Conversions.h" // JS::NumberToString
#include "js/Equality.h" // JS::SameValueZero
namespace mozilla {
namespace dom {
namespace mozilla::dom {
template <typename T>
static void SetDataInMatrix(DOMMatrixReadOnly* aMatrix, const T* aData,
@ -1021,5 +1020,4 @@ JSObject* DOMMatrix::WrapObject(JSContext* aCx,
return DOMMatrix_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -8,8 +8,7 @@
#include "mozilla/dom/DOMStringListBinding.h"
#include "nsContentUtils.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(DOMStringList)
@ -27,5 +26,4 @@ JSObject* DOMStringList::WrapObject(JSContext* aCx,
return DOMStringList_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -118,8 +118,7 @@ NS_IMETHODIMP LabellingEventTarget::HaveDirectTasks(bool* aValue) {
NS_IMPL_ISUPPORTS(LabellingEventTarget, nsIEventTarget, nsISerialEventTarget,
nsIDirectTaskDispatcher)
namespace mozilla {
namespace dom {
namespace mozilla::dom {
AutoTArray<RefPtr<DocGroup>, 2>* DocGroup::sPendingDocGroups = nullptr;
@ -400,5 +399,4 @@ bool DocGroup::IsActive() const {
return false;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -9477,8 +9477,7 @@ void nsDOMAttributeMap::BlastSubtreeToPieces(nsINode* aNode) {
}
}
namespace mozilla {
namespace dom {
namespace mozilla::dom {
nsINode* Document::AdoptNode(nsINode& aAdoptedNode, ErrorResult& rv) {
nsINode* adoptedNode = &aAdoptedNode;
@ -17112,5 +17111,4 @@ void Document::DisableChildElementInPictureInPictureMode() {
MOZ_ASSERT(mPictureInPictureChildElementCount >= 0);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -21,8 +21,7 @@
#include "mozilla/dom/Document.h"
#include "mozilla/IntegerPrintfMacros.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
JSObject* DocumentFragment::WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
@ -122,5 +121,4 @@ NS_IMPL_RELEASE_INHERITED(DocumentFragment, FragmentOrElement)
NS_IMPL_ELEMENT_CLONE(DocumentFragment)
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -21,8 +21,7 @@
#include "nsLayoutUtils.h"
#include "nsWindowSizes.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
DocumentOrShadowRoot::DocumentOrShadowRoot(ShadowRoot* aShadowRoot)
: mAsNode(aShadowRoot), mKind(Kind::ShadowRoot) {
@ -848,5 +847,4 @@ void DocumentOrShadowRoot::Unlink(DocumentOrShadowRoot* tmp) {
tmp->mRadioGroups.Clear();
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -33,8 +33,7 @@ already_AddRefed<mozilla::dom::DocumentType> NS_NewDOMDocumentType(
return docType.forget();
}
namespace mozilla {
namespace dom {
namespace mozilla::dom {
JSObject* DocumentType::WrapNode(JSContext* cx,
JS::Handle<JSObject*> aGivenProto) {
@ -80,5 +79,4 @@ already_AddRefed<CharacterData> DocumentType::CloneDataNode(
do_AddRef(aNodeInfo), mPublicId, mSystemId, mInternalSubset));
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -168,8 +168,7 @@
using mozilla::gfx::Matrix4x4;
namespace mozilla {
namespace dom {
namespace mozilla::dom {
// Verify sizes of nodes. We use a template rather than a direct static
// assert so that the error message actually displays the sizes.
@ -209,8 +208,7 @@ ASSERT_NODE_SIZE(Text, 120, 64);
#undef ASSERT_NODE_SIZE
#undef EXTRA_DOM_NODE_BYTES
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
nsAtom* nsIContent::DoGetID() const {
MOZ_ASSERT(HasID(), "Unexpected call");
@ -233,8 +231,7 @@ nsIFrame* nsIContent::GetPrimaryFrame(mozilla::FlushType aType) {
return GetPrimaryFrame();
}
namespace mozilla {
namespace dom {
namespace mozilla::dom {
const nsAttrValue* Element::GetSVGAnimatedClass() const {
MOZ_ASSERT(MayHaveClass() && IsSVGElement(), "Unexpected call");
@ -293,8 +290,7 @@ void Element::UpdateState(bool aNotify) {
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
void nsIContent::UpdateEditableState(bool aNotify) {
if (IsInNativeAnonymousSubtree()) {
@ -319,8 +315,7 @@ void nsIContent::UpdateEditableState(bool aNotify) {
SetEditableFlag(parent && parent->HasFlag(NODE_IS_EDITABLE));
}
namespace mozilla {
namespace dom {
namespace mozilla::dom {
void Element::UpdateEditableState(bool aNotify) {
nsIContent::UpdateEditableState(aNotify);
@ -4358,5 +4353,4 @@ nsAtom* Element::GetEventNameForAttr(nsAtom* aAttr) {
return aAttr;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -49,8 +49,7 @@
#include "mozilla/Encoding.h"
#include "ReferrerInfo.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
static LazyLogModule gEventSourceLog("EventSource");
@ -2050,5 +2049,4 @@ NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(EventSource, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(EventSource, DOMEventTargetHelper)
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -13,8 +13,7 @@
#include "nsThreadUtils.h"
#include "mozilla/Services.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
namespace {
@ -314,5 +313,4 @@ void EventSourceEventService::GetListeners(
aListeners.AppendElements(listener->mListeners);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -13,8 +13,7 @@
#include "mozilla/dom/HTMLElementBinding.h"
#include "mozilla/dom/NameSpaceConstants.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_ELEMENT_CLONE(GeneratedImageContent);
@ -36,5 +35,4 @@ JSObject* GeneratedImageContent::WrapNode(JSContext* aCx,
return dom::HTMLElement_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -16,8 +16,7 @@
#include "nsCycleCollectionParticipant.h"
#include "nsStringFwd.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
static Element* LookupElement(DocumentOrShadowRoot& aDocOrShadow,
const nsAString& aRef, bool aReferenceImage) {
@ -224,5 +223,4 @@ IDTracker::DocumentLoadNotification::Observe(nsISupports* aSubject,
return NS_OK;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -14,8 +14,7 @@
#include "nsDOMNavigationTiming.h"
#include "nsPIDOMWindow.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(IdleDeadline, mWindow, mGlobal)
NS_IMPL_CYCLE_COLLECTING_ADDREF(IdleDeadline)
@ -70,5 +69,4 @@ DOMHighResTimeStamp IdleDeadline::TimeRemaining() {
bool IdleDeadline::DidTimeout() const { return mDidTimeout; }
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -15,8 +15,7 @@
#include "nsGlobalWindow.h"
#include "nsPIDOMWindow.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
IdleRequest::IdleRequest(IdleRequestCallback* aCallback, uint32_t aHandle)
: mCallback(aCallback), mHandle(aHandle), mTimeoutHandle(Nothing()) {
@ -62,5 +61,4 @@ void IdleRequest::IdleRun(nsPIDOMWindowInner* aWindow,
callback->Call(*deadline, "requestIdleCallback handler");
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -23,8 +23,7 @@
using namespace mozilla::gfx;
namespace mozilla {
namespace dom {
namespace mozilla::dom {
// This class should be placed inside GetBRGADataSourceSurfaceSync(). However,
// due to B2G ICS uses old complier (C++98/03) which forbids local class as
@ -444,5 +443,4 @@ already_AddRefed<imgIEncoder> ImageEncoder::GetImageEncoder(nsAString& aType) {
return encoder.forget();
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -14,8 +14,7 @@
#include "mozilla/Preferences.h"
#include "nsXULAppAPI.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
ImageTracker::ImageTracker() : mLocking(false), mAnimating(true) {}
@ -165,5 +164,4 @@ void ImageTracker::MediaFeatureValuesChangedAllDocuments(
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -10,8 +10,7 @@
#include "mozIMozIntl.h"
#include "nsContentUtils.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(IntlUtils, mWindow)
NS_IMPL_CYCLE_COLLECTING_ADDREF(IntlUtils)
@ -130,5 +129,4 @@ void IntlUtils::GetLocaleInfo(const Sequence<nsString>& aLocales,
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -26,8 +26,7 @@
#include "nsAttrValueInlines.h"
#include "HTMLLinkElement.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
Link::Link(Element* aElement)
: mElement(aElement),
@ -587,5 +586,4 @@ size_t Link::SizeOfExcludingThis(mozilla::SizeOfState& aState) const {
return n;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -31,8 +31,7 @@
#include "nsStyleUtil.h"
#include "nsQueryObject.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
LinkStyle::SheetInfo::SheetInfo(
const Document& aDocument, nsIContent* aContent,
@ -321,5 +320,4 @@ Result<LinkStyle::Update, nsresult> LinkStyle::DoUpdateStyleSheet(
return resultOrError;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -34,8 +34,7 @@
#include "mozilla/dom/ScriptSettings.h"
#include "ReferrerInfo.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
Location::Location(nsPIDOMWindowInner* aWindow,
BrowsingContext* aBrowsingContext)
@ -635,5 +634,4 @@ JSObject* Location::WrapObject(JSContext* aCx,
return Location_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -18,8 +18,7 @@
#include "mozilla/dom/Document.h"
#include "mozilla/dom/WindowContext.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
already_AddRefed<nsDocShellLoadState> LocationBase::CheckURL(
nsIURI* aURI, nsIPrincipal& aSubjectPrincipal, ErrorResult& aRv) {
@ -247,5 +246,4 @@ nsIURI* LocationBase::GetSourceBaseURL() {
return doc ? doc->GetBaseURI() : nullptr;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -25,8 +25,7 @@ static bool IsLocation(JSObject* obj) {
}
#endif // DEBUG
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/* static */
bool MaybeCrossOriginObjectMixins::IsPlatformObjectSameOrigin(JSContext* cx,
@ -512,5 +511,4 @@ bool MaybeCrossOriginObject<Base>::hasInstance(JSContext* cx,
template class MaybeCrossOriginObject<js::Wrapper>;
template class MaybeCrossOriginObject<DOMProxyHandler>;
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -7,8 +7,7 @@
#include "mozilla/dom/MessageBroadcaster.h"
#include "mozilla/dom/ContentParent.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
MessageBroadcaster::MessageBroadcaster(MessageBroadcaster* aParentManager,
MessageManagerFlags aFlags)
@ -36,5 +35,4 @@ void MessageBroadcaster::RemoveChildManager(MessageListenerManager* aManager) {
mChildManagers.RemoveElement(aManager);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -7,8 +7,7 @@
#include "mozilla/dom/MessageListenerManager.h"
#include "mozilla/dom/MessageBroadcaster.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
MessageListenerManager::MessageListenerManager(
ipc::MessageManagerCallback* aCallback, MessageBroadcaster* aParentManager,
@ -46,5 +45,4 @@ void MessageListenerManager::ClearParentManager(bool aRemove) {
mParentManager = nullptr;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -16,8 +16,7 @@
# include <windows.h>
#endif
namespace mozilla {
namespace dom {
namespace mozilla::dom {
void MessageManagerGlobal::Dump(const nsAString& aStr) {
if (!nsJSUtils::DumpEnabled()) {
@ -47,5 +46,4 @@ void MessageManagerGlobal::Btoa(const nsAString& aBase64Data,
aError = nsContentUtils::Btoa(aBase64Data, aAsciiString);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -7,8 +7,7 @@
#include "mozilla/dom/MessageSender.h"
#include "mozilla/dom/MessageBroadcaster.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
void MessageSender::InitWithCallback(ipc::MessageManagerCallback* aCallback) {
if (mCallback) {
@ -29,5 +28,4 @@ void MessageSender::InitWithCallback(ipc::MessageManagerCallback* aCallback) {
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -14,8 +14,7 @@
#include "xpcpublic.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
constexpr size_t IID_SIZE = sizeof(nsIID);
@ -90,5 +89,4 @@ bool MozQueryInterface::WrapObject(JSContext* aCx,
return MozQueryInterface_Binding::Wrap(aCx, this, aGivenProto, aReflector);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -112,8 +112,7 @@
#include "mozilla/intl/LocaleService.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
static const nsLiteralCString kVibrationPermissionType = "vibration"_ns;
@ -2162,5 +2161,4 @@ bool Navigator::Webdriver() {
return Preferences::GetBool("marionette.enabled", false);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -19,8 +19,7 @@
#include "mozilla/dom/NodeFilterBinding.h"
#include "mozilla/dom/NodeIteratorBinding.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/*
* NodePointer implementation
@ -210,5 +209,4 @@ bool NodeIterator::WrapObject(JSContext* cx, JS::Handle<JSObject*> aGivenProto,
return NodeIterator_Binding::Wrap(cx, this, aGivenProto, aReflector);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -9,8 +9,7 @@
#include "mozilla/HoldDropJSObjects.h"
#include "mozilla/dom/MessageManagerBinding.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
ParentProcessMessageManager::ParentProcessMessageManager()
: MessageBroadcaster(nullptr, MessageManagerFlags::MM_CHROME |
@ -29,5 +28,4 @@ JSObject* ParentProcessMessageManager::WrapObject(
return ParentProcessMessageManager_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -8,8 +8,7 @@
#include "mozilla/HoldDropJSObjects.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_CLASS(PlacesEvent)
@ -40,5 +39,4 @@ JSObject* PlacesEvent::WrapObject(JSContext* aCx,
return PlacesEvent_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -10,8 +10,7 @@
#include "nsIWeakReferenceUtils.h"
#include "mozilla/ClearOnShutdown.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
template <class T>
struct Flagged {
@ -338,5 +337,4 @@ void PlacesObservers::NotifyListeners(
gCallingListeners = false;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -9,8 +9,7 @@
#include "mozilla/HoldDropJSObjects.h"
#include "mozilla/dom/ContentProcessMessageManager.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_WEAK_PTR(PlacesWeakCallbackWrapper,
mParent, mCallback)
@ -42,5 +41,4 @@ JSObject* PlacesWeakCallbackWrapper::WrapObject(
return PlacesWeakCallbackWrapper_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -15,8 +15,7 @@
#include "nsXULPopupManager.h"
#include "nsIPermissionManager.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
namespace {
@ -470,8 +469,7 @@ void PopupBlocker::UnregisterOpenPopupSpam() {
/* static */
uint32_t PopupBlocker::GetOpenPopupSpamCount() { return sOpenPopupSpamCount; }
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
AutoPopupStatePusherInternal::AutoPopupStatePusherInternal(
mozilla::dom::PopupBlocker::PopupControlState aState, bool aForce)

View File

@ -9,8 +9,7 @@
#include "mozilla/dom/TypedArray.h"
#include "mozilla/dom/Pose.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_CLASS(Pose)
@ -85,5 +84,4 @@ void Pose::SetFloat32Array(JSContext* aJSContext, nsWrapperCache* creator,
aRetVal.set(aObj);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -33,8 +33,7 @@
#include "nsPresContext.h"
#include "nsQueryObject.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
PostMessageEvent::PostMessageEvent(BrowsingContext* aSource,
const nsAString& aCallerOrigin,
@ -308,5 +307,4 @@ void PostMessageEvent::DispatchToTargetThread(ErrorResult& aError) {
aError = mTargetWindow->Dispatch(TaskCategory::Other, event.forget());
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -9,8 +9,7 @@
#include "mozilla/dom/MessageManagerBinding.h"
#include "nsContentUtils.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
ProcessMessageManager::ProcessMessageManager(
ipc::MessageManagerCallback* aCallback,
@ -40,5 +39,4 @@ JSObject* ProcessMessageManager::WrapObject(JSContext* aCx,
return ProcessMessageManager_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -11,8 +11,7 @@
#include "mozilla/dom/WindowBinding.h"
#include "xpcprivate.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/**
* RemoteOuterWindowProxy is the proxy handler for the WindowProxy objects for
@ -164,5 +163,4 @@ bool RemoteOuterWindowProxy::getOwnEnumerablePropertyKeys(
return AppendIndexedPropertyNames(aCx, GetBrowsingContext(aProxy), aProps);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -13,8 +13,7 @@
#include "nsIContentInlines.h"
#include <limits>
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/**
* Returns the length of the parent-traversal path (in terms of the number of
@ -321,5 +320,4 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ResizeObserverSize)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -15,8 +15,7 @@
#include "nsRefreshDriver.h"
#include <limits>
namespace mozilla {
namespace dom {
namespace mozilla::dom {
void ResizeObserverNotificationHelper::WillRefresh(TimeStamp aTime) {
MOZ_DIAGNOSTIC_ASSERT(mOwner, "Should've de-registered on-time!");
@ -224,5 +223,4 @@ void ResizeObserverController::AddSizeOfIncludingThis(
aSizes.mDOMResizeObserverControllerSize += size;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -20,8 +20,7 @@
using namespace mozilla;
using namespace mozilla::dom;
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION(ResponsiveImageSelector, mOwnerNode)
@ -730,5 +729,4 @@ double ResponsiveImageCandidate::Density(double aMatchingWidth) const {
return 1.0;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -7,8 +7,7 @@
#include "ScreenLuminance.h"
#include "nsScreen.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(ScreenLuminance, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(ScreenLuminance, Release)
@ -19,5 +18,4 @@ JSObject* ScreenLuminance::WrapObject(JSContext* aCx,
return ScreenLuminance_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -9,8 +9,7 @@
#include "js/SavedFrameAPI.h"
#include "mozilla/dom/WorkerPrivate.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
SerializedStackHolder::SerializedStackHolder()
: mHolder(StructuredCloneHolder::CloningSupported,
@ -150,5 +149,4 @@ void NotifyNetworkMonitorAlternateStack(nsISupports* aChannel,
PromiseFlatString(aStackJSON).get());
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -8,8 +8,7 @@
#include "mozilla/dom/StaticRangeBinding.h"
#include "nsINode.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
template already_AddRefed<StaticRange> StaticRange::Create(
const RangeBoundary& aStartBoundary, const RangeBoundary& aEndBoundary,
@ -121,5 +120,4 @@ JSObject* StaticRange::WrapObject(JSContext* aCx,
return StaticRange_Binding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -9,8 +9,7 @@
#include "mozilla/StaticPrefs_dom.h"
#include <cstdlib>
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_INHERITED(StorageAccessPermissionRequest,
ContentPermissionRequestBase)
@ -126,5 +125,4 @@ unsigned StorageAccessPermissionRequest::CalculateSimulatedDelay() {
return kMin + random % (kMax - kMin);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -15,8 +15,7 @@
#include "mozilla/UniquePtr.h"
#include "xpcpublic.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
StructuredCloneBlob::StructuredCloneBlob() {
mHolder.emplace(Holder::CloningSupported, Holder::TransferringNotSupported,
@ -218,5 +217,4 @@ StructuredCloneBlob::CollectReports(nsIHandleReportCallback* aHandleReport,
NS_IMPL_ISUPPORTS(StructuredCloneBlob, nsIMemoryReporter)
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -44,8 +44,7 @@
using namespace mozilla::ipc;
namespace mozilla {
namespace dom {
namespace mozilla::dom {
namespace {
@ -1337,5 +1336,4 @@ void StructuredCloneHolder::SameProcessScopeRequired(
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -9,8 +9,7 @@
#include "mozilla/dom/StyleSheetListBinding.h"
#include "nsINode.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(StyleSheetList)
@ -44,5 +43,4 @@ StyleSheetList::~StyleSheetList() {
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -10,8 +10,7 @@
#include "mozilla/dom/SubtleCryptoBinding.h"
#include "mozilla/dom/WebCryptoTask.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(SubtleCrypto, mParent)
NS_IMPL_CYCLE_COLLECTING_ADDREF(SubtleCrypto)
@ -123,5 +122,4 @@ already_AddRefed<Promise> SubtleCrypto::UnwrapKey(
unwrappedKeyAlgorithm, extractable, keyUsages)
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -8,8 +8,7 @@
#include "nsTextNode.h"
#include "mozAutoDocUpdate.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
already_AddRefed<Text> Text::SplitText(uint32_t aOffset, ErrorResult& aRv) {
nsAutoString cutText;
@ -155,5 +154,4 @@ bool Text::HasTextForTranslation() {
return false;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -9,8 +9,7 @@
#include "mozilla/dom/TimeoutManager.h"
#include "nsGlobalWindowInner.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
Timeout::Timeout()
: mTimeoutId(0),
@ -89,5 +88,4 @@ const TimeDuration& Timeout::TimeRemaining() const {
return mTimeRemaining;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -8,8 +8,7 @@
#include "mozilla/dom/Timeout.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/* static */ TimeoutBudgetManager& TimeoutBudgetManager::Get() {
static TimeoutBudgetManager gTimeoutBudgetManager;
@ -33,5 +32,4 @@ TimeDuration TimeoutBudgetManager::RecordExecution(const TimeStamp& aNow,
return aNow - mStart;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -15,8 +15,7 @@
extern mozilla::LazyLogModule gTimeoutLog;
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_ISUPPORTS(TimeoutExecutor, nsIRunnable, nsITimerCallback, nsINamed)
@ -254,5 +253,4 @@ TimeoutExecutor::GetName(nsACString& aNameOut) {
return NS_OK;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -9,8 +9,7 @@
#include "mozilla/Assertions.h"
#include "nsJSUtils.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
//-----------------------------------------------------------------------------
// TimeoutHandler
@ -175,5 +174,4 @@ void CallbackTimeoutHandler::GetDescription(nsACString& aOutString) {
mFunction->GetDescription(aOutString);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -17,8 +17,7 @@
#include "mozilla/dom/NodeFilterBinding.h"
#include "mozilla/dom/TreeWalkerBinding.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/*
* Factories, constructors and destructors
@ -327,5 +326,4 @@ bool TreeWalker::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto,
return TreeWalker_Binding::Wrap(aCx, this, aGivenProto, aReflector);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -11,8 +11,7 @@
#include "mozilla/dom/Document.h"
#include "mozilla/SimpleEnumerator.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/* static */
void OnPrefChange(const char* aPrefName, void*) {
@ -61,5 +60,4 @@ void UIDirectionManager::Shutdown() {
Preferences::UnregisterCallback(OnPrefChange, "intl.l10n.pseudo");
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -8,8 +8,7 @@
#include "mozilla/TextEvents.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
namespace {
@ -126,5 +125,4 @@ AutoHandlingUserInputStatePusher::~AutoHandlingUserInputStatePusher() {
UserActivation::StopHandlingUserInput(mMessage);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -14,8 +14,7 @@
#include "nsJSUtils.h"
#include "xpcprivate.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
static bool ShouldExposeChildWindow(const nsString& aNameBeingResolved,
BrowsingContext* aChild) {
@ -273,5 +272,4 @@ JSObject* WindowNamedPropertiesHandler::Create(JSContext* aCx,
return gsp;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -113,8 +113,7 @@ VisibilityChangeListener::GetCallback() {
return callback.forget();
}
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class ContentPermissionRequestParent : public PContentPermissionRequestParent {
public:
@ -786,8 +785,7 @@ nsresult TranslateChoices(
return NS_OK;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
NS_IMPL_ISUPPORTS(
nsContentPermissionRequestProxy::nsContentPermissionRequesterProxy,

View File

@ -160,11 +160,9 @@ static inline int32_t FirstNon8BitUnvectorized(const char16_t* str,
}
#ifdef MOZILLA_MAY_SUPPORT_SSE2
namespace mozilla {
namespace SSE2 {
namespace mozilla::SSE2 {
int32_t FirstNon8Bit(const char16_t* str, const char16_t* end);
} // namespace SSE2
} // namespace mozilla
} // namespace mozilla::SSE2
#endif
#ifdef __powerpc__

View File

@ -10,8 +10,7 @@
#include "mozilla/dom/BindingUtils.h"
#include "nsPrintfCString.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
bool CallbackInterface::GetCallableProperty(
BindingCallContext& cx, JS::Handle<jsid> aPropId,
@ -31,5 +30,4 @@ bool CallbackInterface::GetCallableProperty(
return true;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -21,8 +21,7 @@
#include "js/ContextOptions.h"
#include "nsJSPrincipals.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CallbackObject)
NS_INTERFACE_MAP_ENTRY(mozilla::dom::CallbackObject)
@ -431,5 +430,4 @@ already_AddRefed<nsISupports> CallbackObjectHolderBase::ToXPCOMCallback(
return retval.forget();
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -18,8 +18,7 @@
using namespace JS;
namespace mozilla {
namespace dom {
namespace mozilla::dom {
jsid s_length_id = JSID_VOID;
@ -327,5 +326,4 @@ void ShadowingDOMProxyHandler::trace(JSTracer* trc, JSObject* proxy) const {
"Shadowing DOM proxy expando");
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -22,8 +22,7 @@
#include "WorkerPrivate.h"
#include "nsContentUtils.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
// Throw the given exception value if it's safe. If it's not safe, then
// synthesize and throw a new exception value for NS_ERROR_UNEXPECTED. The
@ -754,5 +753,4 @@ already_AddRefed<nsIStackFrame> CreateStack(JSContext* aCx,
}
} // namespace exceptions
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -6,8 +6,7 @@
#include "mozilla/dom/IterableIterator.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
// Due to IterableIterator being a templated class, we implement the necessary
// CC bits in a superclass that IterableIterator then inherits from. This allows
@ -31,5 +30,4 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(IterableIteratorBase)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -10,8 +10,7 @@
#include "js/Object.h" // JS::GetClass
#include "xpcprivate.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
bool RemoteObjectProxyBase::getOwnPropertyDescriptor(
JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<jsid> aId,
@ -180,5 +179,4 @@ void RemoteObjectProxyBase::GetOrCreateProxyObject(
const char RemoteObjectProxyBase::sCrossOriginProxyFamily = 0;
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -19,8 +19,7 @@
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/NullPrincipal.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_CLASS(SimpleGlobalObject)
@ -167,5 +166,4 @@ SimpleGlobalObject::GlobalType SimpleGlobalObject::SimpleGlobalType(
return globalObject->Type();
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -14,8 +14,7 @@
#include "nsStringBuffer.h"
#include "xpcpublic.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
bool ToJSValue(JSContext* aCx, const nsAString& aArgument,
JS::MutableHandle<JS::Value> aValue) {
@ -116,5 +115,4 @@ static_assert(std::is_same_v<ScriptableInterfaceType<MultiScriptableInterface>,
nsISupports>,
"Concrete type with multiple scriptable interfaces falls back");
} // namespace binding_detail
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@ -25,8 +25,7 @@
#include "nsTHashtable.h"
#include "WrapperFactory.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
static JSObject* FindNamedConstructorForXray(
JSContext* aCx, JS::Handle<jsid> aId, const WebIDLNameTableEntry* aEntry) {
@ -269,5 +268,4 @@ bool WebIDLGlobalNameHash::NewEnumerateSystemGlobal(
return true;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

Some files were not shown because too many files have changed in this diff Show More