diff --git a/browser/components/shell/nsMacShellService.cpp b/browser/components/shell/nsMacShellService.cpp index f9bd9a159b60..5ef6cc6ba381 100644 --- a/browser/components/shell/nsMacShellService.cpp +++ b/browser/components/shell/nsMacShellService.cpp @@ -152,7 +152,8 @@ nsMacShellService::SetDesktopBackground(Element* aElement, int32_t aPosition, loadContext = do_QueryInterface(docShell); } - auto referrerInfo = mozilla::MakeRefPtr(*aElement); + auto referrerInfo = + mozilla::MakeRefPtr(*aElement); return wbp->SaveURI(imageURI, aElement->NodePrincipal(), 0, referrerInfo, nullptr, nullptr, mBackgroundFile, nsIContentPolicy::TYPE_IMAGE, loadContext); diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp index 2daecf455f4a..2a7c79efe6a2 100644 --- a/dom/base/nsFocusManager.cpp +++ b/dom/base/nsFocusManager.cpp @@ -2596,8 +2596,7 @@ void nsFocusManager::FireFocusOrBlurEvent(EventMessage aEventMessage, EventMessage focusInOrOutMessage = aEventMessage == eFocus ? eFocusIn : eFocusOut; FireFocusInOrOutEvent(focusInOrOutMessage, aPresShell, aTarget, - currentWindow, currentFocusedContent, - aRelatedTarget); + currentWindow, currentFocusedContent, aRelatedTarget); } } diff --git a/dom/bindings/BindingDeclarations.h b/dom/bindings/BindingDeclarations.h index 3885392c7faa..73b7cb5c47f8 100644 --- a/dom/bindings/BindingDeclarations.h +++ b/dom/bindings/BindingDeclarations.h @@ -487,7 +487,7 @@ class AutoSequence : public AutoTArray { AutoSequence() : AutoTArray() {} // Allow converting to const sequences as needed - operator const Sequence &() const { + operator const Sequence&() const { return *reinterpret_cast*>(this); } }; diff --git a/dom/ipc/JSActorService.cpp b/dom/ipc/JSActorService.cpp index 04e7f46cd826..1e0edd4765cf 100644 --- a/dom/ipc/JSActorService.cpp +++ b/dom/ipc/JSActorService.cpp @@ -114,7 +114,7 @@ void JSActorService::LoadJSActorInfos(nsTArray& aProcess, MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(XRE_IsContentProcess()); - for (auto& info: aProcess) { + for (auto& info : aProcess) { // Create our JSProcessActorProtocol, register it in // mProcessActorDescriptors. auto name = info.name(); @@ -126,15 +126,15 @@ void JSActorService::LoadJSActorInfos(nsTArray& aProcess, proto->AddObservers(); } - for (auto& info: aWindow) { + for (auto& info : aWindow) { auto name = info.name(); RefPtr proto = - JSWindowActorProtocol::FromIPC(std::move(info)); + JSWindowActorProtocol::FromIPC(std::move(info)); mWindowActorDescriptors.Put(std::move(name), RefPtr{proto}); // Register listeners for each chrome target. for (EventTarget* target : mChromeEventTargets) { - proto->RegisterListenersFor(target); + proto->RegisterListenersFor(target); } // Add observers for each actor. diff --git a/dom/ipc/ProcessActor.cpp b/dom/ipc/ProcessActor.cpp index 20dca835f685..1721b353cf9f 100644 --- a/dom/ipc/ProcessActor.cpp +++ b/dom/ipc/ProcessActor.cpp @@ -100,8 +100,7 @@ void ProcessActor::ConstructActor(const nsACString& aName, ctorName.Append(actorType == JSActor::Type::Parent ? NS_LITERAL_CSTRING("Parent") : NS_LITERAL_CSTRING("Child")); - if (!JS_GetProperty(cx, exports, ctorName.get(), - &ctor)) { + if (!JS_GetProperty(cx, exports, ctorName.get(), &ctor)) { aRv.NoteJSContextException(cx); return; } diff --git a/dom/media/GraphDriver.cpp b/dom/media/GraphDriver.cpp index cc5d028c7c90..a7cfb2744f32 100644 --- a/dom/media/GraphDriver.cpp +++ b/dom/media/GraphDriver.cpp @@ -1090,22 +1090,17 @@ void AudioCallbackDriver::PanOutputIfNeeded(bool aMicrophoneActive) { return; } - int major,minor; + int major, minor; for (uint32_t i = 0; i < length; i++) { // skip the model name if (isalpha(name[i])) { continue; } - sscanf(name+i, "%d,%d", &major, &minor); + sscanf(name + i, "%d,%d", &major, &minor); break; } - enum MacbookModel { - MacBook, - MacBookPro, - MacBookAir, - NotAMacbook - }; + enum MacbookModel { MacBook, MacBookPro, MacBookAir, NotAMacbook }; MacbookModel model; diff --git a/dom/vr/XRFrame.cpp b/dom/vr/XRFrame.cpp index e5e30edc2ae7..227dcca7ac77 100644 --- a/dom/vr/XRFrame.cpp +++ b/dom/vr/XRFrame.cpp @@ -133,7 +133,8 @@ already_AddRefed XRFrame::GetViewerPose( return viewerPose.forget(); } -already_AddRefed XRFrame::GetPose(const XRSpace& aSpace, const XRSpace& aBaseSpace, +already_AddRefed XRFrame::GetPose(const XRSpace& aSpace, + const XRSpace& aBaseSpace, ErrorResult& aRv) { if (!mActive) { aRv.ThrowInvalidStateError( diff --git a/dom/vr/XRFrame.h b/dom/vr/XRFrame.h index 4e7f9780fa4d..3faf2045cd03 100644 --- a/dom/vr/XRFrame.h +++ b/dom/vr/XRFrame.h @@ -45,8 +45,8 @@ class XRFrame final : public nsWrapperCache { XRSession* Session(); already_AddRefed GetViewerPose( const XRReferenceSpace& aReferenceSpace, ErrorResult& aRv); - already_AddRefed GetPose(const XRSpace& aSpace, const XRSpace& aBaseSpace, - ErrorResult& aRv); + already_AddRefed GetPose(const XRSpace& aSpace, + const XRSpace& aBaseSpace, ErrorResult& aRv); gfx::Matrix4x4 ConstructInlineProjection(float aFov, float aAspect, float aNear, float aFar); diff --git a/gfx/config/gfxConfigManager.cpp b/gfx/config/gfxConfigManager.cpp index 227e7438960f..7dd4b343698a 100644 --- a/gfx/config/gfxConfigManager.cpp +++ b/gfx/config/gfxConfigManager.cpp @@ -43,10 +43,10 @@ void gfxConfigManager::Init() { StaticPrefs::gfx_webrender_max_partial_present_rects_AtStartup() > 0; #ifdef XP_WIN mWrForceAngle = StaticPrefs::gfx_webrender_force_angle_AtStartup(); -#ifdef NIGHTLY_BUILD +# ifdef NIGHTLY_BUILD mWrForceAngleNoGPUProcess = StaticPrefs:: gfx_webrender_enabled_no_gpu_process_with_angle_win_AtStartup(); -#endif +# endif mWrDCompWinEnabled = Preferences::GetBool("gfx.webrender.dcomp-win.enabled", false); #endif diff --git a/gfx/layers/apz/public/GeckoContentController.h b/gfx/layers/apz/public/GeckoContentController.h index 82d171860bf8..35327365ca23 100644 --- a/gfx/layers/apz/public/GeckoContentController.h +++ b/gfx/layers/apz/public/GeckoContentController.h @@ -7,13 +7,13 @@ #ifndef mozilla_layers_GeckoContentController_h #define mozilla_layers_GeckoContentController_h -#include "InputData.h" // for PinchGestureInput -#include "LayersTypes.h" // for ScrollDirection -#include "Units.h" // for CSSPoint, CSSRect, etc -#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2 -#include "mozilla/Attributes.h" // for MOZ_CAN_RUN_SCRIPT -#include "mozilla/DefineEnum.h" // for MOZ_DEFINE_ENUM -#include "mozilla/EventForwards.h" // for Modifiers +#include "InputData.h" // for PinchGestureInput +#include "LayersTypes.h" // for ScrollDirection +#include "Units.h" // for CSSPoint, CSSRect, etc +#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2 +#include "mozilla/Attributes.h" // for MOZ_CAN_RUN_SCRIPT +#include "mozilla/DefineEnum.h" // for MOZ_DEFINE_ENUM +#include "mozilla/EventForwards.h" // for Modifiers #include "mozilla/layers/APZThreadUtils.h" #include "mozilla/layers/MatrixMessage.h" // for MatrixMessage #include "mozilla/layers/RepaintRequest.h" // for RepaintRequest diff --git a/gfx/layers/apz/util/APZThreadUtils.cpp b/gfx/layers/apz/util/APZThreadUtils.cpp index ae05a0dea3af..9a0efbe95183 100644 --- a/gfx/layers/apz/util/APZThreadUtils.cpp +++ b/gfx/layers/apz/util/APZThreadUtils.cpp @@ -82,7 +82,7 @@ bool APZThreadUtils::IsControllerThread() { /*static*/ void APZThreadUtils::DelayedDispatch(already_AddRefed aRunnable, - int aDelayMs) { + int aDelayMs) { MOZ_ASSERT(!XRE_IsContentProcess(), "ContentProcessController should only be used remotely."); RefPtr thread; diff --git a/gfx/layers/apz/util/ChromeProcessController.cpp b/gfx/layers/apz/util/ChromeProcessController.cpp index 8b2f36b7d3f3..a6d25bde054d 100644 --- a/gfx/layers/apz/util/ChromeProcessController.cpp +++ b/gfx/layers/apz/util/ChromeProcessController.cpp @@ -6,7 +6,7 @@ #include "ChromeProcessController.h" -#include "MainThreadUtils.h" // for NS_IsMainThread() +#include "MainThreadUtils.h" // for NS_IsMainThread() #include "mozilla/PresShell.h" #include "mozilla/dom/Element.h" #include "mozilla/layers/CompositorBridgeParent.h" diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp index dbcefb088395..d55de5a56cb4 100644 --- a/gfx/layers/client/TextureClient.cpp +++ b/gfx/layers/client/TextureClient.cpp @@ -38,7 +38,7 @@ #include "mozilla/layers/TextureClientOGL.h" #include "mozilla/layers/TextureClientRecycleAllocator.h" #include "mozilla/layers/TextureRecorded.h" -#include "nsDebug.h" // for NS_ASSERTION, NS_WARNING, etc +#include "nsDebug.h" // for NS_ASSERTION, NS_WARNING, etc #include "nsISerialEventTarget.h" #include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, etc #include "nsPrintfCString.h" // for nsPrintfCString diff --git a/gfx/layers/ipc/ImageBridgeChild.cpp b/gfx/layers/ipc/ImageBridgeChild.cpp index 271ec4913dd3..6f0f172c6204 100644 --- a/gfx/layers/ipc/ImageBridgeChild.cpp +++ b/gfx/layers/ipc/ImageBridgeChild.cpp @@ -38,7 +38,7 @@ #include "nsTArray.h" // for AutoTArray, nsTArray, etc #include "nsTArrayForwardDeclare.h" // for AutoTArray #include "nsThread.h" -#include "nsThreadUtils.h" // for NS_IsMainThread +#include "nsThreadUtils.h" // for NS_IsMainThread #include "mozilla/StaticMutex.h" #include "mozilla/StaticPtr.h" // for StaticRefPtr #include "mozilla/layers/TextureClient.h" diff --git a/gfx/layers/ipc/ImageBridgeParent.cpp b/gfx/layers/ipc/ImageBridgeParent.cpp index b9fd0c8d0df7..6eefeb62e95b 100644 --- a/gfx/layers/ipc/ImageBridgeParent.cpp +++ b/gfx/layers/ipc/ImageBridgeParent.cpp @@ -5,10 +5,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "ImageBridgeParent.h" -#include // for uint64_t, uint32_t -#include "CompositableHost.h" // for CompositableParent, Create -#include "base/process.h" // for ProcessId -#include "base/task.h" // for CancelableTask, DeleteTask, etc +#include // for uint64_t, uint32_t +#include "CompositableHost.h" // for CompositableParent, Create +#include "base/process.h" // for ProcessId +#include "base/task.h" // for CancelableTask, DeleteTask, etc #include "mozilla/ClearOnShutdown.h" #include "mozilla/gfx/Point.h" // for IntSize #include "mozilla/Hal.h" // for hal::SetCurrentThreadPriority() diff --git a/gfx/layers/ipc/RemoteContentController.cpp b/gfx/layers/ipc/RemoteContentController.cpp index a007d792897c..fe9a2be6a4eb 100644 --- a/gfx/layers/ipc/RemoteContentController.cpp +++ b/gfx/layers/ipc/RemoteContentController.cpp @@ -37,9 +37,10 @@ void RemoteContentController::NotifyLayerTransforms( const nsTArray& aTransforms) { if (!mCompositorThread->IsOnCurrentThread()) { // We have to send messages from the compositor thread - mCompositorThread->Dispatch(NewRunnableMethod>( - "layers::RemoteContentController::NotifyLayerTransforms", this, - &RemoteContentController::NotifyLayerTransforms, aTransforms)); + mCompositorThread->Dispatch( + NewRunnableMethod>( + "layers::RemoteContentController::NotifyLayerTransforms", this, + &RemoteContentController::NotifyLayerTransforms, aTransforms)); return; } diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp index 22cb753425aa..ca0a9cec4543 100644 --- a/gfx/thebes/gfxDWriteFontList.cpp +++ b/gfx/thebes/gfxDWriteFontList.cpp @@ -1054,9 +1054,8 @@ void gfxDWriteFontList::AppendFamiliesFromCollection( if (key.EqualsLiteral("gill sans") && allFacesUltraBold(family)) { visibility = FontVisibility::Hidden; } else { - visibility = aCollection == mSystemFonts - ? GetVisibilityForFamily(name) - : FontVisibility::Base; + visibility = aCollection == mSystemFonts ? GetVisibilityForFamily(name) + : FontVisibility::Base; } aFamilies.AppendElement(fontlist::Family::InitData( key, name, i, visibility, aCollection != mSystemFonts, bad, classic)); diff --git a/gfx/webrender_bindings/WebRenderAPI.h b/gfx/webrender_bindings/WebRenderAPI.h index eab6f011071f..420454e32f81 100644 --- a/gfx/webrender_bindings/WebRenderAPI.h +++ b/gfx/webrender_bindings/WebRenderAPI.h @@ -377,8 +377,7 @@ struct MOZ_STACK_CLASS StackingContextParams : public WrStackingContextParams { nullptr, /* prim_flags = */ wr::PrimitiveFlags::IS_BACKFACE_VISIBLE, wr::MixBlendMode::Normal, - wr::StackingContextFlags { 0 } - } {} + wr::StackingContextFlags{0}} {} void SetPreserve3D(bool aPreserve) { transform_style = diff --git a/image/DecoderFactory.cpp b/image/DecoderFactory.cpp index b1f545d7e532..a65166c510e8 100644 --- a/image/DecoderFactory.cpp +++ b/image/DecoderFactory.cpp @@ -21,7 +21,7 @@ #include "nsIconDecoder.h" #include "nsWebPDecoder.h" #ifdef MOZ_AV1 -#include "nsAVIFDecoder.h" +# include "nsAVIFDecoder.h" #endif namespace mozilla { @@ -84,7 +84,7 @@ DecoderType DecoderFactory::GetDecoderType(const char* aMimeType) { } #ifdef MOZ_AV1 else if (!strcmp(aMimeType, IMAGE_AVIF) && - StaticPrefs::image_avif_enabled()) { + StaticPrefs::image_avif_enabled()) { type = DecoderType::AVIF; } #endif diff --git a/js/src/gc/Nursery.h b/js/src/gc/Nursery.h index 9591dda26a1a..d988655ed025 100644 --- a/js/src/gc/Nursery.h +++ b/js/src/gc/Nursery.h @@ -242,7 +242,9 @@ class Nursery { return allocateCell(zone, size, JS::TraceKind::String); } - static size_t nurseryCellHeaderSize() { return sizeof(gc::NurseryCellHeader); } + static size_t nurseryCellHeaderSize() { + return sizeof(gc::NurseryCellHeader); + } // Allocate a buffer for a given zone, using the nursery if possible. void* allocateBuffer(JS::Zone* zone, size_t nbytes); diff --git a/layout/base/PositionedEventTargeting.cpp b/layout/base/PositionedEventTargeting.cpp index 0f27a79edb66..4914e242882e 100644 --- a/layout/base/PositionedEventTargeting.cpp +++ b/layout/base/PositionedEventTargeting.cpp @@ -181,7 +181,6 @@ static bool IsDescendant(nsIFrame* aFrame, nsIContent* aAncestor, static nsIContent* GetClickableAncestor( nsIFrame* aFrame, nsAtom* stopAt = nullptr, nsAutoString* aLabelTargetId = nullptr) { - // If the frame is `cursor:pointer` or inherits `cursor:pointer` from an // ancestor, treat it as clickable. This is a heuristic to deal with pages // where the click event listener is on the or element but it diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index c3e864b22ec7..624c8b66dd45 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -3039,9 +3039,9 @@ void nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState) { fm, aState.mMinLineHeight, wm.IsLineInverted()); nscoord minDescent = aState.mMinLineHeight - minAscent; - aState.mBCoord += std::max(minAscent, metrics.BlockStartAscent()) + - std::max(minDescent, metrics.BSize(wm) - - metrics.BlockStartAscent()); + aState.mBCoord += + std::max(minAscent, metrics.BlockStartAscent()) + + std::max(minDescent, metrics.BSize(wm) - metrics.BlockStartAscent()); nscoord offset = minAscent - metrics.BlockStartAscent(); if (offset > 0) { diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 87aeb37be1bf..262c83cabe0e 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -413,8 +413,7 @@ bool nsHTMLScrollFrame::TryLayout(ScrollReflowInput* aState, nsSize vScrollbarPrefSize(0, 0); if (mHelper.mVScrollbarBox) { - GetScrollbarMetrics(aState->mBoxState, mHelper.mVScrollbarBox, - nullptr, + GetScrollbarMetrics(aState->mBoxState, mHelper.mVScrollbarBox, nullptr, aAssumeVScroll ? &vScrollbarPrefSize : nullptr); nsScrollbarFrame* scrollbar = do_QueryFrame(mHelper.mVScrollbarBox); scrollbar->SetScrollbarMediatorContent(mContent); @@ -424,8 +423,7 @@ bool nsHTMLScrollFrame::TryLayout(ScrollReflowInput* aState, nsSize hScrollbarPrefSize(0, 0); if (mHelper.mHScrollbarBox) { - GetScrollbarMetrics(aState->mBoxState, mHelper.mHScrollbarBox, - nullptr, + GetScrollbarMetrics(aState->mBoxState, mHelper.mHScrollbarBox, nullptr, aAssumeHScroll ? &hScrollbarPrefSize : nullptr); nsScrollbarFrame* scrollbar = do_QueryFrame(mHelper.mHScrollbarBox); scrollbar->SetScrollbarMediatorContent(mContent); diff --git a/media/webrtc/signaling/src/mediapipeline/MediaPipelineFilter.cpp b/media/webrtc/signaling/src/mediapipeline/MediaPipelineFilter.cpp index 9a56bd92d9b2..fff569e41b4f 100644 --- a/media/webrtc/signaling/src/mediapipeline/MediaPipelineFilter.cpp +++ b/media/webrtc/signaling/src/mediapipeline/MediaPipelineFilter.cpp @@ -23,7 +23,8 @@ MediaPipelineFilter::MediaPipelineFilter( const std::vector& aExtMap) : mExtMap(aExtMap) {} -void MediaPipelineFilter::SetRemoteMediaStreamId(const Maybe& aMid) { +void MediaPipelineFilter::SetRemoteMediaStreamId( + const Maybe& aMid) { if (aMid != mRemoteMid) { DEBUG_LOG(("MediaPipelineFilter added new remote RTP MID: '%s'.", aMid.valueOr("").c_str())); diff --git a/toolkit/components/places/nsNavHistory.cpp b/toolkit/components/places/nsNavHistory.cpp index 492dc4ead9a7..d51317108270 100644 --- a/toolkit/components/places/nsNavHistory.cpp +++ b/toolkit/components/places/nsNavHistory.cpp @@ -897,8 +897,7 @@ nsNavHistory::CanAddURI(nsIURI* aURI, bool* canAdd) { // Helper for nsNavHistory::CanAddURI to be callable from a child process // static -nsresult -nsNavHistory::CanAddURIToHistory(nsIURI* aURI, bool* aCanAdd) { +nsresult nsNavHistory::CanAddURIToHistory(nsIURI* aURI, bool* aCanAdd) { // Default to false. *aCanAdd = false; diff --git a/tools/profiler/core/platform-win32.cpp b/tools/profiler/core/platform-win32.cpp index 698494836521..e83a394db54d 100644 --- a/tools/profiler/core/platform-win32.cpp +++ b/tools/profiler/core/platform-win32.cpp @@ -298,4 +298,4 @@ MFBT_API void InitializeWin64ProfilerHooks(); using mozilla::baseprofiler::InitializeWin64ProfilerHooks; -#endif // defined(GP_PLAT_amd64_windows) +#endif // defined(GP_PLAT_amd64_windows) diff --git a/widget/windows/GfxInfo.cpp b/widget/windows/GfxInfo.cpp index c1709052a2ed..102f284e45fc 100644 --- a/widget/windows/GfxInfo.cpp +++ b/widget/windows/GfxInfo.cpp @@ -1805,12 +1805,11 @@ const nsTArray& GfxInfo::GetGfxDriverInfo() { "FEATURE_ROLLOUT_BATTERY_S_SCRN_NV_RECENT"); APPEND_TO_DRIVER_BLOCKLIST2_EXT( - OperatingSystem::Windows, ScreenSizeStatus::Small, - BatteryStatus::None, DesktopEnvironment::All, WindowProtocol::All, - DriverVendor::All, DeviceFamily::IntelRolloutWebRender, - nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_ALLOW_ALWAYS, - DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0), - "FEATURE_ROLLOUT_DESKTOP_INTEL_S_SCRN"); + OperatingSystem::Windows, ScreenSizeStatus::Small, BatteryStatus::None, + DesktopEnvironment::All, WindowProtocol::All, DriverVendor::All, + DeviceFamily::IntelRolloutWebRender, nsIGfxInfo::FEATURE_WEBRENDER, + nsIGfxInfo::FEATURE_ALLOW_ALWAYS, DRIVER_COMPARISON_IGNORED, + V(0, 0, 0, 0), "FEATURE_ROLLOUT_DESKTOP_INTEL_S_SCRN"); APPEND_TO_DRIVER_BLOCKLIST2_EXT( OperatingSystem::RecentWindows10, ScreenSizeStatus::Small,