From 8cc61e1d4b28fd6bbfeabbaadb51f066e0b92bb4 Mon Sep 17 00:00:00 2001 From: Dorel Luca Date: Sat, 18 Jan 2020 15:39:55 +0200 Subject: [PATCH] Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c --- dom/base/nsFrameMessageManager.cpp | 6 ++-- dom/base/nsTextFragmentSSE2.cpp | 6 ++-- dom/battery/BatteryManager.cpp | 8 ++++-- dom/canvas/ImageUtils.cpp | 6 ++-- dom/geolocation/GeolocationCoordinates.cpp | 6 ++-- dom/geolocation/GeolocationPosition.cpp | 6 ++-- dom/geolocation/GeolocationPositionError.cpp | 6 ++-- dom/html/PluginDocument.cpp | 6 ++-- dom/indexedDB/ActorsParent.cpp | 6 ++-- dom/indexedDB/Key.cpp | 8 ++++-- dom/plugins/base/nsNPAPIPlugin.cpp | 8 ++++-- dom/plugins/base/nsPluginHost.cpp | 6 ++-- .../PrototypeDocumentContentSink.cpp | 6 ++-- gfx/2d/BlurSSE2.cpp | 6 ++-- gfx/2d/ConvolutionFilter.cpp | 6 ++-- gfx/2d/DrawTargetSkia.cpp | 6 ++-- gfx/2d/Factory.cpp | 6 ++-- gfx/2d/FilterProcessingSSE2.cpp | 6 ++-- gfx/2d/ImageScalingSSE2.cpp | 6 ++-- gfx/2d/InlineTranslator.cpp | 6 ++-- gfx/2d/JobScheduler_posix.cpp | 6 ++-- gfx/2d/NativeFontResourceFreeType.cpp | 6 ++-- gfx/2d/PathSkia.cpp | 6 ++-- gfx/2d/ScaledFontFontconfig.cpp | 6 ++-- gfx/2d/SourceSurfaceSkia.cpp | 6 ++-- gfx/2d/SwizzleAVX2.cpp | 6 ++-- gfx/2d/SwizzleSSE2.cpp | 6 ++-- gfx/2d/SwizzleSSSE3.cpp | 6 ++-- gfx/2d/UnscaledFontFreeType.cpp | 6 ++-- gfx/gl/GLContextProviderGLX.cpp | 6 ++-- gfx/gl/GLContextProviderWayland.cpp | 6 ++-- gfx/gl/GLScreenBuffer.cpp | 6 ++-- gfx/gl/SharedSurfaceGLX.cpp | 6 ++-- gfx/ipc/GPUParent.cpp | 6 ++-- gfx/layers/ImageContainer.cpp | 6 ++-- gfx/layers/basic/BasicImageLayer.cpp | 6 ++-- gfx/layers/basic/TextureClientX11.cpp | 6 ++-- gfx/layers/basic/X11TextureSourceBasic.cpp | 6 ++-- gfx/layers/client/TextureClient.cpp | 6 ++-- gfx/layers/composite/X11TextureHost.cpp | 6 ++-- .../opengl/WaylandDMABUFTextureClientOGL.cpp | 6 ++-- .../opengl/WaylandDMABUFTextureHostOGL.cpp | 6 ++-- gfx/layers/opengl/X11TextureSourceOGL.cpp | 6 ++-- gfx/layers/wr/WebRenderTextureHost.cpp | 6 ++-- gfx/thebes/PrintTarget.cpp | 6 ++-- gfx/thebes/PrintTargetPDF.cpp | 6 ++-- gfx/thebes/PrintTargetPS.cpp | 6 ++-- gfx/thebes/PrintTargetSkPDF.cpp | 6 ++-- gfx/thebes/PrintTargetThebes.cpp | 6 ++-- gfx/vr/VRManager.cpp | 6 ++-- gfx/vr/VRPuppetCommandBuffer.cpp | 6 ++-- gfx/vr/ipc/VRLayerChild.cpp | 6 ++-- gfx/vr/service/OpenVRSession.cpp | 6 ++-- gfx/vr/service/PuppetSession.cpp | 6 ++-- .../RenderCompositorEGL.cpp | 8 ++++-- .../RenderWaylandDMABUFTextureHostOGL.cpp | 6 ++-- hal/Hal.cpp | 6 ++-- ipc/glue/BackgroundChildImpl.cpp | 6 ++-- ipc/glue/BackgroundParentImpl.cpp | 6 ++-- ipc/glue/FileDescriptorSetChild.cpp | 6 ++-- ipc/glue/FileDescriptorSetParent.cpp | 6 ++-- js/ductwork/debugger/JSDebugger.cpp | 6 ++-- js/src/ctypes/CTypes.cpp | 6 ++-- js/src/ctypes/Library.cpp | 6 ++-- js/src/frontend/BinASTParser.cpp | 6 ++-- js/src/frontend/BinASTParserBase.cpp | 6 ++-- js/src/frontend/BinASTParserPerTokenizer.cpp | 6 ++-- js/src/frontend/BinASTRuntimeSupport.cpp | 7 +++-- js/src/frontend/BinASTTokenReaderBase.cpp | 6 ++-- js/src/frontend/BinASTTokenReaderContext.cpp | 7 +++-- .../frontend/BinASTTokenReaderMultipart.cpp | 7 +++-- js/src/frontend/Parser.cpp | 6 ++-- js/src/vtune/VTuneWrapper.cpp | 6 ++-- layout/ipc/VsyncChild.cpp | 6 ++-- media/mtransport/WebrtcTCPSocketWrapper.cpp | 6 ++-- mfbt/RecordReplay.cpp | 6 ++-- netwerk/base/NetworkInfoServiceLinux.cpp | 6 ++-- netwerk/base/nsNetworkInfoService.cpp | 6 ++-- netwerk/build/nsNetModule.cpp | 6 ++-- netwerk/cache2/AppCacheStorage.cpp | 6 ++-- netwerk/cache2/CacheStorage.cpp | 6 ++-- netwerk/dns/nsHostResolver.cpp | 6 ++-- .../http/nsHttpChannelAuthProvider.cpp | 6 ++-- netwerk/protocol/http/nsHttpHandler.cpp | 9 ++++-- netwerk/system/netlink/NetlinkService.cpp | 6 ++-- storage/mozStorageBindingParams.cpp | 6 ++-- storage/mozStorageConnection.cpp | 6 ++-- toolkit/components/ctypes/ctypes.cpp | 6 ++-- toolkit/components/reflect/reflect.cpp | 6 ++-- .../components/telemetry/core/Stopwatch.cpp | 6 ++-- .../components/telemetry/core/Telemetry.cpp | 12 ++++---- .../telemetry/core/TelemetryCommon.cpp | 8 ++++-- .../telemetry/other/CombinedStacks.cpp | 6 ++-- .../telemetry/other/KeyedStackCapturer.cpp | 6 ++-- .../telemetry/other/ProcessedStack.cpp | 6 ++-- .../other/TelemetryIOInterposeObserver.cpp | 6 ++-- .../components/url-classifier/HashStore.cpp | 6 ++-- .../VariableLengthPrefixSet.cpp | 6 ++-- toolkit/xre/nsAppRunner.cpp | 6 ++-- toolkit/xre/nsEmbedFunctions.cpp | 6 ++-- tools/profiler/core/memory_hooks.cpp | 12 +++++--- widget/GfxInfoX11.cpp | 6 ++-- widget/LSBUtils.cpp | 8 ++++-- widget/ScreenManager.cpp | 6 ++-- widget/WindowSurfaceX11SHM.cpp | 6 ++-- widget/gtk/MediaKeysEventSourceFactory.cpp | 6 ++-- widget/gtk/mozwayland/mozwayland.c | 28 +++++++++---------- widget/nsBaseWidget.cpp | 12 +++++--- 108 files changed, 469 insertions(+), 237 deletions(-) diff --git a/dom/base/nsFrameMessageManager.cpp b/dom/base/nsFrameMessageManager.cpp index 26410f80585d..14e118b2370d 100644 --- a/dom/base/nsFrameMessageManager.cpp +++ b/dom/base/nsFrameMessageManager.cpp @@ -990,7 +990,8 @@ struct MessageManagerReferentCount { } // namespace -namespace mozilla::dom { +namespace mozilla { +namespace dom { class MessageManagerReporter final : public nsIMemoryReporter { ~MessageManagerReporter() = default; @@ -1124,7 +1125,8 @@ MessageManagerReporter::CollectReports(nsIHandleReportCallback* aHandleReport, return NS_OK; } -} // namespace mozilla::dom +} // namespace dom +} // namespace mozilla already_AddRefed nsFrameMessageManager::GetGlobalMessageManager() { diff --git a/dom/base/nsTextFragmentSSE2.cpp b/dom/base/nsTextFragmentSSE2.cpp index 48dcbdb9fce0..b6f5817cc32a 100644 --- a/dom/base/nsTextFragmentSSE2.cpp +++ b/dom/base/nsTextFragmentSSE2.cpp @@ -13,7 +13,8 @@ #include "nsTextFragmentImpl.h" #include -namespace mozilla::SSE2 { +namespace mozilla { +namespace SSE2 { static inline bool is_zero(__m128i x) { return _mm_movemask_epi8(_mm_cmpeq_epi8(x, _mm_setzero_si128())) == 0xffff; @@ -63,4 +64,5 @@ int32_t FirstNon8Bit(const char16_t* str, const char16_t* end) { return -1; } -} // namespace mozilla::SSE2 +} // namespace SSE2 +} // namespace mozilla diff --git a/dom/battery/BatteryManager.cpp b/dom/battery/BatteryManager.cpp index a536ee9fd1da..04fcb25eae47 100644 --- a/dom/battery/BatteryManager.cpp +++ b/dom/battery/BatteryManager.cpp @@ -25,7 +25,9 @@ NS_LITERAL_STRING("dischargingtimechange") #define CHARGINGTIMECHANGE_EVENT_NAME NS_LITERAL_STRING("chargingtimechange") -namespace mozilla::dom::battery { +namespace mozilla { +namespace dom { +namespace battery { BatteryManager::BatteryManager(nsPIDOMWindowInner* aWindow) : DOMEventTargetHelper(aWindow), @@ -181,4 +183,6 @@ void BatteryManager::Notify(const hal::BatteryInformation& aBatteryInfo) { } } -} // namespace mozilla::dom::battery +} // namespace battery +} // namespace dom +} // namespace mozilla diff --git a/dom/canvas/ImageUtils.cpp b/dom/canvas/ImageUtils.cpp index de946c656030..ded585c019ba 100644 --- a/dom/canvas/ImageUtils.cpp +++ b/dom/canvas/ImageUtils.cpp @@ -13,7 +13,8 @@ using namespace mozilla::layers; using namespace mozilla::gfx; -namespace mozilla::dom { +namespace mozilla { +namespace dom { static ImageBitmapFormat GetImageBitmapFormatFromSurfaceFromat( SurfaceFormat aSurfaceFormat) { @@ -199,4 +200,5 @@ uint32_t ImageUtils::GetBufferLength() const { return mImpl->GetBufferLength(); } -} // namespace mozilla::dom +} // namespace dom +} // namespace mozilla diff --git a/dom/geolocation/GeolocationCoordinates.cpp b/dom/geolocation/GeolocationCoordinates.cpp index 3ec4d55b125a..5d17da374c00 100644 --- a/dom/geolocation/GeolocationCoordinates.cpp +++ b/dom/geolocation/GeolocationCoordinates.cpp @@ -10,7 +10,8 @@ #include "mozilla/dom/GeolocationPositionBinding.h" #include "mozilla/dom/GeolocationCoordinatesBinding.h" -namespace mozilla::dom { +namespace mozilla { +namespace dom { NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(GeolocationCoordinates, mPosition) NS_IMPL_CYCLE_COLLECTING_ADDREF(GeolocationCoordinates) @@ -64,4 +65,5 @@ GENERATE_COORDS_WRAPPED_GETTER_NULLABLE(Speed) #undef GENERATE_COORDS_WRAPPED_GETTER #undef GENERATE_COORDS_WRAPPED_GETTER_NULLABLE -} // namespace mozilla::dom +} // namespace dom +} // namespace mozilla diff --git a/dom/geolocation/GeolocationPosition.cpp b/dom/geolocation/GeolocationPosition.cpp index bb113c4651d7..eb14e0b0775f 100644 --- a/dom/geolocation/GeolocationPosition.cpp +++ b/dom/geolocation/GeolocationPosition.cpp @@ -142,7 +142,8 @@ nsGeoPosition::GetCoords(nsIDOMGeoPositionCoords** aCoords) { return NS_OK; } -namespace mozilla::dom { +namespace mozilla { +namespace dom { NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(GeolocationPosition, mParent, mCoordinates) @@ -185,4 +186,5 @@ uint64_t GeolocationPosition::Timestamp() const { return rv; } -} // namespace mozilla::dom +} // namespace dom +} // namespace mozilla diff --git a/dom/geolocation/GeolocationPositionError.cpp b/dom/geolocation/GeolocationPositionError.cpp index efeaaddc05a7..2456b32dd119 100644 --- a/dom/geolocation/GeolocationPositionError.cpp +++ b/dom/geolocation/GeolocationPositionError.cpp @@ -9,7 +9,8 @@ #include "mozilla/CycleCollectedJSContext.h" // for nsAutoMicroTask #include "Geolocation.h" -namespace mozilla::dom { +namespace mozilla { +namespace dom { NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(GeolocationPositionError, mParent) NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(GeolocationPositionError, AddRef) @@ -63,4 +64,5 @@ void GeolocationPositionError::NotifyCallback( } } -} // namespace mozilla::dom +} // namespace dom +} // namespace mozilla diff --git a/dom/html/PluginDocument.cpp b/dom/html/PluginDocument.cpp index 764215a9b8fb..c9ec51f96407 100644 --- a/dom/html/PluginDocument.cpp +++ b/dom/html/PluginDocument.cpp @@ -19,7 +19,8 @@ #include "nsObjectLoadingContent.h" #include "GeckoProfiler.h" -namespace mozilla::dom { +namespace mozilla { +namespace dom { class PluginDocument final : public MediaDocument, public nsIPluginDocument { public: @@ -257,7 +258,8 @@ PluginDocument::Print() { return NS_OK; } -} // namespace mozilla::dom +} // namespace dom +} // namespace mozilla nsresult NS_NewPluginDocument(mozilla::dom::Document** aResult) { auto* doc = new mozilla::dom::PluginDocument(); diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp index 18136cea6071..e3a67e96c150 100644 --- a/dom/indexedDB/ActorsParent.cpp +++ b/dom/indexedDB/ActorsParent.cpp @@ -141,7 +141,8 @@ namespace mozilla { MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedPRFileDesc, PRFileDesc, PR_Close); -namespace dom::indexedDB { +namespace dom { +namespace indexedDB { using namespace mozilla::dom::quota; using namespace mozilla::ipc; @@ -27675,7 +27676,8 @@ nsresult FileHelper::SyncCopy(nsIInputStream* aInputStream, return rv; } -} // namespace dom::indexedDB +} // namespace indexedDB +} // namespace dom } // namespace mozilla #undef IDB_MOBILE diff --git a/dom/indexedDB/Key.cpp b/dom/indexedDB/Key.cpp index f000a7b22c6a..ad05272772c4 100644 --- a/dom/indexedDB/Key.cpp +++ b/dom/indexedDB/Key.cpp @@ -27,7 +27,9 @@ #include "unicode/ucol.h" #include "xpcpublic.h" -namespace mozilla::dom::indexedDB { +namespace mozilla { +namespace dom { +namespace indexedDB { /* Here's how we encode keys: @@ -885,4 +887,6 @@ nsresult Key::SetFromSource(T* aSource, uint32_t aIndex) { return NS_OK; } -} // namespace mozilla::dom::indexedDB +} // namespace indexedDB +} // namespace dom +} // namespace mozilla diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp index a3aba2a646cc..deeafcc99493 100644 --- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -456,7 +456,9 @@ void PopException() { // Static callbacks that get routed back through the new C++ API // -namespace mozilla::plugins::parent { +namespace mozilla { +namespace plugins { +namespace parent { NPError _geturl(NPP npp, const char* relativeURL, const char* target) { if (!NS_IsMainThread()) { @@ -1881,4 +1883,6 @@ void _setcurrentasyncsurface(NPP instance, NPAsyncSurface* surface, inst->SetCurrentAsyncSurface(surface, changed); } -} // namespace mozilla::plugins::parent +} /* namespace parent */ +} /* namespace plugins */ +} /* namespace mozilla */ diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index 93e50b4efac4..ec2442b68f3d 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -154,7 +154,8 @@ static bool IsTypeInList(const nsCString& aMimeType, nsCString aTypeList) { return FindInReadable(commaSeparated, start, end); } -namespace mozilla::plugins { +namespace mozilla { +namespace plugins { class BlocklistPromiseHandler final : public mozilla::dom::PromiseNativeHandler { public: @@ -259,7 +260,8 @@ NS_IMPL_ISUPPORTS0(BlocklistPromiseHandler) bool BlocklistPromiseHandler::sPluginBlocklistStatesChangedSinceLastWrite = false; uint32_t BlocklistPromiseHandler::sPendingBlocklistStateRequests = 0; -} // namespace mozilla::plugins +} // namespace plugins +} // namespace mozilla nsPluginHost::nsPluginHost() : mPluginsLoaded(false), diff --git a/dom/prototype/PrototypeDocumentContentSink.cpp b/dom/prototype/PrototypeDocumentContentSink.cpp index c5a9eecc0c82..ad686c19496e 100644 --- a/dom/prototype/PrototypeDocumentContentSink.cpp +++ b/dom/prototype/PrototypeDocumentContentSink.cpp @@ -77,7 +77,8 @@ nsresult NS_NewPrototypeDocumentContentSink(nsIContentSink** aResult, return NS_OK; } -namespace mozilla::dom { +namespace mozilla { +namespace dom { PrototypeDocumentContentSink::PrototypeDocumentContentSink() : mNextSrcLoadWaiter(nullptr), @@ -1079,4 +1080,5 @@ nsresult PrototypeDocumentContentSink::AddAttributes( return NS_OK; } -} // namespace mozilla::dom +} // namespace dom +} // namespace mozilla diff --git a/gfx/2d/BlurSSE2.cpp b/gfx/2d/BlurSSE2.cpp index 69a30367baca..5514e48e8ebe 100644 --- a/gfx/2d/BlurSSE2.cpp +++ b/gfx/2d/BlurSSE2.cpp @@ -10,7 +10,8 @@ #include -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { MOZ_ALWAYS_INLINE __m128i Divide(__m128i aValues, __m128i aDivisor) { @@ -342,4 +343,5 @@ void AlphaBoxBlur::BoxBlur_SSE2(uint8_t* aData, int32_t aLeftLobe, } } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/ConvolutionFilter.cpp b/gfx/2d/ConvolutionFilter.cpp index 07498d0f5af9..938dcc560930 100644 --- a/gfx/2d/ConvolutionFilter.cpp +++ b/gfx/2d/ConvolutionFilter.cpp @@ -13,7 +13,8 @@ #include #include "mozilla/Vector.h" -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { ConvolutionFilter::ConvolutionFilter() : mFilter(MakeUnique()) {} @@ -162,4 +163,5 @@ bool ConvolutionFilter::ComputeResizeFilter(ResizeMethod aResizeMethod, return mFilter->maxFilter() > 0 && mFilter->numValues() == aDstSize; } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/DrawTargetSkia.cpp b/gfx/2d/DrawTargetSkia.cpp index 563c55ad5714..e7aef2487bb0 100644 --- a/gfx/2d/DrawTargetSkia.cpp +++ b/gfx/2d/DrawTargetSkia.cpp @@ -42,7 +42,8 @@ # include "ScaledFontDWrite.h" #endif -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { class GradientStopsSkia : public GradientStops { public: @@ -1884,4 +1885,5 @@ void DrawTargetSkia::MarkChanged() { } } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/Factory.cpp b/gfx/2d/Factory.cpp index f62d8bdee715..8f816bcde907 100644 --- a/gfx/2d/Factory.cpp +++ b/gfx/2d/Factory.cpp @@ -202,7 +202,8 @@ void mozilla_UnlockFTLibrary(FT_Library aFTLibrary) { } #endif -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { #ifdef MOZ_ENABLE_FREETYPE FT_Library Factory::mFTLibrary = nullptr; @@ -1377,4 +1378,5 @@ void LogWStr(const wchar_t* aWStr, std::stringstream& aOut) { } #endif -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/FilterProcessingSSE2.cpp b/gfx/2d/FilterProcessingSSE2.cpp index 0b9e0aa3d1f5..6dff63461331 100644 --- a/gfx/2d/FilterProcessingSSE2.cpp +++ b/gfx/2d/FilterProcessingSSE2.cpp @@ -13,7 +13,8 @@ static_assert( false, "If this file is built, FilterProcessing.h should know about it!"); #endif -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { void FilterProcessing::ExtractAlpha_SSE2(const IntSize& size, uint8_t* sourceData, @@ -123,4 +124,5 @@ FilterProcessing::ApplyArithmeticCombine_SSE2(DataSourceSurface* aInput1, aInput1, aInput2, aK1, aK2, aK3, aK4); } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/ImageScalingSSE2.cpp b/gfx/2d/ImageScalingSSE2.cpp index f901641eaf93..b43eb8183879 100644 --- a/gfx/2d/ImageScalingSSE2.cpp +++ b/gfx/2d/ImageScalingSSE2.cpp @@ -134,7 +134,8 @@ MOZ_ALWAYS_INLINE uint32_t Avg2(uint32_t a, uint32_t b) { return ((sum & mask) >> 1) + carry; } -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { void ImageHalfScaler::HalfImage2D_SSE2(uint8_t* aSource, int32_t aSourceStride, const IntSize& aSourceSize, @@ -330,4 +331,5 @@ void ImageHalfScaler::HalfImageHorizontal_SSE2(uint8_t* aSource, } } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/InlineTranslator.cpp b/gfx/2d/InlineTranslator.cpp index 9ace1d8d31d1..eae23d9b48ba 100644 --- a/gfx/2d/InlineTranslator.cpp +++ b/gfx/2d/InlineTranslator.cpp @@ -15,7 +15,8 @@ using namespace mozilla::gfx; -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { InlineTranslator::InlineTranslator() : mFontContext(nullptr) {} @@ -109,4 +110,5 @@ already_AddRefed InlineTranslator::CreateDrawTarget( return drawTarget.forget(); } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/JobScheduler_posix.cpp b/gfx/2d/JobScheduler_posix.cpp index 8287c8220cde..81f302b5f394 100644 --- a/gfx/2d/JobScheduler_posix.cpp +++ b/gfx/2d/JobScheduler_posix.cpp @@ -7,7 +7,8 @@ #include "JobScheduler.h" #include "mozilla/gfx/Logging.h" -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { void* ThreadCallback(void* threadData); @@ -152,4 +153,5 @@ void EventObject::Wait() { mCond.Wait(&mMutex); } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/NativeFontResourceFreeType.cpp b/gfx/2d/NativeFontResourceFreeType.cpp index 98e06a0e2beb..49234c0694ae 100644 --- a/gfx/2d/NativeFontResourceFreeType.cpp +++ b/gfx/2d/NativeFontResourceFreeType.cpp @@ -8,7 +8,8 @@ #include "UnscaledFontFreeType.h" #include "Logging.h" -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { NativeFontResourceFreeType::NativeFontResourceFreeType( UniquePtr&& aFontData, uint32_t aDataLength, @@ -89,4 +90,5 @@ NativeFontResourceFontconfig::Create(uint8_t* aFontData, uint32_t aDataLength, } #endif -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/PathSkia.cpp b/gfx/2d/PathSkia.cpp index 5c7895ac6b8b..ce405db9a054 100644 --- a/gfx/2d/PathSkia.cpp +++ b/gfx/2d/PathSkia.cpp @@ -11,7 +11,8 @@ #include "HelpersSkia.h" #include "PathHelpers.h" -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { PathBuilderSkia::PathBuilderSkia(const Matrix& aTransform, const SkPath& aPath, FillRule aFillRule) @@ -202,4 +203,5 @@ void PathSkia::StreamToSink(PathSink* aSink) const { } } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/ScaledFontFontconfig.cpp b/gfx/2d/ScaledFontFontconfig.cpp index c423966b8a2c..e62248c5f0a3 100644 --- a/gfx/2d/ScaledFontFontconfig.cpp +++ b/gfx/2d/ScaledFontFontconfig.cpp @@ -21,7 +21,8 @@ #include FT_LCD_FILTER_H #include FT_MULTIPLE_MASTERS_H -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { ScaledFontFontconfig::ScaledFontFontconfig( RefPtr&& aFace, FcPattern* aPattern, @@ -520,4 +521,5 @@ already_AddRefed UnscaledFontFontconfig::CreateFromFontDescriptor( return unscaledFont.forget(); } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/SourceSurfaceSkia.cpp b/gfx/2d/SourceSurfaceSkia.cpp index cb685a92ef6b..d46ba1b0dfa1 100644 --- a/gfx/2d/SourceSurfaceSkia.cpp +++ b/gfx/2d/SourceSurfaceSkia.cpp @@ -12,7 +12,8 @@ #include "skia/include/core/SkData.h" #include "mozilla/CheckedInt.h" -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { SourceSurfaceSkia::SourceSurfaceSkia() : mFormat(SurfaceFormat::UNKNOWN), @@ -170,4 +171,5 @@ void SourceSurfaceSkia::DrawTargetWillChange() { } } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/SwizzleAVX2.cpp b/gfx/2d/SwizzleAVX2.cpp index fe8fbf453001..7c618e38785c 100644 --- a/gfx/2d/SwizzleAVX2.cpp +++ b/gfx/2d/SwizzleAVX2.cpp @@ -9,7 +9,8 @@ #include #include -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { template void UnpackRowRGB24_SSSE3(const uint8_t* aSrc, uint8_t* aDst, int32_t aLength); @@ -80,4 +81,5 @@ void UnpackRowRGB24_AVX2(const uint8_t* aSrc, uint8_t* aDst, int32_t aLength) { template void UnpackRowRGB24_AVX2(const uint8_t*, uint8_t*, int32_t); template void UnpackRowRGB24_AVX2(const uint8_t*, uint8_t*, int32_t); -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/SwizzleSSE2.cpp b/gfx/2d/SwizzleSSE2.cpp index 297c81945c84..38e016809531 100644 --- a/gfx/2d/SwizzleSSE2.cpp +++ b/gfx/2d/SwizzleSSE2.cpp @@ -8,7 +8,8 @@ #include -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { // Load 1-3 pixels into a 4 pixel vector. static MOZ_ALWAYS_INLINE __m128i LoadRemainder_SSE2(const uint8_t* aSrc, @@ -371,4 +372,5 @@ template void Swizzle_SSE2(const uint8_t*, int32_t, uint8_t*, template void Swizzle_SSE2(const uint8_t*, int32_t, uint8_t*, int32_t, IntSize); -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/SwizzleSSSE3.cpp b/gfx/2d/SwizzleSSSE3.cpp index eac5d856fb6c..9a483c4fc10a 100644 --- a/gfx/2d/SwizzleSSSE3.cpp +++ b/gfx/2d/SwizzleSSSE3.cpp @@ -9,7 +9,8 @@ #include #include -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { template void UnpackRowRGB24(const uint8_t* aSrc, uint8_t* aDst, int32_t aLength); @@ -62,4 +63,5 @@ void UnpackRowRGB24_SSSE3(const uint8_t* aSrc, uint8_t* aDst, int32_t aLength) { template void UnpackRowRGB24_SSSE3(const uint8_t*, uint8_t*, int32_t); template void UnpackRowRGB24_SSSE3(const uint8_t*, uint8_t*, int32_t); -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/UnscaledFontFreeType.cpp b/gfx/2d/UnscaledFontFreeType.cpp index e73094b9672d..ffdf407d0ee2 100644 --- a/gfx/2d/UnscaledFontFreeType.cpp +++ b/gfx/2d/UnscaledFontFreeType.cpp @@ -20,7 +20,8 @@ #include #include -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { bool UnscaledFontFreeType::GetFontFileData(FontFileDataOutput aDataCallback, void* aBaton) { @@ -190,4 +191,5 @@ void UnscaledFontFreeType::ApplyVariationsToFace( } } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/gl/GLContextProviderGLX.cpp b/gfx/gl/GLContextProviderGLX.cpp index b605492c93b3..cad050294f76 100644 --- a/gfx/gl/GLContextProviderGLX.cpp +++ b/gfx/gl/GLContextProviderGLX.cpp @@ -46,7 +46,8 @@ # include "gfxPlatformGtk.h" #endif -namespace mozilla::gl { +namespace mozilla { +namespace gl { using namespace mozilla::gfx; using namespace mozilla::widget; @@ -1051,4 +1052,5 @@ GLContext* GLContextProviderGLX::GetGlobalContext() { /*static*/ void GLContextProviderGLX::Shutdown() {} -} // namespace mozilla::gl +} /* namespace gl */ +} /* namespace mozilla */ diff --git a/gfx/gl/GLContextProviderWayland.cpp b/gfx/gl/GLContextProviderWayland.cpp index c4c10bb4ffc2..b773802c7e51 100644 --- a/gfx/gl/GLContextProviderWayland.cpp +++ b/gfx/gl/GLContextProviderWayland.cpp @@ -10,7 +10,8 @@ #include "GLContextProvider.h" -namespace mozilla::gl { +namespace mozilla { +namespace gl { using namespace mozilla::gfx; using namespace mozilla::widget; @@ -80,4 +81,5 @@ void GLContextProviderWayland::Shutdown() { } } -} // namespace mozilla::gl +} /* namespace gl */ +} /* namespace mozilla */ diff --git a/gfx/gl/GLScreenBuffer.cpp b/gfx/gl/GLScreenBuffer.cpp index be0f8736dcb0..ef34c71f4ad3 100644 --- a/gfx/gl/GLScreenBuffer.cpp +++ b/gfx/gl/GLScreenBuffer.cpp @@ -34,7 +34,8 @@ # include "SharedSurfaceGLX.h" #endif -namespace mozilla::gl { +namespace mozilla { +namespace gl { using gfx::SurfaceFormat; @@ -769,4 +770,5 @@ void ReadBuffer::SetReadBuffer(GLenum userMode) const { mGL->fReadBuffer(internalMode); } -} // namespace mozilla::gl +} /* namespace gl */ +} /* namespace mozilla */ diff --git a/gfx/gl/SharedSurfaceGLX.cpp b/gfx/gl/SharedSurfaceGLX.cpp index 43d1251d07fe..74ca442e307a 100644 --- a/gfx/gl/SharedSurfaceGLX.cpp +++ b/gfx/gl/SharedSurfaceGLX.cpp @@ -16,7 +16,8 @@ #include "mozilla/layers/TextureForwarder.h" #include "mozilla/X11Util.h" -namespace mozilla::gl { +namespace mozilla { +namespace gl { /* static */ UniquePtr SharedSurface_GLXDrawable::Create( @@ -118,4 +119,5 @@ UniquePtr SurfaceFactory_GLXDrawable::CreateShared( mAllocator->IsSameProcess()); } -} // namespace mozilla::gl +} // namespace gl +} // namespace mozilla diff --git a/gfx/ipc/GPUParent.cpp b/gfx/ipc/GPUParent.cpp index cdf4292d7171..62c1592d20f9 100644 --- a/gfx/ipc/GPUParent.cpp +++ b/gfx/ipc/GPUParent.cpp @@ -73,7 +73,8 @@ # include "mozilla/SandboxTestingChild.h" #endif -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { using namespace ipc; using namespace layers; @@ -586,4 +587,5 @@ void GPUParent::ActorDestroy(ActorDestroyReason aWhy) { XRE_ShutdownChildProcess(); } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/layers/ImageContainer.cpp b/gfx/layers/ImageContainer.cpp index a12f11c7772d..988f68b9cb7e 100644 --- a/gfx/layers/ImageContainer.cpp +++ b/gfx/layers/ImageContainer.cpp @@ -40,7 +40,8 @@ # include "mozilla/layers/D3D11YCbCrImage.h" #endif -namespace mozilla::layers { +namespace mozilla { +namespace layers { using namespace mozilla::gfx; using namespace mozilla::ipc; @@ -799,4 +800,5 @@ ImageContainer::ProducerID ImageContainer::AllocateProducerID() { return ++sProducerID; } -} // namespace mozilla::layers +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/basic/BasicImageLayer.cpp b/gfx/layers/basic/BasicImageLayer.cpp index c6a985610202..736663fd1e76 100644 --- a/gfx/layers/basic/BasicImageLayer.cpp +++ b/gfx/layers/basic/BasicImageLayer.cpp @@ -20,7 +20,8 @@ using namespace mozilla::gfx; -namespace mozilla::layers { +namespace mozilla { +namespace layers { class BasicImageLayer : public ImageLayer, public BasicImplData { public: @@ -105,4 +106,5 @@ already_AddRefed BasicLayerManager::CreateImageLayer() { return layer.forget(); } -} // namespace mozilla::layers +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/basic/TextureClientX11.cpp b/gfx/layers/basic/TextureClientX11.cpp index 68771d302661..dcc8abb3cdcb 100644 --- a/gfx/layers/basic/TextureClientX11.cpp +++ b/gfx/layers/basic/TextureClientX11.cpp @@ -22,7 +22,8 @@ using namespace mozilla; using namespace mozilla::gfx; -namespace mozilla::layers { +namespace mozilla { +namespace layers { X11TextureData::X11TextureData(gfx::IntSize aSize, gfx::SurfaceFormat aFormat, bool aClientDeallocation, bool aIsCrossProcess, @@ -136,4 +137,5 @@ X11TextureData* X11TextureData::Create(gfx::IntSize aSize, return texture; } -} // namespace mozilla::layers +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/basic/X11TextureSourceBasic.cpp b/gfx/layers/basic/X11TextureSourceBasic.cpp index b987f1ba1b3c..2e5effc10b18 100644 --- a/gfx/layers/basic/X11TextureSourceBasic.cpp +++ b/gfx/layers/basic/X11TextureSourceBasic.cpp @@ -8,7 +8,8 @@ #include "gfxXlibSurface.h" #include "gfx2DGlue.h" -namespace mozilla::layers { +namespace mozilla { +namespace layers { using namespace mozilla::gfx; @@ -45,4 +46,5 @@ SurfaceFormat X11TextureSourceBasic::ContentTypeToSurfaceFormat( } } -} // namespace mozilla::layers +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp index bace40221d52..73cc79a26d64 100644 --- a/gfx/layers/client/TextureClient.cpp +++ b/gfx/layers/client/TextureClient.cpp @@ -70,7 +70,8 @@ } while (0) #endif -namespace mozilla::layers { +namespace mozilla { +namespace layers { using namespace mozilla::ipc; using namespace mozilla::gl; @@ -1906,4 +1907,5 @@ bool MappedYCbCrChannelData::CopyInto(MappedYCbCrChannelData& aDst) { return true; } -} // namespace mozilla::layers +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/composite/X11TextureHost.cpp b/gfx/layers/composite/X11TextureHost.cpp index 5bbb7a82c85b..dbbbb4300e76 100644 --- a/gfx/layers/composite/X11TextureHost.cpp +++ b/gfx/layers/composite/X11TextureHost.cpp @@ -14,7 +14,8 @@ #include "gfxPlatform.h" #include "gfxXlibSurface.h" -namespace mozilla::layers { +namespace mozilla { +namespace layers { using namespace mozilla::gfx; @@ -100,4 +101,5 @@ already_AddRefed X11TextureHost::GetAsSurface() { return surf->GetDataSurface(); } -} // namespace mozilla::layers +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/opengl/WaylandDMABUFTextureClientOGL.cpp b/gfx/layers/opengl/WaylandDMABUFTextureClientOGL.cpp index 9ab5d2b563fc..02b825fa3443 100644 --- a/gfx/layers/opengl/WaylandDMABUFTextureClientOGL.cpp +++ b/gfx/layers/opengl/WaylandDMABUFTextureClientOGL.cpp @@ -8,7 +8,8 @@ #include "mozilla/widget/WaylandDMABufSurface.h" #include "gfxPlatform.h" -namespace mozilla::layers { +namespace mozilla { +namespace layers { using namespace gfx; @@ -102,4 +103,5 @@ bool WaylandDMABUFTextureData::UpdateFromSurface(gfx::SourceSurface* aSurface) { return true; } -} // namespace mozilla::layers +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/opengl/WaylandDMABUFTextureHostOGL.cpp b/gfx/layers/opengl/WaylandDMABUFTextureHostOGL.cpp index 0e945d9b642d..aa86a9bb9f72 100644 --- a/gfx/layers/opengl/WaylandDMABUFTextureHostOGL.cpp +++ b/gfx/layers/opengl/WaylandDMABUFTextureHostOGL.cpp @@ -11,7 +11,8 @@ #include "mozilla/webrender/WebRenderAPI.h" #include "GLContextEGL.h" -namespace mozilla::layers { +namespace mozilla { +namespace layers { WaylandDMABUFTextureHostOGL::WaylandDMABUFTextureHostOGL( TextureFlags aFlags, const SurfaceDescriptor& aDesc) @@ -134,4 +135,5 @@ void WaylandDMABUFTextureHostOGL::PushDisplayItems( !(mFlags & TextureFlags::NON_PREMULTIPLIED)); } -} // namespace mozilla::layers +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/opengl/X11TextureSourceOGL.cpp b/gfx/layers/opengl/X11TextureSourceOGL.cpp index d0c9db0fd2cd..968cc79e803b 100644 --- a/gfx/layers/opengl/X11TextureSourceOGL.cpp +++ b/gfx/layers/opengl/X11TextureSourceOGL.cpp @@ -9,7 +9,8 @@ #include "gfx2DGlue.h" #include "GLContext.h" -namespace mozilla::layers { +namespace mozilla { +namespace layers { using namespace mozilla::gfx; @@ -86,4 +87,5 @@ SurfaceFormat X11TextureSourceOGL::ContentTypeToSurfaceFormat( } } -} // namespace mozilla::layers +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/wr/WebRenderTextureHost.cpp b/gfx/layers/wr/WebRenderTextureHost.cpp index aae301152e28..aec3d4dc8385 100644 --- a/gfx/layers/wr/WebRenderTextureHost.cpp +++ b/gfx/layers/wr/WebRenderTextureHost.cpp @@ -15,7 +15,8 @@ # include "mozilla/layers/TextureHostOGL.h" #endif -namespace mozilla::layers { +namespace mozilla { +namespace layers { WebRenderTextureHost::WebRenderTextureHost( const SurfaceDescriptor& aDesc, TextureFlags aFlags, TextureHost* aTexture, @@ -229,4 +230,5 @@ bool WebRenderTextureHost::NeedsYFlip() const { return yFlip; } -} // namespace mozilla::layers +} // namespace layers +} // namespace mozilla diff --git a/gfx/thebes/PrintTarget.cpp b/gfx/thebes/PrintTarget.cpp index 3960ff26605a..907a6deed269 100644 --- a/gfx/thebes/PrintTarget.cpp +++ b/gfx/thebes/PrintTarget.cpp @@ -23,7 +23,8 @@ // RFC: https://tools.ietf.org/html/rfc2911#section-4.1.2 #define IPP_JOB_NAME_LIMIT_LENGTH 255 -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { PrintTarget::PrintTarget(cairo_surface_t* aCairoSurface, const IntSize& aSize) : mCairoSurface(aCairoSurface), @@ -201,4 +202,5 @@ void PrintTarget::RegisterPageDoneCallback(PageDoneCallback&& aCallback) { void PrintTarget::UnregisterPageDoneCallback() { mPageDoneCallback = nullptr; } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/thebes/PrintTargetPDF.cpp b/gfx/thebes/PrintTargetPDF.cpp index 8dd98ff569ec..fe97bbcd3026 100644 --- a/gfx/thebes/PrintTargetPDF.cpp +++ b/gfx/thebes/PrintTargetPDF.cpp @@ -8,7 +8,8 @@ #include "cairo.h" #include "cairo-pdf.h" -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { static cairo_status_t write_func(void* closure, const unsigned char* data, unsigned int length) { @@ -68,4 +69,5 @@ void PrintTargetPDF::Finish() { mStream->Close(); } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/thebes/PrintTargetPS.cpp b/gfx/thebes/PrintTargetPS.cpp index cc2d94bcb8c1..3b888bd1983b 100644 --- a/gfx/thebes/PrintTargetPS.cpp +++ b/gfx/thebes/PrintTargetPS.cpp @@ -8,7 +8,8 @@ #include "cairo.h" #include "cairo-ps.h" -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { static cairo_status_t write_func(void* closure, const unsigned char* data, unsigned int length) { @@ -93,4 +94,5 @@ void PrintTargetPS::Finish() { mStream->Close(); } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/thebes/PrintTargetSkPDF.cpp b/gfx/thebes/PrintTargetSkPDF.cpp index 4c7af1644b31..29cb48d6c651 100644 --- a/gfx/thebes/PrintTargetSkPDF.cpp +++ b/gfx/thebes/PrintTargetSkPDF.cpp @@ -9,7 +9,8 @@ #include "nsString.h" #include -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { PrintTargetSkPDF::PrintTargetSkPDF(const IntSize& aSize, UniquePtr aStream) @@ -123,4 +124,5 @@ already_AddRefed PrintTargetSkPDF::GetReferenceDrawTarget() { return do_AddRef(mRefDT); } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/thebes/PrintTargetThebes.cpp b/gfx/thebes/PrintTargetThebes.cpp index 8516e1aac2f5..8a066d5690a3 100644 --- a/gfx/thebes/PrintTargetThebes.cpp +++ b/gfx/thebes/PrintTargetThebes.cpp @@ -9,7 +9,8 @@ #include "gfxPlatform.h" #include "mozilla/gfx/Logging.h" -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { /* static */ already_AddRefed PrintTargetThebes::CreateOrNull( @@ -95,4 +96,5 @@ nsresult PrintTargetThebes::EndPage() { void PrintTargetThebes::Finish() { return mGfxSurface->Finish(); } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/vr/VRManager.cpp b/gfx/vr/VRManager.cpp index 28d5bcdfe1d6..948f03459fda 100644 --- a/gfx/vr/VRManager.cpp +++ b/gfx/vr/VRManager.cpp @@ -48,7 +48,8 @@ using namespace mozilla::gfx; using namespace mozilla::layers; using namespace mozilla::gl; -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { /** * When VR content is active, we run the tasks at 1ms @@ -1530,4 +1531,5 @@ VRManager::Observe(nsISupports* subject, const char* topic, NS_IMPL_ISUPPORTS(VRManager, nsIObserver) -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/vr/VRPuppetCommandBuffer.cpp b/gfx/vr/VRPuppetCommandBuffer.cpp index 6338d77fdd1a..d73bf30482a0 100644 --- a/gfx/vr/VRPuppetCommandBuffer.cpp +++ b/gfx/vr/VRPuppetCommandBuffer.cpp @@ -8,7 +8,8 @@ #include "prthread.h" #include "mozilla/ClearOnShutdown.h" -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { static StaticRefPtr sVRPuppetCommandBufferSingleton; @@ -507,4 +508,5 @@ void VRPuppetCommandBuffer::EncodeStruct(nsTArray& aBuffer, purgeBuffer(); } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/vr/ipc/VRLayerChild.cpp b/gfx/vr/ipc/VRLayerChild.cpp index ed2815261bcc..d0d3afcb5b6c 100644 --- a/gfx/vr/ipc/VRLayerChild.cpp +++ b/gfx/vr/ipc/VRLayerChild.cpp @@ -16,7 +16,8 @@ #include "mozilla/dom/HTMLCanvasElement.h" #include "mozilla/layers/SyncObject.h" // for SyncObjectClient -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { VRLayerChild::VRLayerChild() : mCanvasElement(nullptr), mIPCOpen(false), mLastSubmittedFrameId(0) { @@ -139,4 +140,5 @@ void VRLayerChild::ReleaseIPDLReference() { Release(); } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/vr/service/OpenVRSession.cpp b/gfx/vr/service/OpenVRSession.cpp index dc601063b412..ca934860a86b 100644 --- a/gfx/vr/service/OpenVRSession.cpp +++ b/gfx/vr/service/OpenVRSession.cpp @@ -51,7 +51,8 @@ const uint32_t kVRHapticUpdateInterval = 5; using namespace mozilla::gfx; -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { namespace { @@ -2363,4 +2364,5 @@ void OpenVRSession::UpdateTelemetry(VRSystemState& aSystemState) { aSystemState.displayState.droppedFrameCount = stats.m_nNumReprojectedFrames; } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/vr/service/PuppetSession.cpp b/gfx/vr/service/PuppetSession.cpp index c8b81b4a405c..8a8188b06abf 100644 --- a/gfx/vr/service/PuppetSession.cpp +++ b/gfx/vr/service/PuppetSession.cpp @@ -19,7 +19,8 @@ using namespace mozilla::gfx; -namespace mozilla::gfx { +namespace mozilla { +namespace gfx { PuppetSession::PuppetSession() : VRSession() {} @@ -115,4 +116,5 @@ void PuppetSession::StopAllHaptics() { VRPuppetCommandBuffer::Get().StopAllHaptics(); } -} // namespace mozilla::gfx +} // namespace gfx +} // namespace mozilla diff --git a/gfx/webrender_bindings/RenderCompositorEGL.cpp b/gfx/webrender_bindings/RenderCompositorEGL.cpp index 8ee25cb67d14..ed9bbda9dede 100644 --- a/gfx/webrender_bindings/RenderCompositorEGL.cpp +++ b/gfx/webrender_bindings/RenderCompositorEGL.cpp @@ -26,7 +26,8 @@ # include #endif -namespace mozilla::wr { +namespace mozilla { +namespace wr { /* static */ UniquePtr RenderCompositorEGL::Create( @@ -119,7 +120,7 @@ bool RenderCompositorEGL::Resume() { EGLNativeWindowType window = mWidget->AsAndroid()->GetEGLNativeWindow(); JNIEnv* const env = jni::GetEnvForThread(); ANativeWindow* const nativeWindow = - ANativeWindow_fromSurface(env, reinterpret_cast(window)); + ANativeWindow_fromSurface(env, reinterpret_cast(window)); const int32_t width = ANativeWindow_getWidth(nativeWindow); const int32_t height = ANativeWindow_getHeight(nativeWindow); mEGLSurfaceSize = LayoutDeviceIntSize(width, height); @@ -175,4 +176,5 @@ LayoutDeviceIntSize RenderCompositorEGL::GetBufferSize() { #endif } -} // namespace mozilla::wr +} // namespace wr +} // namespace mozilla diff --git a/gfx/webrender_bindings/RenderWaylandDMABUFTextureHostOGL.cpp b/gfx/webrender_bindings/RenderWaylandDMABUFTextureHostOGL.cpp index 419e4c816af5..da5de53d1d69 100644 --- a/gfx/webrender_bindings/RenderWaylandDMABUFTextureHostOGL.cpp +++ b/gfx/webrender_bindings/RenderWaylandDMABUFTextureHostOGL.cpp @@ -10,7 +10,8 @@ #include "mozilla/gfx/Logging.h" #include "ScopedGLHelpers.h" -namespace mozilla::wr { +namespace mozilla { +namespace wr { RenderWaylandDMABUFTextureHostOGL::RenderWaylandDMABUFTextureHostOGL( WaylandDMABufSurface* aSurface) @@ -90,4 +91,5 @@ void RenderWaylandDMABUFTextureHostOGL::DeleteTextureHandle() { } } -} // namespace mozilla::wr +} // namespace wr +} // namespace mozilla diff --git a/hal/Hal.cpp b/hal/Hal.cpp index f3646b3a9b3b..5f99271db9df 100644 --- a/hal/Hal.cpp +++ b/hal/Hal.cpp @@ -51,7 +51,8 @@ using namespace mozilla::dom; } \ } while (0) -namespace mozilla::hal { +namespace mozilla { +namespace hal { static bool sInitialized = false; @@ -479,4 +480,5 @@ void Shutdown() { sInitialized = false; } -} // namespace mozilla::hal +} // namespace hal +} // namespace mozilla diff --git a/ipc/glue/BackgroundChildImpl.cpp b/ipc/glue/BackgroundChildImpl.cpp index 1a650ea46df1..68470941ba2c 100644 --- a/ipc/glue/BackgroundChildImpl.cpp +++ b/ipc/glue/BackgroundChildImpl.cpp @@ -80,7 +80,8 @@ class TestChild final : public mozilla::ipc::PBackgroundTestChild { } // namespace -namespace mozilla::ipc { +namespace mozilla { +namespace ipc { using mozilla::dom::UDPSocketChild; using mozilla::net::PUDPSocketChild; @@ -756,7 +757,8 @@ PFileDescriptorSetChild* BackgroundChildImpl::SendPFileDescriptorSetConstructor( return PBackgroundChild::SendPFileDescriptorSetConstructor(aFD); } -} // namespace mozilla::ipc +} // namespace ipc +} // namespace mozilla mozilla::ipc::IPCResult TestChild::Recv__delete__(const nsCString& aTestArg) { MOZ_RELEASE_ASSERT(aTestArg == mTestArg, diff --git a/ipc/glue/BackgroundParentImpl.cpp b/ipc/glue/BackgroundParentImpl.cpp index 668d254eb107..a3a5cdff40f1 100644 --- a/ipc/glue/BackgroundParentImpl.cpp +++ b/ipc/glue/BackgroundParentImpl.cpp @@ -112,7 +112,8 @@ class TestParent final : public mozilla::ipc::PBackgroundTestParent { } // namespace -namespace mozilla::ipc { +namespace mozilla { +namespace ipc { using mozilla::dom::BroadcastChannelParent; using mozilla::dom::ContentParent; @@ -1304,7 +1305,8 @@ BackgroundParentImpl::SendPFileDescriptorSetConstructor( return PBackgroundParent::SendPFileDescriptorSetConstructor(aFD); } -} // namespace mozilla::ipc +} // namespace ipc +} // namespace mozilla void TestParent::ActorDestroy(ActorDestroyReason aWhy) { mozilla::ipc::AssertIsInMainOrSocketProcess(); diff --git a/ipc/glue/FileDescriptorSetChild.cpp b/ipc/glue/FileDescriptorSetChild.cpp index 8f2f062e5bda..8a1b3f38c719 100644 --- a/ipc/glue/FileDescriptorSetChild.cpp +++ b/ipc/glue/FileDescriptorSetChild.cpp @@ -6,7 +6,8 @@ #include "FileDescriptorSetChild.h" -namespace mozilla::ipc { +namespace mozilla { +namespace ipc { FileDescriptorSetChild::FileDescriptorSetChild( const FileDescriptor& aFileDescriptor) { @@ -29,4 +30,5 @@ mozilla::ipc::IPCResult FileDescriptorSetChild::RecvAddFileDescriptor( return IPC_OK(); } -} // namespace mozilla::ipc +} // namespace ipc +} // namespace mozilla diff --git a/ipc/glue/FileDescriptorSetParent.cpp b/ipc/glue/FileDescriptorSetParent.cpp index 3c42ea681e90..583b183b215e 100644 --- a/ipc/glue/FileDescriptorSetParent.cpp +++ b/ipc/glue/FileDescriptorSetParent.cpp @@ -6,7 +6,8 @@ #include "FileDescriptorSetParent.h" -namespace mozilla::ipc { +namespace mozilla { +namespace ipc { FileDescriptorSetParent::FileDescriptorSetParent( const FileDescriptor& aFileDescriptor) { @@ -31,4 +32,5 @@ mozilla::ipc::IPCResult FileDescriptorSetParent::RecvAddFileDescriptor( return IPC_OK(); } -} // namespace mozilla::ipc +} // namespace ipc +} // namespace mozilla diff --git a/js/ductwork/debugger/JSDebugger.cpp b/js/ductwork/debugger/JSDebugger.cpp index 47803585605e..cebfafefedd3 100644 --- a/js/ductwork/debugger/JSDebugger.cpp +++ b/js/ductwork/debugger/JSDebugger.cpp @@ -21,7 +21,8 @@ } \ } -namespace mozilla::jsdebugger { +namespace mozilla { +namespace jsdebugger { NS_IMPL_ISUPPORTS(JSDebugger, IJSDebugger) @@ -68,4 +69,5 @@ JSDebugger::AddClass(JS::Handle global, JSContext* cx) { return NS_OK; } -} // namespace mozilla::jsdebugger +} // namespace jsdebugger +} // namespace mozilla diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp index fca6ff9a9e14..ba57455323b4 100644 --- a/js/src/ctypes/CTypes.cpp +++ b/js/src/ctypes/CTypes.cpp @@ -64,7 +64,8 @@ using mozilla::IsAsciiDigit; using JS::AutoCheckCannotGC; using JS::AutoStableStringChars; -namespace js::ctypes { +namespace js { +namespace ctypes { static bool HasUnpairedSurrogate(const char16_t* chars, size_t nchars, char16_t* unpaired) { @@ -2318,7 +2319,8 @@ static bool GetObjectProperty(JSContext* cx, HandleObject obj, return true; } -} // namespace js::ctypes +} /* namespace ctypes */ +} /* namespace js */ using namespace js; using namespace js::ctypes; diff --git a/js/src/ctypes/Library.cpp b/js/src/ctypes/Library.cpp index 9455b1c956f4..4a7b1eaa78b7 100644 --- a/js/src/ctypes/Library.cpp +++ b/js/src/ctypes/Library.cpp @@ -17,7 +17,8 @@ using JS::AutoStableStringChars; -namespace js::ctypes { +namespace js { +namespace ctypes { /******************************************************************************* ** JSAPI function prototypes @@ -402,4 +403,5 @@ bool Library::Declare(JSContext* cx, unsigned argc, Value* vp) { return true; } -} // namespace js::ctypes +} // namespace ctypes +} // namespace js diff --git a/js/src/frontend/BinASTParser.cpp b/js/src/frontend/BinASTParser.cpp index dc1a19ed3fd3..1a98728baa39 100644 --- a/js/src/frontend/BinASTParser.cpp +++ b/js/src/frontend/BinASTParser.cpp @@ -33,7 +33,8 @@ using JS::RegExpFlag; using JS::RegExpFlags; -namespace js::frontend { +namespace js { +namespace frontend { // Compare a bunch of `uint8_t` values (as returned by the tokenizer_) with // a string literal (and ONLY a string literal). @@ -5035,4 +5036,5 @@ JS::Result BinASTParser::parseOptionalStatement( template class BinASTParser; template class BinASTParser; -} // namespace js::frontend +} // namespace frontend +} // namespace js diff --git a/js/src/frontend/BinASTParserBase.cpp b/js/src/frontend/BinASTParserBase.cpp index db51bdb5fe00..d00e3c6e4cc3 100644 --- a/js/src/frontend/BinASTParserBase.cpp +++ b/js/src/frontend/BinASTParserBase.cpp @@ -8,11 +8,13 @@ #include "vm/JSContext-inl.h" -namespace js::frontend { +namespace js { +namespace frontend { BinASTParserBase::BinASTParserBase(JSContext* cx, ParseInfo& parseInfo, HandleScriptSourceObject sourceObject) : ParserSharedBase(cx, parseInfo, sourceObject, ParserSharedBase::Kind::BinASTParser) {} -} // namespace js::frontend +} // namespace frontend +} // namespace js diff --git a/js/src/frontend/BinASTParserPerTokenizer.cpp b/js/src/frontend/BinASTParserPerTokenizer.cpp index 4e774a4187e3..3e4bde7f0227 100644 --- a/js/src/frontend/BinASTParserPerTokenizer.cpp +++ b/js/src/frontend/BinASTParserPerTokenizer.cpp @@ -74,7 +74,8 @@ // // They should be treated lazily (whenever we open a subscope), like bindings. -namespace js::frontend { +namespace js { +namespace frontend { using UsedNamePtr = UsedNameTracker::UsedNameMap::Ptr; @@ -810,4 +811,5 @@ BinASTParserPerTokenizer::asFinalParser() const { template class BinASTParserPerTokenizer; template class BinASTParserPerTokenizer; -} // namespace js::frontend +} // namespace frontend +} // namespace js diff --git a/js/src/frontend/BinASTRuntimeSupport.cpp b/js/src/frontend/BinASTRuntimeSupport.cpp index 5da6001ef862..a04569a2de1b 100644 --- a/js/src/frontend/BinASTRuntimeSupport.cpp +++ b/js/src/frontend/BinASTRuntimeSupport.cpp @@ -12,7 +12,8 @@ #include "js/Utility.h" // js_malloc #include "vm/StringType.h" // JSAtom -namespace js::frontend { +namespace js { +namespace frontend { BinASTSourceMetadata::~BinASTSourceMetadata() { if (isMultipart()) { @@ -110,4 +111,6 @@ void BinASTSourceMetadataContext::release() { } } -} // namespace js::frontend +} // namespace frontend + +} // namespace js diff --git a/js/src/frontend/BinASTTokenReaderBase.cpp b/js/src/frontend/BinASTTokenReaderBase.cpp index ef1f8e3962a5..575aed875fb3 100644 --- a/js/src/frontend/BinASTTokenReaderBase.cpp +++ b/js/src/frontend/BinASTTokenReaderBase.cpp @@ -9,7 +9,8 @@ #include "frontend/BinAST-macros.h" #include "js/Result.h" -namespace js::frontend { +namespace js { +namespace frontend { template using ErrorResult = mozilla::GenericErrorResult; @@ -104,4 +105,5 @@ JS::Result BinASTTokenReaderBase::readByte() { return *current_++; } -} // namespace js::frontend +} // namespace frontend +} // namespace js diff --git a/js/src/frontend/BinASTTokenReaderContext.cpp b/js/src/frontend/BinASTTokenReaderContext.cpp index bc7582c0fe27..5befb5cabc3f 100644 --- a/js/src/frontend/BinASTTokenReaderContext.cpp +++ b/js/src/frontend/BinASTTokenReaderContext.cpp @@ -26,7 +26,8 @@ #include "vm/JSAtom.h" // AtomizeWTF8Chars #include "vm/JSScript.h" // ScriptSource -namespace js::frontend { +namespace js { +namespace frontend { #ifdef BINAST_CX_MAGIC_HEADER // Context 0.1 doesn't implement the planned // magic header. @@ -3268,4 +3269,6 @@ mozilla::detail::IntegerRange HuffmanLookup::suffixes( return mozilla::IntegerRange(first, last + 1); } -} // namespace js::frontend +} // namespace frontend + +} // namespace js diff --git a/js/src/frontend/BinASTTokenReaderMultipart.cpp b/js/src/frontend/BinASTTokenReaderMultipart.cpp index 86d1eb4d2f07..e419a9755db3 100644 --- a/js/src/frontend/BinASTTokenReaderMultipart.cpp +++ b/js/src/frontend/BinASTTokenReaderMultipart.cpp @@ -20,7 +20,8 @@ #include "js/Result.h" -namespace js::frontend { +namespace js { +namespace frontend { // The magic header, at the start of every binjs file. const char MAGIC_HEADER[] = "BINJS"; @@ -473,4 +474,6 @@ JS::Result BinASTTokenReaderMultipart::AutoTaggedTuple::done() { return Ok(); } -} // namespace js::frontend +} // namespace frontend + +} // namespace js diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index 2c6b445ee785..64d037d50b27 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -79,7 +79,8 @@ using JS::AutoGCRooter; using JS::ReadOnlyCompileOptions; using JS::RegExpFlags; -namespace js::frontend { +namespace js { +namespace frontend { using DeclaredNamePtr = ParseContext::Scope::DeclaredNamePtr; using AddDeclaredNamePtr = ParseContext::Scope::AddDeclaredNamePtr; @@ -10874,4 +10875,5 @@ template class Parser; template class Parser; template class Parser; -} // namespace js::frontend +} /* namespace frontend */ +} /* namespace js */ diff --git a/js/src/vtune/VTuneWrapper.cpp b/js/src/vtune/VTuneWrapper.cpp index d677b64fffe8..d96a56b48490 100644 --- a/js/src/vtune/VTuneWrapper.cpp +++ b/js/src/vtune/VTuneWrapper.cpp @@ -15,7 +15,8 @@ #include "vm/Realm.h" #include "vm/Shape.h" -namespace js::vtune { +namespace js { +namespace vtune { // VTune internals are not known to be threadsafe. static Mutex* VTuneMutex = nullptr; @@ -160,4 +161,5 @@ void UnmarkBytes(void* bytes, unsigned size) { if (ok != 1) printf("[!] VTune Integration: Failed to unload method.\n"); } -} // namespace js::vtune +} // namespace vtune +} // namespace js diff --git a/layout/ipc/VsyncChild.cpp b/layout/ipc/VsyncChild.cpp index c1e9908f78c8..ec3662c2f3e7 100644 --- a/layout/ipc/VsyncChild.cpp +++ b/layout/ipc/VsyncChild.cpp @@ -10,7 +10,8 @@ #include "mozilla/VsyncDispatcher.h" #include "nsThreadUtils.h" -namespace mozilla::layout { +namespace mozilla { +namespace layout { VsyncChild::VsyncChild() : mObservingVsync(false), @@ -90,4 +91,5 @@ mozilla::ipc::IPCResult VsyncChild::RecvVsyncRate(const float& aVsyncRate) { return IPC_OK(); } -} // namespace mozilla::layout +} // namespace layout +} // namespace mozilla diff --git a/media/mtransport/WebrtcTCPSocketWrapper.cpp b/media/mtransport/WebrtcTCPSocketWrapper.cpp index 11bda0cd2ccb..e72cf0beb614 100644 --- a/media/mtransport/WebrtcTCPSocketWrapper.cpp +++ b/media/mtransport/WebrtcTCPSocketWrapper.cpp @@ -15,7 +15,8 @@ #include "nr_socket_proxy_config.h" -namespace mozilla::net { +namespace mozilla { +namespace net { using std::shared_ptr; @@ -121,4 +122,5 @@ void WebrtcTCPSocketWrapper::OnConnected(const nsCString& aProxyType) { &WebrtcTCPSocketCallback::OnConnected, aProxyType))); } -} // namespace mozilla::net +} // namespace net +} // namespace mozilla diff --git a/mfbt/RecordReplay.cpp b/mfbt/RecordReplay.cpp index 2f0df117f498..2de37fe4b172 100644 --- a/mfbt/RecordReplay.cpp +++ b/mfbt/RecordReplay.cpp @@ -22,7 +22,8 @@ # include #endif -namespace mozilla::recordreplay { +namespace mozilla { +namespace recordreplay { // clang-format off #define FOR_EACH_INTERFACE(Macro) \ @@ -179,4 +180,5 @@ bool gIsMiddleman; #undef ENABLE_RECORD_REPLAY -} // namespace mozilla::recordreplay +} // namespace recordreplay +} // namespace mozilla diff --git a/netwerk/base/NetworkInfoServiceLinux.cpp b/netwerk/base/NetworkInfoServiceLinux.cpp index 9b42ad6dbdb5..13fb0dbea7da 100644 --- a/netwerk/base/NetworkInfoServiceLinux.cpp +++ b/netwerk/base/NetworkInfoServiceLinux.cpp @@ -17,7 +17,8 @@ #include "NetworkInfoServiceImpl.h" -namespace mozilla::net { +namespace mozilla { +namespace net { static nsresult ListInterfaceAddresses(int aFd, const char* aIface, AddrMapType& aAddrMap); @@ -93,4 +94,5 @@ static nsresult ListInterfaceAddresses(int aFd, const char* aInterface, return NS_OK; } -} // namespace mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/base/nsNetworkInfoService.cpp b/netwerk/base/nsNetworkInfoService.cpp index 69610b9ef1c7..de891912b4ea 100644 --- a/netwerk/base/nsNetworkInfoService.cpp +++ b/netwerk/base/nsNetworkInfoService.cpp @@ -19,7 +19,8 @@ # error "Unsupported platform for nsNetworkInfoService! Check moz.build" #endif -namespace mozilla::net { +namespace mozilla { +namespace net { NS_IMPL_ISUPPORTS(nsNetworkInfoService, nsINetworkInfoService) @@ -92,4 +93,5 @@ nsresult nsNetworkInfoService::GetHostname(nsIGetHostnameListener* aListener) { return NS_OK; } -} // namespace mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/build/nsNetModule.cpp b/netwerk/build/nsNetModule.cpp index 13d5a8c6707d..1132ee45be88 100644 --- a/netwerk/build/nsNetModule.cpp +++ b/netwerk/build/nsNetModule.cpp @@ -81,7 +81,8 @@ nsresult nsCacheServiceConstructor(nsISupports* aOuter, const nsIID& aIID, #include "WebSocketChannel.h" #include "WebSocketChannelChild.h" -namespace mozilla::net { +namespace mozilla { +namespace net { static BaseWebSocketChannel* WebSocketChannelConstructor(bool aSecure) { if (IsNeckoChild()) { return new WebSocketChannelChild(aSecure); @@ -112,7 +113,8 @@ static BaseWebSocketChannel* WebSocketChannelConstructor(bool aSecure) { WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketChannel, false) WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketSSLChannel, true) #undef WEB_SOCKET_HANDLER_CONSTRUCTOR -} // namespace mozilla::net +} // namespace net +} // namespace mozilla /////////////////////////////////////////////////////////////////////////////// diff --git a/netwerk/cache2/AppCacheStorage.cpp b/netwerk/cache2/AppCacheStorage.cpp index cf8bb36c794a..c81258dce4db 100644 --- a/netwerk/cache2/AppCacheStorage.cpp +++ b/netwerk/cache2/AppCacheStorage.cpp @@ -19,7 +19,8 @@ #include "nsServiceManagerUtils.h" #include "nsThreadUtils.h" -namespace mozilla::net { +namespace mozilla { +namespace net { AppCacheStorage::AppCacheStorage(nsILoadContextInfo* aInfo, nsIApplicationCache* aAppCache) @@ -167,4 +168,5 @@ NS_IMETHODIMP AppCacheStorage::GetCacheIndexEntryAttrs( return NS_ERROR_NOT_IMPLEMENTED; } -} // namespace mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheStorage.cpp b/netwerk/cache2/CacheStorage.cpp index c1aab0749dd2..d26ceb87eb1b 100644 --- a/netwerk/cache2/CacheStorage.cpp +++ b/netwerk/cache2/CacheStorage.cpp @@ -19,7 +19,8 @@ #include "nsNetUtil.h" #include "nsServiceManagerUtils.h" -namespace mozilla::net { +namespace mozilla { +namespace net { NS_IMPL_ISUPPORTS(CacheStorage, nsICacheStorage) @@ -250,4 +251,5 @@ nsresult CacheStorage::ChooseApplicationCache(nsIURI* aURI, return NS_OK; } -} // namespace mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/dns/nsHostResolver.cpp b/netwerk/dns/nsHostResolver.cpp index b3215212764f..6147e380877c 100644 --- a/netwerk/dns/nsHostResolver.cpp +++ b/netwerk/dns/nsHostResolver.cpp @@ -82,7 +82,8 @@ static_assert( //---------------------------------------------------------------------------- -namespace mozilla::net { +namespace mozilla { +namespace net { LazyLogModule gHostResolverLog("nsHostResolver"); #define LOG(args) \ MOZ_LOG(mozilla::net::gHostResolverLog, mozilla::LogLevel::Debug, args) @@ -90,7 +91,8 @@ LazyLogModule gHostResolverLog("nsHostResolver"); MOZ_LOG(mozilla::net::gHostResolverLog, mozilla::LogLevel::Error, args) #define LOG_ENABLED() \ MOZ_LOG_TEST(mozilla::net::gHostResolverLog, mozilla::LogLevel::Debug) -} // namespace mozilla::net +} // namespace net +} // namespace mozilla //---------------------------------------------------------------------------- diff --git a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp index 76d88bdfb810..ee5033e8a097 100644 --- a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp +++ b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp @@ -37,7 +37,8 @@ #include "nsIProxiedChannel.h" #include "nsIProxyInfo.h" -namespace mozilla::net { +namespace mozilla { +namespace net { #define SUBRESOURCE_AUTH_DIALOG_DISALLOW_ALL 0 #define SUBRESOURCE_AUTH_DIALOG_DISALLOW_CROSS_ORIGIN 1 @@ -1663,4 +1664,5 @@ NS_IMPL_ISUPPORTS(nsHttpChannelAuthProvider, nsICancelable, nsIHttpChannelAuthProvider, nsIAuthPromptCallback, nsIHttpAuthenticatorCallback) -} // namespace mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index edbf1289c904..f37f932d787a 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -132,7 +132,8 @@ using mozilla::dom::Promise; -namespace mozilla::net { +namespace mozilla { +namespace net { LazyLogModule gHttpLog("nsHttp"); @@ -293,7 +294,8 @@ nsHttpHandler::nsHttpHandler() mNextChannelId(1), mLastActiveTabLoadOptimizationLock( "nsHttpConnectionMgr::LastActiveTabLoadOptimization"), - mSpdyBlacklistLock("nsHttpHandler::SpdyBlacklist"), + mSpdyBlacklistLock( + "nsHttpHandler::SpdyBlacklist"), mThroughCaptivePortal(false) { LOG(("Creating nsHttpHandler [this=%p].\n", this)); @@ -2723,4 +2725,5 @@ nsresult nsHttpHandler::CancelTransaction(HttpTransactionShell* trans, return mConnMgr->CancelTransaction(trans, reason); } -} // namespace mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/system/netlink/NetlinkService.cpp b/netwerk/system/netlink/NetlinkService.cpp index d803d3693a0d..fb3d0b47f287 100644 --- a/netwerk/system/netlink/NetlinkService.cpp +++ b/netwerk/system/netlink/NetlinkService.cpp @@ -35,7 +35,8 @@ /* a shorter name that better explains what it does */ #define EINTR_RETRY(x) MOZ_TEMP_FAILURE_RETRY(x) -namespace mozilla::net { +namespace mozilla { +namespace net { // period during which to absorb subsequent network change events, in // milliseconds @@ -1798,4 +1799,5 @@ void NetlinkService::GetIsLinkUp(bool* aIsUp) { *aIsUp = mLinkUp; } -} // namespace mozilla::net +} // namespace net +} // namespace mozilla diff --git a/storage/mozStorageBindingParams.cpp b/storage/mozStorageBindingParams.cpp index 17d91a86af99..d7ea5ad2a445 100644 --- a/storage/mozStorageBindingParams.cpp +++ b/storage/mozStorageBindingParams.cpp @@ -15,7 +15,8 @@ #include "mozStorageBindingParamsArray.h" #include "Variant.h" -namespace mozilla::storage { +namespace mozilla { +namespace storage { //////////////////////////////////////////////////////////////////////////////// //// Local Helper Objects @@ -431,4 +432,5 @@ BindingParams::BindAdoptedBlobByIndex(uint32_t aIndex, uint8_t* aValue, return BindByIndex(aIndex, value); } -} // namespace mozilla::storage +} // namespace storage +} // namespace mozilla diff --git a/storage/mozStorageConnection.cpp b/storage/mozStorageConnection.cpp index 11e6c9cb384b..bd746db66ed9 100644 --- a/storage/mozStorageConnection.cpp +++ b/storage/mozStorageConnection.cpp @@ -70,7 +70,8 @@ mozilla::LazyLogModule gStorageLog("mozStorage"); } while (0) #endif -namespace mozilla::storage { +namespace mozilla { +namespace storage { using mozilla::dom::quota::QuotaObject; @@ -2278,4 +2279,5 @@ Connection::GetQuotaObjects(QuotaObject** aDatabaseQuotaObject, return NS_OK; } -} // namespace mozilla::storage +} // namespace storage +} // namespace mozilla diff --git a/toolkit/components/ctypes/ctypes.cpp b/toolkit/components/ctypes/ctypes.cpp index 9b8b25b66273..baa56c94df9a 100644 --- a/toolkit/components/ctypes/ctypes.cpp +++ b/toolkit/components/ctypes/ctypes.cpp @@ -14,7 +14,8 @@ #include "nsZipArchive.h" #include "xpc_make_class.h" -namespace mozilla::ctypes { +namespace mozilla { +namespace ctypes { static char* UnicodeToNative(JSContext* cx, const char16_t* source, size_t slen) { @@ -97,4 +98,5 @@ Module::Call(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* obj, return NS_OK; } -} // namespace mozilla::ctypes +} // namespace ctypes +} // namespace mozilla diff --git a/toolkit/components/reflect/reflect.cpp b/toolkit/components/reflect/reflect.cpp index c41f6bc1adb9..3688e7b75acd 100644 --- a/toolkit/components/reflect/reflect.cpp +++ b/toolkit/components/reflect/reflect.cpp @@ -10,7 +10,8 @@ #include "nsNativeCharsetUtils.h" #include "xpc_make_class.h" -namespace mozilla::reflect { +namespace mozilla { +namespace reflect { NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable) @@ -34,4 +35,5 @@ Module::Call(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* obj, return NS_OK; } -} // namespace mozilla::reflect +} // namespace reflect +} // namespace mozilla diff --git a/toolkit/components/telemetry/core/Stopwatch.cpp b/toolkit/components/telemetry/core/Stopwatch.cpp index 598b6e944b2b..e41d8d50bc86 100644 --- a/toolkit/components/telemetry/core/Stopwatch.cpp +++ b/toolkit/components/telemetry/core/Stopwatch.cpp @@ -49,7 +49,8 @@ static void LogError(JSContext* aCx, const nsCString& aMessage) { } } -namespace mozilla::telemetry { +namespace mozilla { +namespace telemetry { class Timer final { public: @@ -427,4 +428,5 @@ void Stopwatch::SetTestModeEnabled(const dom::GlobalObject& aGlobal, Timers::Singleton().SuppressErrors() = aTesting; } -} // namespace mozilla::telemetry +} // namespace telemetry +} // namespace mozilla diff --git a/toolkit/components/telemetry/core/Telemetry.cpp b/toolkit/components/telemetry/core/Telemetry.cpp index 036375025e75..d0eea0c34094 100644 --- a/toolkit/components/telemetry/core/Telemetry.cpp +++ b/toolkit/components/telemetry/core/Telemetry.cpp @@ -1194,11 +1194,11 @@ static void internal_initFogotype(bool aUseTelemetry) { NS_WARNING("Couldn't find pingsender. Bailing on FOGotype"); return; } -# ifdef XP_WIN +#ifdef XP_WIN pingsender->Append(NS_LITERAL_STRING("pingsender.exe")); -# else +#else pingsender->Append(NS_LITERAL_STRING("pingsender")); -# endif +#endif nsAutoString pingsenderPath; rv = pingsender->GetPath(pingsenderPath); if (NS_FAILED(rv)) { @@ -1986,7 +1986,8 @@ void RecordShutdownEndTimeStamp() { // EXTERNALLY VISIBLE FUNCTIONS in mozilla::Telemetry:: // These are listed in Telemetry.h -namespace mozilla::Telemetry { +namespace mozilla { +namespace Telemetry { // The external API for controlling recording state void SetHistogramRecordingEnabled(HistogramID aID, bool aEnabled) { @@ -2206,7 +2207,8 @@ void RecordOrigin(mozilla::Telemetry::OriginMetricID aId, void ShutdownTelemetry() { TelemetryImpl::ShutdownTelemetry(); } -} // namespace mozilla::Telemetry +} // namespace Telemetry +} // namespace mozilla NS_IMPL_COMPONENT_FACTORY(nsITelemetry) { return TelemetryImpl::CreateTelemetryInstance().downcast(); diff --git a/toolkit/components/telemetry/core/TelemetryCommon.cpp b/toolkit/components/telemetry/core/TelemetryCommon.cpp index 929a72f1ed4c..c476d6fc7c5a 100644 --- a/toolkit/components/telemetry/core/TelemetryCommon.cpp +++ b/toolkit/components/telemetry/core/TelemetryCommon.cpp @@ -18,7 +18,9 @@ #include "TelemetryProcessData.h" #include "Telemetry.h" -namespace mozilla::Telemetry::Common { +namespace mozilla { +namespace Telemetry { +namespace Common { bool IsExpiredVersion(const char* aExpiration) { MOZ_ASSERT(aExpiration); @@ -197,4 +199,6 @@ SupportedProduct GetCurrentProduct() { #endif } -} // namespace mozilla::Telemetry::Common +} // namespace Common +} // namespace Telemetry +} // namespace mozilla diff --git a/toolkit/components/telemetry/other/CombinedStacks.cpp b/toolkit/components/telemetry/other/CombinedStacks.cpp index b767705b0653..837e7c365864 100644 --- a/toolkit/components/telemetry/other/CombinedStacks.cpp +++ b/toolkit/components/telemetry/other/CombinedStacks.cpp @@ -10,7 +10,8 @@ #include "js/Array.h" // JS::NewArrayObject #include "mozilla/HangAnnotations.h" -namespace mozilla::Telemetry { +namespace mozilla { +namespace Telemetry { // The maximum number of chrome hangs stacks that we're keeping. const size_t kMaxChromeStacksKept = 50; @@ -224,4 +225,5 @@ JSObject* CreateJSStackObject(JSContext* cx, const CombinedStacks& stacks) { return ret; } -} // namespace mozilla::Telemetry +} // namespace Telemetry +} // namespace mozilla diff --git a/toolkit/components/telemetry/other/KeyedStackCapturer.cpp b/toolkit/components/telemetry/other/KeyedStackCapturer.cpp index d71add9694ed..6e0526001078 100644 --- a/toolkit/components/telemetry/other/KeyedStackCapturer.cpp +++ b/toolkit/components/telemetry/other/KeyedStackCapturer.cpp @@ -57,7 +57,8 @@ bool IsKeyValid(const nsACString& aKey) { } // anonymous namespace -namespace mozilla::Telemetry { +namespace mozilla { +namespace Telemetry { void KeyedStackCapturer::Capture(const nsACString& aKey) { MutexAutoLock captureStackMutex(mStackCapturerMutex); @@ -161,4 +162,5 @@ size_t KeyedStackCapturer::SizeOfExcludingThis( return n; } -} // namespace mozilla::Telemetry +} // namespace Telemetry +} // namespace mozilla diff --git a/toolkit/components/telemetry/other/ProcessedStack.cpp b/toolkit/components/telemetry/other/ProcessedStack.cpp index ce62826a05f8..6ef1b2ed588a 100644 --- a/toolkit/components/telemetry/other/ProcessedStack.cpp +++ b/toolkit/components/telemetry/other/ProcessedStack.cpp @@ -26,7 +26,8 @@ static bool CompareByIndex(const StackFrame& a, const StackFrame& b) { } // namespace -namespace mozilla::Telemetry { +namespace mozilla { +namespace Telemetry { const size_t kMaxChromeStackDepth = 50; @@ -185,4 +186,5 @@ ProcessedStack BatchProcessedStackGenerator::GetStackAndModules( #endif } -} // namespace mozilla::Telemetry +} // namespace Telemetry +} // namespace mozilla diff --git a/toolkit/components/telemetry/other/TelemetryIOInterposeObserver.cpp b/toolkit/components/telemetry/other/TelemetryIOInterposeObserver.cpp index 5cc5f2df780f..b741fd3fe3cc 100644 --- a/toolkit/components/telemetry/other/TelemetryIOInterposeObserver.cpp +++ b/toolkit/components/telemetry/other/TelemetryIOInterposeObserver.cpp @@ -8,7 +8,8 @@ #include "core/TelemetryCommon.h" #include "js/Array.h" // JS::NewArrayObject -namespace mozilla::Telemetry { +namespace mozilla { +namespace Telemetry { TelemetryIOInterposeObserver::TelemetryIOInterposeObserver(nsIFile* aXreDir) : mCurStage(STAGE_STARTUP) { @@ -175,4 +176,5 @@ size_t TelemetryIOInterposeObserver::SizeOfExcludingThis( return size; } -} // namespace mozilla::Telemetry +} // namespace Telemetry +} // namespace mozilla diff --git a/toolkit/components/url-classifier/HashStore.cpp b/toolkit/components/url-classifier/HashStore.cpp index 523b57f3e8ba..3959615a10ee 100644 --- a/toolkit/components/url-classifier/HashStore.cpp +++ b/toolkit/components/url-classifier/HashStore.cpp @@ -101,7 +101,8 @@ extern mozilla::LazyLogModule gUrlClassifierDbServiceLog; #define LOG_ENABLED() \ MOZ_LOG_TEST(gUrlClassifierDbServiceLog, mozilla::LogLevel::Debug) -namespace mozilla::safebrowsing { +namespace mozilla { +namespace safebrowsing { const uint32_t STORE_MAGIC = 0x1231af3b; const uint32_t CURRENT_VERSION = 4; @@ -1177,4 +1178,5 @@ ChunkSet& HashStore::SubChunks() { return mSubChunks; } -} // namespace mozilla::safebrowsing +} // namespace safebrowsing +} // namespace mozilla diff --git a/toolkit/components/url-classifier/VariableLengthPrefixSet.cpp b/toolkit/components/url-classifier/VariableLengthPrefixSet.cpp index 66c28ccab9d5..f7873e9b1b6c 100644 --- a/toolkit/components/url-classifier/VariableLengthPrefixSet.cpp +++ b/toolkit/components/url-classifier/VariableLengthPrefixSet.cpp @@ -24,7 +24,8 @@ static mozilla::LazyLogModule gUrlClassifierPrefixSetLog( #define LOG_ENABLED() \ MOZ_LOG_TEST(gUrlClassifierPrefixSetLog, mozilla::LogLevel::Debug) -namespace mozilla::safebrowsing { +namespace mozilla { +namespace safebrowsing { #define PREFIX_SIZE_FIXED 4 @@ -491,4 +492,5 @@ size_t VariableLengthPrefixSet::SizeOfIncludingThis( return n; } -} // namespace mozilla::safebrowsing +} // namespace safebrowsing +} // namespace mozilla diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 02e138cbe60b..a478e87da098 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -3634,14 +3634,16 @@ bool IsWaylandDisabled() { } #endif -namespace mozilla::startup { +namespace mozilla { +namespace startup { Result, nsresult> GetIncompleteStartupFile(nsIFile* aProfLD) { nsCOMPtr crashFile; MOZ_TRY(aProfLD->Clone(getter_AddRefs(crashFile))); MOZ_TRY(crashFile->Append(FILE_STARTUP_INCOMPLETE)); return std::move(crashFile); } -} // namespace mozilla::startup +} // namespace startup +} // namespace mozilla // Check whether the last startup attempt resulted in a crash within the // last 6 hours. diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp index 4b97237a2082..c1c3ed091c89 100644 --- a/toolkit/xre/nsEmbedFunctions.cpp +++ b/toolkit/xre/nsEmbedFunctions.cpp @@ -248,9 +248,11 @@ const char* XRE_ChildProcessTypeToAnnotation(GeckoProcessType aProcessType) { } } -namespace mozilla::startup { +namespace mozilla { +namespace startup { GeckoProcessType sChildProcessType = GeckoProcessType_Default; -} // namespace mozilla::startup +} // namespace startup +} // namespace mozilla #if defined(MOZ_WIDGET_ANDROID) void XRE_SetAndroidChildFds(JNIEnv* env, const XRE_AndroidChildFds& fds) { diff --git a/tools/profiler/core/memory_hooks.cpp b/tools/profiler/core/memory_hooks.cpp index 7121076fc8f4..3b93f09fe466 100644 --- a/tools/profiler/core/memory_hooks.cpp +++ b/tools/profiler/core/memory_hooks.cpp @@ -61,7 +61,8 @@ static ProfilerCounterTotal* sCounter; // memory hook that might try to access the value after or during deletion. static mozilla::FastBernoulliTrial* gBernoulli; -namespace mozilla::profiler { +namespace mozilla { +namespace profiler { //--------------------------------------------------------------------------- // Utilities @@ -447,7 +448,8 @@ static void FreeCallback(void* aPtr) { } } -} // namespace mozilla::profiler +} // namespace profiler +} // namespace mozilla //--------------------------------------------------------------------------- // malloc/free interception @@ -554,7 +556,8 @@ void replace_init(malloc_table_t* aMallocTable, ReplaceMallocBridge** aBridge) { void profiler_replace_remove() {} -namespace mozilla::profiler { +namespace mozilla { +namespace profiler { //--------------------------------------------------------------------------- // Initialization //--------------------------------------------------------------------------- @@ -616,4 +619,5 @@ void disable_native_allocations() { } } -} // namespace mozilla::profiler +} // namespace profiler +} // namespace mozilla diff --git a/widget/GfxInfoX11.cpp b/widget/GfxInfoX11.cpp index 267afaec5475..99c615be5663 100644 --- a/widget/GfxInfoX11.cpp +++ b/widget/GfxInfoX11.cpp @@ -27,7 +27,8 @@ bool fire_glxtest_process(); #endif -namespace mozilla::widget { +namespace mozilla { +namespace widget { #ifdef DEBUG NS_IMPL_ISUPPORTS_INHERITED(GfxInfo, GfxInfoBase, nsIGfxInfoDebug) @@ -683,4 +684,5 @@ NS_IMETHODIMP GfxInfo::FireTestProcess() { #endif -} // namespace mozilla::widget +} // end namespace widget +} // end namespace mozilla diff --git a/widget/LSBUtils.cpp b/widget/LSBUtils.cpp index 6cd304442044..01a54ab30433 100644 --- a/widget/LSBUtils.cpp +++ b/widget/LSBUtils.cpp @@ -10,7 +10,9 @@ #include "base/process_util.h" #include "mozilla/FileUtils.h" -namespace mozilla::widget::lsb { +namespace mozilla { +namespace widget { +namespace lsb { static const char* gLsbReleasePath = "/usr/bin/lsb_release"; @@ -64,4 +66,6 @@ bool GetLSBRelease(nsACString& aDistributor, nsACString& aDescription, return true; } -} // namespace mozilla::widget::lsb +} // namespace lsb +} // namespace widget +} // namespace mozilla diff --git a/widget/ScreenManager.cpp b/widget/ScreenManager.cpp index 7c85a0dd4d85..fc7b50e49bc4 100644 --- a/widget/ScreenManager.cpp +++ b/widget/ScreenManager.cpp @@ -19,7 +19,8 @@ static mozilla::LazyLogModule sScreenLog("WidgetScreen"); -namespace mozilla::widget { +namespace mozilla { +namespace widget { NS_IMPL_ISUPPORTS(ScreenManager, nsIScreenManager) @@ -242,4 +243,5 @@ ScreenManager::GetTotalScreenPixels(int64_t* aTotalScreenPixels) { return NS_OK; } -} // namespace mozilla::widget +} // namespace widget +} // namespace mozilla diff --git a/widget/WindowSurfaceX11SHM.cpp b/widget/WindowSurfaceX11SHM.cpp index 889881d22d24..425cf3b6fdfd 100644 --- a/widget/WindowSurfaceX11SHM.cpp +++ b/widget/WindowSurfaceX11SHM.cpp @@ -6,7 +6,8 @@ #include "WindowSurfaceX11SHM.h" -namespace mozilla::widget { +namespace mozilla { +namespace widget { WindowSurfaceX11SHM::WindowSurfaceX11SHM(Display* aDisplay, Drawable aWindow, Visual* aVisual, unsigned int aDepth) { @@ -24,4 +25,5 @@ void WindowSurfaceX11SHM::Commit(const LayoutDeviceIntRegion& aInvalidRegion) { mBackImage->Put(aInvalidRegion); } -} // namespace mozilla::widget +} // namespace widget +} // namespace mozilla diff --git a/widget/gtk/MediaKeysEventSourceFactory.cpp b/widget/gtk/MediaKeysEventSourceFactory.cpp index 8784d1a1cf63..57dc7d3c4659 100644 --- a/widget/gtk/MediaKeysEventSourceFactory.cpp +++ b/widget/gtk/MediaKeysEventSourceFactory.cpp @@ -4,11 +4,13 @@ #include "MediaKeysEventSourceFactory.h" -namespace mozilla::widget { +namespace mozilla { +namespace widget { mozilla::dom::MediaControlKeysEventSource* CreateMediaControlKeysEventSource() { // TODO : will implement this in bug 1353652. return nullptr; } -} // namespace mozilla::widget +} // namespace widget +} // namespace mozilla diff --git a/widget/gtk/mozwayland/mozwayland.c b/widget/gtk/mozwayland/mozwayland.c index 19fc2c1b35b6..5cea1c5d1653 100644 --- a/widget/gtk/mozwayland/mozwayland.c +++ b/widget/gtk/mozwayland/mozwayland.c @@ -18,20 +18,20 @@ union wl_argument; * them explicitly visible. */ #pragma GCC visibility push(default) -const struct wl_interface wl_buffer_interface {}; -const struct wl_interface wl_callback_interface {}; -const struct wl_interface wl_data_device_interface {}; -const struct wl_interface wl_data_device_manager_interface {}; -const struct wl_interface wl_keyboard_interface {}; -const struct wl_interface wl_region_interface {}; -const struct wl_interface wl_registry_interface {}; -const struct wl_interface wl_shm_interface {}; -const struct wl_interface wl_shm_pool_interface {}; -const struct wl_interface wl_seat_interface {}; -const struct wl_interface wl_surface_interface {}; -const struct wl_interface wl_subsurface_interface {}; -const struct wl_interface wl_compositor_interface {}; -const struct wl_interface wl_subcompositor_interface {}; +const struct wl_interface wl_buffer_interface; +const struct wl_interface wl_callback_interface; +const struct wl_interface wl_data_device_interface; +const struct wl_interface wl_data_device_manager_interface; +const struct wl_interface wl_keyboard_interface; +const struct wl_interface wl_region_interface; +const struct wl_interface wl_registry_interface; +const struct wl_interface wl_shm_interface; +const struct wl_interface wl_shm_pool_interface; +const struct wl_interface wl_seat_interface; +const struct wl_interface wl_surface_interface; +const struct wl_interface wl_subsurface_interface; +const struct wl_interface wl_compositor_interface; +const struct wl_interface wl_subcompositor_interface; #pragma GCC visibility pop MOZ_EXPORT void wl_event_queue_destroy(struct wl_event_queue* queue) {} diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp index 713f85db286f..9e5a83a08679 100644 --- a/widget/nsBaseWidget.cpp +++ b/widget/nsBaseWidget.cpp @@ -130,7 +130,8 @@ uint64_t AutoObserverNotifier::sObserverId = 0; // milliseconds. const uint32_t kAsyncDragDropTimeout = 1000; -namespace mozilla::widget { +namespace mozilla { +namespace widget { void IMENotification::SelectionChangeDataBase::SetWritingMode( const WritingMode& aWritingMode) { @@ -141,7 +142,8 @@ WritingMode IMENotification::SelectionChangeDataBase::GetWritingMode() const { return WritingMode(mWritingMode); } -} // namespace mozilla::widget +} // namespace widget +} // namespace mozilla NS_IMPL_ISUPPORTS(nsBaseWidget, nsIWidget, nsISupportsWeakReference) @@ -2242,7 +2244,8 @@ already_AddRefed nsIWidget::CreateBidiKeyboardInner() { } #endif -namespace mozilla::widget { +namespace mozilla { +namespace widget { const char* ToChar(InputContext::Origin aOrigin) { switch (aOrigin) { @@ -3036,7 +3039,8 @@ void IMENotification::TextChangeDataBase::Test() { #endif // #ifdef DEBUG -} // namespace mozilla::widget +} // namespace widget +} // namespace mozilla #ifdef DEBUG //////////////////////////////////////////////////////////////