Bug 1768189 - Part 38: Apply modernize-concat-nested-namespaces to dom/url/URLSearchParams.cpp ... r=andi

Depends on D145773

Differential Revision: https://phabricator.services.mozilla.com/D145774
This commit is contained in:
Kagami Sascha Rosylight
2022-05-09 20:41:18 +00:00
parent e446e0e6d9
commit ea33f629cc
25 changed files with 50 additions and 100 deletions

View File

@@ -35,8 +35,7 @@
#include "nsStringStream.h"
#include "nsURLHelper.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(URLSearchParams, mParent, mObserver)
NS_IMPL_CYCLE_COLLECTING_ADDREF(URLSearchParams)
@@ -232,5 +231,4 @@ nsresult URLSearchParams::GetSendInfo(nsIInputStream** aBody,
return NS_NewCStringInputStream(aBody, std::move(converted));
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -12,8 +12,7 @@
#include "mozilla/dom/WorkerRunnable.h"
#include "mozilla/dom/WorkerScope.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
// This class creates an URL from a DOM Blob on the main thread.
class CreateURLRunnable : public WorkerMainThreadRunnable {
@@ -158,5 +157,4 @@ bool URLWorker::IsValidURL(const GlobalObject& aGlobal, const nsAString& aUrl,
return runnable->IsValidURL();
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -30,8 +30,7 @@
using namespace mozilla::gfx;
namespace mozilla {
namespace dom {
namespace mozilla::dom {
VRFieldOfView::VRFieldOfView(nsISupports* aParent, double aUpDegrees,
double aRightDegrees, double aDownDegrees,
@@ -804,5 +803,4 @@ bool VRFrameInfo::IsDirty() { return mVRState.timestamp == 0; }
void VRFrameInfo::Clear() { mVRState.Clear(); }
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -11,8 +11,7 @@
using namespace mozilla::gfx;
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_CLASS(VRDisplayEvent)
@@ -72,5 +71,4 @@ Nullable<VRDisplayEventReason> VRDisplayEvent::GetReason() const {
return nullptr;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -11,8 +11,7 @@
#include "mozilla/Telemetry.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
using namespace gfx;
@@ -179,5 +178,4 @@ bool VREventObserver::IsWebVR(uint32_t aDisplayID) const {
return true;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -13,8 +13,7 @@
class nsGlobalWindowInner;
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class VREventObserver final : public gfx::VRManagerEventObserver {
public:
@@ -53,7 +52,6 @@ class VREventObserver final : public gfx::VRManagerEventObserver {
bool mStopActivity;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // mozilla_dom_VREventObserver_h

View File

@@ -9,8 +9,7 @@
#include "mozilla/dom/DOMPoint.h"
#include "VRDisplayClient.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
XRBoundedReferenceSpace::XRBoundedReferenceSpace(nsIGlobalObject* aParent,
XRSession* aSession,
@@ -71,5 +70,4 @@ XRBoundedReferenceSpace::GetOffsetReferenceSpace(
return offsetReferenceSpace.forget();
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -13,8 +13,7 @@
#include "gfxVR.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class DOMPointReadOnly;
class XRSession;
@@ -38,7 +37,6 @@ class XRBoundedReferenceSpace final : public XRReferenceSpace {
virtual ~XRBoundedReferenceSpace() = default;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // mozilla_dom_XRBoundedReferenceSpace_h_

View File

@@ -12,8 +12,7 @@
#include "mozilla/dom/XRReferenceSpace.h"
#include "VRDisplayClient.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(XRFrame, mParent, mSession)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(XRFrame, AddRef)
@@ -202,5 +201,4 @@ gfx::Matrix4x4 XRFrame::ConstructInlineProjection(float aFov, float aAspect,
return m;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -12,8 +12,7 @@
#include "gfxVR.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class XRFrameOfReference;
class XRInputPose;
@@ -59,7 +58,6 @@ class XRFrame final : public nsWrapperCache {
bool mAnimationFrame;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // mozilla_dom_XRFrame_h_

View File

@@ -14,8 +14,7 @@
#include "mozilla/dom/Gamepad.h"
#include "mozilla/dom/GamepadManager.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(XRInputSource, mParent, mTargetRaySpace,
mGripSpace, mGamepad)
@@ -390,5 +389,4 @@ void XRInputSource::CreateGripSpace(
}
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -9,8 +9,7 @@
#include "mozilla/dom/XRInputSourcesChangeEvent.h"
#include "VRDisplayClient.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(XRInputSourceArray, mParent,
mInputSources)
@@ -165,5 +164,4 @@ XRInputSource* XRInputSourceArray::IndexedGetter(uint32_t aIndex,
return mInputSources[aIndex];
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -8,8 +8,7 @@
#include "VRDisplayClient.h"
#include "mozilla/dom/GamepadPoseState.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
XRInputSpace::XRInputSpace(nsIGlobalObject* aParent, XRSession* aSession,
XRNativeOrigin* aNativeOrigin,
@@ -32,5 +31,4 @@ bool XRInputSpace::IsPositionEmulated() const {
GamepadCapabilityFlags::Cap_None);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -10,8 +10,7 @@
#include "XRInputSpace.h"
#include "mozilla/dom/XRSpace.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class XRInputSpace : public XRSpace {
public:
@@ -28,7 +27,6 @@ class XRInputSpace : public XRSpace {
int32_t mIndex;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // mozilla_dom_XRInputSpace_h_

View File

@@ -10,8 +10,7 @@
#include "gfxVR.h"
#include "mozilla/RefPtr.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class XRNativeOrigin {
public:
@@ -28,7 +27,6 @@ class XRNativeOrigin {
virtual ~XRNativeOrigin() = default;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // mozilla_dom_XRNativeOrigin_h_

View File

@@ -6,13 +6,11 @@
#include "XRNativeOriginFixed.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
XRNativeOriginFixed::XRNativeOriginFixed(const gfx::PointDouble3D& aPosition)
: mPosition(aPosition) {}
gfx::PointDouble3D XRNativeOriginFixed::GetPosition() { return mPosition; }
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -10,8 +10,7 @@
#include "gfxVR.h"
#include "XRNativeOrigin.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class XRNativeOriginFixed : public XRNativeOrigin {
public:
@@ -26,7 +25,6 @@ class XRNativeOriginFixed : public XRNativeOrigin {
gfx::PointDouble3D mPosition;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // mozilla_dom_XRNativeOriginFixed_h_

View File

@@ -7,8 +7,7 @@
#include "XRNativeOriginLocal.h"
#include "VRDisplayClient.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
XRNativeOriginLocal::XRNativeOriginLocal(gfx::VRDisplayClient* aDisplay)
: mDisplay(aDisplay), mInitialPositionValid(false) {
@@ -32,5 +31,4 @@ gfx::PointDouble3D XRNativeOriginLocal::GetPosition() {
return mInitialPosition;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -8,8 +8,7 @@
#include "XRNativeOriginLocalFloor.h"
#include "VRDisplayClient.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
XRNativeOriginLocalFloor::XRNativeOriginLocalFloor(
gfx::VRDisplayClient* aDisplay)
@@ -39,5 +38,4 @@ gfx::PointDouble3D XRNativeOriginLocalFloor::GetPosition() {
return mInitialPosition;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -6,8 +6,7 @@
#include "XRNativeOriginTracker.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
XRNativeOriginTracker::XRNativeOriginTracker(const gfx::VRPose* aPose)
: mPose(aPose) {
@@ -28,5 +27,4 @@ gfx::QuaternionDouble XRNativeOriginTracker::GetOrientation() {
return orientation;
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -10,8 +10,7 @@
#include "gfxVR.h"
#include "XRNativeOrigin.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
class XRNativeOriginTracker : public XRNativeOrigin {
public:
@@ -26,7 +25,6 @@ class XRNativeOriginTracker : public XRNativeOrigin {
const gfx::VRPose* mPose;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // mozilla_dom_XRNativeOriginTracker_h_

View File

@@ -7,8 +7,7 @@
#include "XRNativeOriginViewer.h"
#include "VRDisplayClient.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
XRNativeOriginViewer::XRNativeOriginViewer(gfx::VRDisplayClient* aDisplay)
: mDisplay(aDisplay) {
@@ -29,5 +28,4 @@ gfx::QuaternionDouble XRNativeOriginViewer::GetOrientation() {
sensorState.pose.orientation[2], sensorState.pose.orientation[3]);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -10,8 +10,7 @@
#include "mozilla/Preferences.h"
#include "nsContentUtils.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
//-------------------------------------------------
// XR Permission Requests
@@ -73,5 +72,4 @@ nsresult XRPermissionRequest::Start() {
return nsContentPermissionUtils::AskPermission(this, mWindow);
}
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom

View File

@@ -11,8 +11,7 @@
#include "nsContentPermissionHelper.h"
#include "nsISupports.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
/**
* Handles permission dialog management when requesting XR device access.
@@ -35,7 +34,6 @@ class XRPermissionRequest final : public ContentPermissionRequestBase {
uint64_t mWindowId;
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom
#endif // mozilla_dom_XR_h_

View File

@@ -7,8 +7,7 @@
#include "mozilla/dom/XRPose.h"
#include "mozilla/dom/XRRigidTransform.h"
namespace mozilla {
namespace dom {
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(XRPose, mParent, mTransform)
NS_IMPL_CYCLE_COLLECTING_ADDREF(XRPose)
@@ -38,5 +37,4 @@ XRRigidTransform* XRPose::Transform() { return mTransform; }
bool XRPose::EmulatedPosition() const { return mEmulatedPosition; }
} // namespace dom
} // namespace mozilla
} // namespace mozilla::dom