diff --git a/accessible/android/ProxyAccessibleWrap.cpp b/accessible/android/ProxyAccessibleWrap.cpp index c19e4a3febbd..5b64fa9ddd9d 100644 --- a/accessible/android/ProxyAccessibleWrap.cpp +++ b/accessible/android/ProxyAccessibleWrap.cpp @@ -80,15 +80,11 @@ void ProxyAccessibleWrap::ScrollTo(uint32_t aHow) const { Proxy()->ScrollTo(aHow); } -uint8_t -ProxyAccessibleWrap::ActionCount() const -{ +uint8_t ProxyAccessibleWrap::ActionCount() const { return Proxy()->ActionCount(); } -bool -ProxyAccessibleWrap::DoAction(uint8_t aIndex) const -{ +bool ProxyAccessibleWrap::DoAction(uint8_t aIndex) const { return Proxy()->DoAction(aIndex); } diff --git a/accessible/android/SessionAccessibility.cpp b/accessible/android/SessionAccessibility.cpp index 49c26bda56e0..15f88371eed1 100644 --- a/accessible/android/SessionAccessibility.cpp +++ b/accessible/android/SessionAccessibility.cpp @@ -332,7 +332,8 @@ void SessionAccessibility::ReplaceViewportCache( AccessibleWrap* acc = aAccessibles.ElementAt(i); if (aData.Length() == aAccessibles.Length()) { const BatchData& data = aData.ElementAt(i); - auto bundle = acc->ToSmallBundle(data.State(), data.Bounds(), data.ActionCount()); + auto bundle = + acc->ToSmallBundle(data.State(), data.Bounds(), data.ActionCount()); infos->SetElement(i, bundle); } else { infos->SetElement(i, acc->ToSmallBundle()); diff --git a/dom/base/Element.h b/dom/base/Element.h index 946263014276..37febdee68fc 100644 --- a/dom/base/Element.h +++ b/dom/base/Element.h @@ -1897,7 +1897,7 @@ class Element : public FragmentOrElement { // descendants of display: none elements. mozilla::RustCell mServoData; -protected: + protected: // Array containing all attributes for this element AttrArray mAttrs; }; diff --git a/dom/ipc/WindowGlobalChild.cpp b/dom/ipc/WindowGlobalChild.cpp index 8313b86410a6..4b92acd64b07 100644 --- a/dom/ipc/WindowGlobalChild.cpp +++ b/dom/ipc/WindowGlobalChild.cpp @@ -17,17 +17,14 @@ static StaticAutoPtr gWindowGlobalChildById; WindowGlobalChild::WindowGlobalChild(nsGlobalWindowInner* aWindow, dom::BrowsingContext* aBrowsingContext) - : mWindowGlobal(aWindow) - , mBrowsingContext(aBrowsingContext) - , mInnerWindowId(aWindow->WindowID()) - , mOuterWindowId(aWindow->GetOuterWindow()->WindowID()) - , mIPCClosed(true) -{ -} + : mWindowGlobal(aWindow), + mBrowsingContext(aBrowsingContext), + mInnerWindowId(aWindow->WindowID()), + mOuterWindowId(aWindow->GetOuterWindow()->WindowID()), + mIPCClosed(true) {} -already_AddRefed -WindowGlobalChild::Create(nsGlobalWindowInner* aWindow) -{ +already_AddRefed WindowGlobalChild::Create( + nsGlobalWindowInner* aWindow) { nsCOMPtr principal = aWindow->GetPrincipal(); MOZ_ASSERT(principal); @@ -40,8 +37,7 @@ WindowGlobalChild::Create(nsGlobalWindowInner* aWindow) WindowGlobalInit init(principal, BrowsingContextId(wgc->BrowsingContext()->Id()), - wgc->mInnerWindowId, - wgc->mOuterWindowId); + wgc->mInnerWindowId, wgc->mOuterWindowId); // Send the link constructor over PInProcessChild or PBrowser. if (XRE_IsParentProcess()) { @@ -53,7 +49,8 @@ WindowGlobalChild::Create(nsGlobalWindowInner* aWindow) // Note: ref is released in DeallocPWindowGlobalChild ipc->SendPWindowGlobalConstructor(do_AddRef(wgc).take(), init); } else { - RefPtr tabChild = TabChild::GetFrom(static_cast(aWindow)); + RefPtr tabChild = + TabChild::GetFrom(static_cast(aWindow)); MOZ_ASSERT(tabChild); // Note: ref is released in DeallocPWindowGlobalChild @@ -74,23 +71,18 @@ WindowGlobalChild::Create(nsGlobalWindowInner* aWindow) } /* static */ already_AddRefed -WindowGlobalChild::GetByInnerWindowId(uint64_t aInnerWindowId) -{ +WindowGlobalChild::GetByInnerWindowId(uint64_t aInnerWindowId) { if (!gWindowGlobalChildById) { return nullptr; } return gWindowGlobalChildById->Get(aInnerWindowId); } -bool -WindowGlobalChild::IsCurrentGlobal() -{ +bool WindowGlobalChild::IsCurrentGlobal() { return !mIPCClosed && mWindowGlobal->IsCurrentInnerWindow(); } -already_AddRefed -WindowGlobalChild::GetParentActor() -{ +already_AddRefed WindowGlobalChild::GetParentActor() { if (mIPCClosed) { return nullptr; } @@ -98,38 +90,30 @@ WindowGlobalChild::GetParentActor() return do_AddRef(static_cast(otherSide)); } -void -WindowGlobalChild::ActorDestroy(ActorDestroyReason aWhy) -{ +void WindowGlobalChild::ActorDestroy(ActorDestroyReason aWhy) { mIPCClosed = true; gWindowGlobalChildById->Remove(mInnerWindowId); } -WindowGlobalChild::~WindowGlobalChild() -{ +WindowGlobalChild::~WindowGlobalChild() { MOZ_ASSERT(!gWindowGlobalChildById || !gWindowGlobalChildById->Contains(mInnerWindowId)); } -JSObject* -WindowGlobalChild::WrapObject(JSContext* aCx, - JS::Handle aGivenProto) -{ +JSObject* WindowGlobalChild::WrapObject(JSContext* aCx, + JS::Handle aGivenProto) { return WindowGlobalChild_Binding::Wrap(aCx, this, aGivenProto); } -nsISupports* -WindowGlobalChild::GetParentObject() -{ +nsISupports* WindowGlobalChild::GetParentObject() { return xpc::NativeGlobal(xpc::PrivilegedJunkScope()); } -NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(WindowGlobalChild, - mWindowGlobal, +NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(WindowGlobalChild, mWindowGlobal, mBrowsingContext) NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(WindowGlobalChild, AddRef) NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(WindowGlobalChild, Release) -} // namespace dom -} // namespace mozilla +} // namespace dom +} // namespace mozilla diff --git a/dom/ipc/WindowGlobalChild.h b/dom/ipc/WindowGlobalChild.h index 2edbf4ccdcf4..3218733104f2 100644 --- a/dom/ipc/WindowGlobalChild.h +++ b/dom/ipc/WindowGlobalChild.h @@ -15,7 +15,7 @@ class nsGlobalWindowInner; class nsDocShell; namespace mozilla { -namespace dom { +namespace dom { class BrowsingContext; class WindowGlobalParent; @@ -24,18 +24,16 @@ class WindowGlobalParent; * Actor for a single nsGlobalWindowInner. This actor is used to communicate * information to the parent process asynchronously. */ -class WindowGlobalChild : public nsWrapperCache - , public PWindowGlobalChild -{ -public: +class WindowGlobalChild : public nsWrapperCache, public PWindowGlobalChild { + public: NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WindowGlobalChild) NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WindowGlobalChild) - static already_AddRefed - GetByInnerWindowId(uint64_t aInnerWindowId); + static already_AddRefed GetByInnerWindowId( + uint64_t aInnerWindowId); - static already_AddRefed - GetByInnerWindowId(const GlobalObject& aGlobal, uint64_t aInnerWindowId) { + static already_AddRefed GetByInnerWindowId( + const GlobalObject& aGlobal, uint64_t aInnerWindowId) { return GetByInnerWindowId(aInnerWindowId); } @@ -60,17 +58,17 @@ public: already_AddRefed GetParentActor(); // Create and initialize the WindowGlobalChild object. - static already_AddRefed - Create(nsGlobalWindowInner* aWindow); + static already_AddRefed Create( + nsGlobalWindowInner* aWindow); nsISupports* GetParentObject(); JSObject* WrapObject(JSContext* aCx, JS::Handle aGivenProto) override; -protected: + protected: virtual void ActorDestroy(ActorDestroyReason aWhy) override; -private: + private: WindowGlobalChild(nsGlobalWindowInner* aWindow, dom::BrowsingContext* aBc); ~WindowGlobalChild(); @@ -81,7 +79,7 @@ private: bool mIPCClosed; }; -} // namespace dom -} // namespace mozilla +} // namespace dom +} // namespace mozilla -#endif // !defined(mozilla_dom_WindowGlobalChild_h) +#endif // !defined(mozilla_dom_WindowGlobalChild_h) diff --git a/dom/ipc/WindowGlobalParent.cpp b/dom/ipc/WindowGlobalParent.cpp index 1aee4527108f..b2d85fb4a385 100644 --- a/dom/ipc/WindowGlobalParent.cpp +++ b/dom/ipc/WindowGlobalParent.cpp @@ -19,11 +19,11 @@ static StaticAutoPtr gWindowGlobalParentsById; WindowGlobalParent::WindowGlobalParent(const WindowGlobalInit& aInit, bool aInProcess) - : mDocumentPrincipal(aInit.principal()) - , mInnerWindowId(aInit.innerWindowId()) - , mOuterWindowId(aInit.outerWindowId()) - , mInProcess(aInProcess) - , mIPCClosed(true) // Closed until WGP::Init + : mDocumentPrincipal(aInit.principal()), + mInnerWindowId(aInit.innerWindowId()), + mOuterWindowId(aInit.outerWindowId()), + mInProcess(aInProcess), + mIPCClosed(true) // Closed until WGP::Init { MOZ_DIAGNOSTIC_ASSERT(XRE_IsParentProcess(), "Parent process only"); MOZ_RELEASE_ASSERT(mDocumentPrincipal, "Must have a valid principal"); @@ -33,9 +33,7 @@ WindowGlobalParent::WindowGlobalParent(const WindowGlobalInit& aInit, "Must be made in BrowsingContext"); } -void -WindowGlobalParent::Init(const WindowGlobalInit& aInit) -{ +void WindowGlobalParent::Init(const WindowGlobalInit& aInit) { MOZ_ASSERT(Manager(), "Should have a manager!"); MOZ_ASSERT(!mFrameLoader, "Cannot Init() a WindowGlobalParent twice!"); @@ -77,7 +75,8 @@ WindowGlobalParent::Init(const WindowGlobalInit& aInit) RefPtr otherSide = GetChildActor(); if (otherSide && otherSide->WindowGlobal()) { // Get the toplevel window from the other side. - RefPtr docShell = nsDocShell::Cast(otherSide->WindowGlobal()->GetDocShell()); + RefPtr docShell = + nsDocShell::Cast(otherSide->WindowGlobal()->GetDocShell()); if (docShell) { docShell->GetTopFrameElement(getter_AddRefs(frameElement)); } @@ -97,17 +96,14 @@ WindowGlobalParent::Init(const WindowGlobalInit& aInit) } /* static */ already_AddRefed -WindowGlobalParent::GetByInnerWindowId(uint64_t aInnerWindowId) -{ +WindowGlobalParent::GetByInnerWindowId(uint64_t aInnerWindowId) { if (!gWindowGlobalParentsById) { return nullptr; } return gWindowGlobalParentsById->Get(aInnerWindowId); } -already_AddRefed -WindowGlobalParent::GetChildActor() -{ +already_AddRefed WindowGlobalParent::GetChildActor() { if (mIPCClosed) { return nullptr; } @@ -115,61 +111,47 @@ WindowGlobalParent::GetChildActor() return do_AddRef(static_cast(otherSide)); } -IPCResult -WindowGlobalParent::RecvUpdateDocumentURI(nsIURI* aURI) -{ +IPCResult WindowGlobalParent::RecvUpdateDocumentURI(nsIURI* aURI) { // XXX(nika): Assert that the URI change was one which makes sense (either // about:blank -> a real URI, or a legal push/popstate URI change?) mDocumentURI = aURI; return IPC_OK(); } -IPCResult -WindowGlobalParent::RecvBecomeCurrentWindowGlobal() -{ +IPCResult WindowGlobalParent::RecvBecomeCurrentWindowGlobal() { mBrowsingContext->SetCurrentWindowGlobal(this); return IPC_OK(); } -bool -WindowGlobalParent::IsCurrentGlobal() -{ +bool WindowGlobalParent::IsCurrentGlobal() { return !mIPCClosed && mBrowsingContext->GetCurrentWindowGlobal() == this; } -void -WindowGlobalParent::ActorDestroy(ActorDestroyReason aWhy) -{ +void WindowGlobalParent::ActorDestroy(ActorDestroyReason aWhy) { mIPCClosed = true; gWindowGlobalParentsById->Remove(mInnerWindowId); mBrowsingContext->UnregisterWindowGlobal(this); } -WindowGlobalParent::~WindowGlobalParent() -{ +WindowGlobalParent::~WindowGlobalParent() { MOZ_ASSERT(!gWindowGlobalParentsById || !gWindowGlobalParentsById->Contains(mInnerWindowId)); } -JSObject* -WindowGlobalParent::WrapObject(JSContext* aCx, - JS::Handle aGivenProto) -{ +JSObject* WindowGlobalParent::WrapObject(JSContext* aCx, + JS::Handle aGivenProto) { return WindowGlobalParent_Binding::Wrap(aCx, this, aGivenProto); } -nsISupports* -WindowGlobalParent::GetParentObject() -{ +nsISupports* WindowGlobalParent::GetParentObject() { return xpc::NativeGlobal(xpc::PrivilegedJunkScope()); } -NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(WindowGlobalParent, - mFrameLoader, +NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(WindowGlobalParent, mFrameLoader, mBrowsingContext) NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(WindowGlobalParent, AddRef) NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(WindowGlobalParent, Release) -} // namespace dom -} // namespace mozilla +} // namespace dom +} // namespace mozilla diff --git a/dom/ipc/WindowGlobalParent.h b/dom/ipc/WindowGlobalParent.h index e31e6ca767c2..92b87269a432 100644 --- a/dom/ipc/WindowGlobalParent.h +++ b/dom/ipc/WindowGlobalParent.h @@ -16,7 +16,7 @@ class nsIURI; class nsFrameLoader; namespace mozilla { -namespace dom { +namespace dom { class ChromeBrowsingContext; class WindowGlobalChild; @@ -24,18 +24,17 @@ class WindowGlobalChild; /** * A handle in the parent process to a specific nsGlobalWindowInner object. */ -class WindowGlobalParent final : public nsWrapperCache - , public PWindowGlobalParent -{ -public: +class WindowGlobalParent final : public nsWrapperCache, + public PWindowGlobalParent { + public: NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WindowGlobalParent) NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WindowGlobalParent) - static already_AddRefed - GetByInnerWindowId(uint64_t aInnerWindowId); + static already_AddRefed GetByInnerWindowId( + uint64_t aInnerWindowId); - static already_AddRefed - GetByInnerWindowId(const GlobalObject& aGlobal, uint64_t aInnerWindowId) { + static already_AddRefed GetByInnerWindowId( + const GlobalObject& aGlobal, uint64_t aInnerWindowId) { return GetByInnerWindowId(aInnerWindowId); } @@ -85,14 +84,14 @@ public: JSObject* WrapObject(JSContext* aCx, JS::Handle aGivenProto) override; -protected: + protected: // IPC messages mozilla::ipc::IPCResult RecvUpdateDocumentURI(nsIURI* aURI) override; mozilla::ipc::IPCResult RecvBecomeCurrentWindowGlobal() override; void ActorDestroy(ActorDestroyReason aWhy) override; -private: + private: ~WindowGlobalParent(); // NOTE: This document principal doesn't reflect possible |document.domain| @@ -107,7 +106,7 @@ private: bool mIPCClosed; }; -} // namespace dom -} // namespace mozilla +} // namespace dom +} // namespace mozilla -#endif // !defined(mozilla_dom_WindowGlobalParent_h) +#endif // !defined(mozilla_dom_WindowGlobalParent_h) diff --git a/dom/media/systemservices/video_engine/platform_uithread.cc b/dom/media/systemservices/video_engine/platform_uithread.cc index f05cbd3f0aaf..3f0e99ef672e 100644 --- a/dom/media/systemservices/video_engine/platform_uithread.cc +++ b/dom/media/systemservices/video_engine/platform_uithread.cc @@ -14,7 +14,8 @@ namespace rtc { #if defined(WEBRTC_WIN) // For use in ThreadWindowsUI callbacks -static UINT static_reg_windows_msg = RegisterWindowMessageW(L"WebrtcWindowsUIThreadEvent"); +static UINT static_reg_windows_msg = + RegisterWindowMessageW(L"WebrtcWindowsUIThreadEvent"); // timer id used in delayed callbacks static const UINT_PTR kTimerId = 1; static const wchar_t kThisProperty[] = L"ThreadWindowsUIPtr"; @@ -34,9 +35,8 @@ bool PlatformUIThread::InternalInit() { wc.lpszClassName = kThreadWindow; RegisterClassW(&wc); } - hwnd_ = CreateWindowW(kThreadWindow, L"", - 0, 0, 0, 0, 0, - NULL, NULL, hModule, NULL); + hwnd_ = CreateWindowW(kThreadWindow, L"", 0, 0, 0, 0, 0, NULL, NULL, + hModule, NULL); RTC_DCHECK(hwnd_); SetPropW(hwnd_, kThisProperty, this); @@ -89,7 +89,7 @@ void PlatformUIThread::Stop() { } void PlatformUIThread::Run() { - RTC_CHECK(InternalInit()); // always evaluates + RTC_CHECK(InternalInit()); // always evaluates do { // The interface contract of Start/Stop is that for a successful call to // Start, there should be at least one call to the run function. So we @@ -123,15 +123,17 @@ void PlatformUIThread::NativeEventCallback() { } /* static */ -LRESULT CALLBACK -PlatformUIThread::EventWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { +LRESULT CALLBACK PlatformUIThread::EventWindowProc(HWND hwnd, UINT uMsg, + WPARAM wParam, + LPARAM lParam) { if (uMsg == WM_DESTROY) { RemovePropW(hwnd, kThisProperty); PostQuitMessage(0); return 0; } - PlatformUIThread *twui = static_cast(GetPropW(hwnd, kThisProperty)); + PlatformUIThread *twui = + static_cast(GetPropW(hwnd, kThisProperty)); if (!twui) { return DefWindowProc(hwnd, uMsg, wParam, lParam); } diff --git a/image/AnimationFrameBuffer.cpp b/image/AnimationFrameBuffer.cpp index 55f4d341794b..6510dfc18aeb 100644 --- a/image/AnimationFrameBuffer.cpp +++ b/image/AnimationFrameBuffer.cpp @@ -468,8 +468,8 @@ bool AnimationFrameRecyclingQueue::MarkComplete( // If we encounter a redecode error, just make the first frame refresh area to // be the full frame, because we don't really know what we can safely recycle. - mFirstFrameRefreshArea = mRedecodeError ? mFirstFrame->GetRect() - : aFirstFrameRefreshArea; + mFirstFrameRefreshArea = + mRedecodeError ? mFirstFrame->GetRect() : aFirstFrameRefreshArea; return continueDecoding; } diff --git a/ipc/glue/InProcessChild.cpp b/ipc/glue/InProcessChild.cpp index 53d6451b5c53..8abb37660dcb 100644 --- a/ipc/glue/InProcessChild.cpp +++ b/ipc/glue/InProcessChild.cpp @@ -12,20 +12,17 @@ using namespace mozilla::dom; namespace mozilla { namespace ipc { -PWindowGlobalChild* -InProcessChild::AllocPWindowGlobalChild(const WindowGlobalInit& aInit) -{ +PWindowGlobalChild* InProcessChild::AllocPWindowGlobalChild( + const WindowGlobalInit& aInit) { MOZ_ASSERT_UNREACHABLE("PWindowGlobalChild should not be created manually"); return nullptr; } -bool -InProcessChild::DeallocPWindowGlobalChild(PWindowGlobalChild* aActor) -{ +bool InProcessChild::DeallocPWindowGlobalChild(PWindowGlobalChild* aActor) { // Free IPC-held reference static_cast(aActor)->Release(); return true; } -} // namespace ipc -} // namespace mozilla +} // namespace ipc +} // namespace mozilla diff --git a/ipc/glue/InProcessChild.h b/ipc/glue/InProcessChild.h index e0001beaeac0..34ed1ee82d69 100644 --- a/ipc/glue/InProcessChild.h +++ b/ipc/glue/InProcessChild.h @@ -14,7 +14,7 @@ namespace mozilla { namespace dom { class PWindowGlobalParent; class PWindowGlobalChild; -} // namespace dom +} // namespace dom namespace ipc { @@ -28,9 +28,8 @@ class InProcessParent; * for async actors which want to communicate uniformly between Content->Chrome * and Chrome->Chrome situations. */ -class InProcessChild : public PInProcessChild -{ -public: +class InProcessChild : public PInProcessChild { + public: friend class InProcessParent; NS_INLINE_DECL_REFCOUNTING(InProcessChild) @@ -43,14 +42,14 @@ public: // |nullptr|. static IProtocol* ParentActorFor(IProtocol* aActor); -protected: - virtual mozilla::dom::PWindowGlobalChild* - AllocPWindowGlobalChild(const WindowGlobalInit& aInit) override; + protected: + virtual mozilla::dom::PWindowGlobalChild* AllocPWindowGlobalChild( + const WindowGlobalInit& aInit) override; - virtual bool - DeallocPWindowGlobalChild(mozilla::dom::PWindowGlobalChild* aActor) override; + virtual bool DeallocPWindowGlobalChild( + mozilla::dom::PWindowGlobalChild* aActor) override; -private: + private: // NOTE: PInProcess lifecycle management is declared as staic methods and // state on InProcessParent, and implemented in InProcessImpl.cpp. virtual void ActorDestroy(ActorDestroyReason aWhy) override; @@ -60,7 +59,7 @@ private: static StaticRefPtr sSingleton; }; -} // namespace ipc -} // namespace mozilla +} // namespace ipc +} // namespace mozilla -#endif // defined(mozilla_ipc_InProcessChild_h) +#endif // defined(mozilla_ipc_InProcessChild_h) diff --git a/ipc/glue/InProcessImpl.cpp b/ipc/glue/InProcessImpl.cpp index f882bedeae0e..b65dd2b0a290 100644 --- a/ipc/glue/InProcessImpl.cpp +++ b/ipc/glue/InProcessImpl.cpp @@ -19,13 +19,11 @@ StaticRefPtr InProcessParent::sSingleton; StaticRefPtr InProcessChild::sSingleton; bool InProcessParent::sShutdown = false; - ////////////////////////////////////////// // InProcess actor lifecycle management // ////////////////////////////////////////// -/* static */ InProcessChild* -InProcessChild::Singleton() { +/* static */ InProcessChild* InProcessChild::Singleton() { MOZ_ASSERT(NS_IsMainThread()); if (!sSingleton) { @@ -34,8 +32,7 @@ InProcessChild::Singleton() { return sSingleton; } -/* static */ InProcessParent* -InProcessParent::Singleton() { +/* static */ InProcessParent* InProcessParent::Singleton() { MOZ_ASSERT(NS_IsMainThread()); if (!sSingleton) { @@ -44,9 +41,7 @@ InProcessParent::Singleton() { return sSingleton; } -/* static */ void -InProcessParent::Startup() -{ +/* static */ void InProcessParent::Startup() { MOZ_ASSERT(NS_IsMainThread()); if (sShutdown) { @@ -87,10 +82,7 @@ InProcessParent::Startup() InProcessChild::sSingleton = child.forget(); } - -/* static */ void -InProcessParent::Shutdown() -{ +/* static */ void InProcessParent::Shutdown() { MOZ_ASSERT(NS_IsMainThread()); if (!sSingleton || sShutdown) { @@ -109,37 +101,29 @@ InProcessParent::Shutdown() } NS_IMETHODIMP -InProcessParent::Observe(nsISupports* aSubject, const char* aTopic, const char16_t* aData) -{ +InProcessParent::Observe(nsISupports* aSubject, const char* aTopic, + const char16_t* aData) { MOZ_ASSERT(!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)); InProcessParent::Shutdown(); return NS_OK; } -void -InProcessParent::ActorDestroy(ActorDestroyReason aWhy) -{ +void InProcessParent::ActorDestroy(ActorDestroyReason aWhy) { InProcessParent::Shutdown(); } -void -InProcessChild::ActorDestroy(ActorDestroyReason aWhy) -{ +void InProcessChild::ActorDestroy(ActorDestroyReason aWhy) { InProcessParent::Shutdown(); } -void -InProcessParent::DeallocPInProcessParent() -{ +void InProcessParent::DeallocPInProcessParent() { MOZ_ASSERT(!InProcessParent::sSingleton); - Release(); // Release the reference taken in InProcessParent::Startup. + Release(); // Release the reference taken in InProcessParent::Startup. } -void -InProcessChild::DeallocPInProcessChild() -{ +void InProcessChild::DeallocPInProcessChild() { MOZ_ASSERT(!InProcessChild::sSingleton); - Release(); // Release the reference taken in InProcessParent::Startup. + Release(); // Release the reference taken in InProcessParent::Startup. } //////////////////////////////// @@ -147,21 +131,19 @@ InProcessChild::DeallocPInProcessChild() //////////////////////////////// // Helper method for implementing ParentActorFor and ChildActorFor. -static IProtocol* -GetOtherInProcessActor(IProtocol* aActor) -{ +static IProtocol* GetOtherInProcessActor(IProtocol* aActor) { MOZ_ASSERT(aActor->GetSide() != UnknownSide, "bad unknown side"); // Discover the manager of aActor which is PInProcess. IProtocol* current = aActor; while (current) { if (current->GetProtocolTypeId() == PInProcessMsgStart) { - break; // Found the correct actor. + break; // Found the correct actor. } current = current->Manager(); } if (!current) { - return nullptr; // Not a PInProcess actor, return |nullptr| + return nullptr; // Not a PInProcess actor, return |nullptr| } MOZ_ASSERT(current->GetSide() == aActor->GetSide(), "side changed?"); @@ -194,19 +176,15 @@ GetOtherInProcessActor(IProtocol* aActor) return otherActor; } -/* static */ IProtocol* -InProcessParent::ChildActorFor(IProtocol* aActor) -{ +/* static */ IProtocol* InProcessParent::ChildActorFor(IProtocol* aActor) { MOZ_ASSERT(aActor && aActor->GetSide() == ParentSide); return GetOtherInProcessActor(aActor); } -/* static */ IProtocol* -InProcessChild::ParentActorFor(IProtocol* aActor) -{ +/* static */ IProtocol* InProcessChild::ParentActorFor(IProtocol* aActor) { MOZ_ASSERT(aActor && aActor->GetSide() == ChildSide); return GetOtherInProcessActor(aActor); } -} // namespace ipc -} // namespace mozilla +} // namespace ipc +} // namespace mozilla diff --git a/ipc/glue/InProcessParent.cpp b/ipc/glue/InProcessParent.cpp index 4d56eb9d070e..b95d73d5bf69 100644 --- a/ipc/glue/InProcessParent.cpp +++ b/ipc/glue/InProcessParent.cpp @@ -14,28 +14,23 @@ namespace ipc { NS_IMPL_ISUPPORTS(InProcessParent, nsIObserver) -IPCResult -InProcessParent::RecvPWindowGlobalConstructor(PWindowGlobalParent* aActor, - const WindowGlobalInit& aInit) -{ +IPCResult InProcessParent::RecvPWindowGlobalConstructor( + PWindowGlobalParent* aActor, const WindowGlobalInit& aInit) { static_cast(aActor)->Init(aInit); return IPC_OK(); } -PWindowGlobalParent* -InProcessParent::AllocPWindowGlobalParent(const WindowGlobalInit& aInit) -{ +PWindowGlobalParent* InProcessParent::AllocPWindowGlobalParent( + const WindowGlobalInit& aInit) { // Reference freed in DeallocPWindowGlobalParent. return do_AddRef(new WindowGlobalParent(aInit, /* inproc */ true)).take(); } -bool -InProcessParent::DeallocPWindowGlobalParent(PWindowGlobalParent* aActor) -{ +bool InProcessParent::DeallocPWindowGlobalParent(PWindowGlobalParent* aActor) { // Free IPC-held reference. static_cast(aActor)->Release(); return true; } -} // namespace ipc -} // namespace mozilla \ No newline at end of file +} // namespace ipc +} // namespace mozilla \ No newline at end of file diff --git a/ipc/glue/InProcessParent.h b/ipc/glue/InProcessParent.h index 145adccd14e6..539c036a4021 100644 --- a/ipc/glue/InProcessParent.h +++ b/ipc/glue/InProcessParent.h @@ -14,7 +14,7 @@ namespace mozilla { namespace dom { class PWindowGlobalParent; class PWindowGlobalChild; -} // namespace dom +} // namespace dom namespace ipc { @@ -28,10 +28,8 @@ class InProcessChild; * for async actors which want to communicate uniformly between Content->Chrome * and Chrome->Chrome situations. */ -class InProcessParent : public nsIObserver - , public PInProcessParent -{ -public: +class InProcessParent : public nsIObserver, public PInProcessParent { + public: friend class InProcessChild; NS_DECL_ISUPPORTS @@ -45,18 +43,18 @@ public: // |nullptr|. static IProtocol* ChildActorFor(IProtocol* aActor); -protected: - virtual mozilla::dom::PWindowGlobalParent* - AllocPWindowGlobalParent(const WindowGlobalInit& aInit) override; + protected: + virtual mozilla::dom::PWindowGlobalParent* AllocPWindowGlobalParent( + const WindowGlobalInit& aInit) override; - virtual bool - DeallocPWindowGlobalParent(mozilla::dom::PWindowGlobalParent* aActor) override; + virtual bool DeallocPWindowGlobalParent( + mozilla::dom::PWindowGlobalParent* aActor) override; - virtual IPCResult - RecvPWindowGlobalConstructor(mozilla::dom::PWindowGlobalParent* aActor, - const WindowGlobalInit& aInit) override; + virtual IPCResult RecvPWindowGlobalConstructor( + mozilla::dom::PWindowGlobalParent* aActor, + const WindowGlobalInit& aInit) override; -private: + private: // Lifecycle management is implemented in InProcessImpl.cpp virtual void ActorDestroy(ActorDestroyReason aWhy) override; virtual void DeallocPInProcessParent() override; @@ -69,8 +67,7 @@ private: static bool sShutdown; }; +} // namespace ipc +} // namespace mozilla -} // namespace ipc -} // namespace mozilla - -#endif // defined(mozilla_ipc_InProcessParent_h) +#endif // defined(mozilla_ipc_InProcessParent_h) diff --git a/js/public/TraceKind.h b/js/public/TraceKind.h index f2d474b3340a..f63c932e0add 100644 --- a/js/public/TraceKind.h +++ b/js/public/TraceKind.h @@ -110,12 +110,11 @@ struct MapTypeToTraceKind { // from somewhere unknown, and results in leaking the subgraph which contains // the key. // See the comments in NoteWeakMapsTracer::trace for more details. -inline constexpr bool IsCCTraceKind(JS::TraceKind aKind) -{ +inline constexpr bool IsCCTraceKind(JS::TraceKind aKind) { switch (aKind) { #define JS_EXPAND_DEF(name, _, isCCTraceKind) \ - case JS::TraceKind::name: \ - return isCCTraceKind; + case JS::TraceKind::name: \ + return isCCTraceKind; JS_FOR_EACH_TRACEKIND(JS_EXPAND_DEF); #undef JS_EXPAND_DEF default: diff --git a/js/src/jit/arm64/Lowering-arm64.cpp b/js/src/jit/arm64/Lowering-arm64.cpp index 2444c0236a5c..ea0988c63ddf 100644 --- a/js/src/jit/arm64/Lowering-arm64.cpp +++ b/js/src/jit/arm64/Lowering-arm64.cpp @@ -215,9 +215,9 @@ void LIRGeneratorARM64::lowerDivI(MDiv* div) { void LIRGeneratorARM64::lowerMulI(MMul* mul, MDefinition* lhs, MDefinition* rhs) { - LMulI* lir = new(alloc()) LMulI; + LMulI* lir = new (alloc()) LMulI; if (mul->fallible()) { - assignSnapshot(lir, Bailout_DoubleOutput); + assignSnapshot(lir, Bailout_DoubleOutput); } lowerForALU(lir, mul, lhs, rhs); } diff --git a/js/src/jsapi.h b/js/src/jsapi.h index ebb38b321735..afdd6b1892f6 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -1465,7 +1465,7 @@ extern JS_PUBLIC_API bool OrdinaryHasInstance(JSContext* cx, // This is almost identical to JS_HasInstance, except the latter may call a // custom hasInstance class op instead of InstanceofOperator. extern JS_PUBLIC_API bool InstanceofOperator(JSContext* cx, HandleObject obj, - HandleValue v, bool* bp); + HandleValue v, bool* bp); } // namespace JS diff --git a/js/src/util/StructuredSpewer.cpp b/js/src/util/StructuredSpewer.cpp index d7e3f43aca0a..49f4a3f4e9df 100644 --- a/js/src/util/StructuredSpewer.cpp +++ b/js/src/util/StructuredSpewer.cpp @@ -176,7 +176,7 @@ void StructuredSpewer::parseSpewFlags(const char* flags) { #undef CHECK_CHANNEL if (ContainsFlag(flags, "help")) { - printf( + printf( "\n" "usage: SPEW=option,option,option,... where options can be:\n" "\n" @@ -208,7 +208,7 @@ void StructuredSpewer::parseSpewFlags(const char* flags) { " output goes to $MOZ_UPLOAD_DIR/spew_output* to ease usage\n" " with Treeherder.\n" - ); + ); exit(0); } } diff --git a/layout/base/ScrollStyles.h b/layout/base/ScrollStyles.h index 1d940a927b17..c12b554ac67b 100644 --- a/layout/base/ScrollStyles.h +++ b/layout/base/ScrollStyles.h @@ -9,7 +9,7 @@ #include #include "nsStyleConsts.h" -#include "nsStyleCoord.h" // for nsStyleCoord +#include "nsStyleCoord.h" // for nsStyleCoord #include "mozilla/dom/WindowBinding.h" // Forward declarations diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 87e39200e1e8..4468bd5dc083 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -1593,7 +1593,7 @@ NS_QUERYFRAME_HEAD(nsXULScrollFrame) NS_QUERYFRAME_ENTRY(nsIScrollbarMediator) NS_QUERYFRAME_TAIL_INHERITING(nsBoxFrame) -//-------------------- Helper ---------------------- + //-------------------- Helper ---------------------- #define SMOOTH_SCROLL_PREF_NAME "general.smoothScroll" diff --git a/layout/printing/nsPrintJob.cpp b/layout/printing/nsPrintJob.cpp index 612c1453acdd..f1d311c443a0 100644 --- a/layout/printing/nsPrintJob.cpp +++ b/layout/printing/nsPrintJob.cpp @@ -46,7 +46,7 @@ static const char sPrintSettingsServiceContractID[] = #include "nsIWebBrowserPrint.h" // Print Preview -#include "imgIContainer.h" // image animation mode constants +#include "imgIContainer.h" // image animation mode constants // Print Progress #include "nsIPrintProgress.h" diff --git a/layout/xul/nsLeafBoxFrame.cpp b/layout/xul/nsLeafBoxFrame.cpp index e26f422b5f66..f1737952aa22 100644 --- a/layout/xul/nsLeafBoxFrame.cpp +++ b/layout/xul/nsLeafBoxFrame.cpp @@ -92,8 +92,7 @@ void nsLeafBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, // leaf boxes continue to receive events in the foreground layer. DisplayBorderBackgroundOutline(aBuilder, aLists); - if (!aBuilder->IsForEventDelivery() || !IsVisibleForPainting()) - return; + if (!aBuilder->IsForEventDelivery() || !IsVisibleForPainting()) return; aLists.Content()->AppendToTop( MakeDisplayItem(aBuilder, this)); diff --git a/layout/xul/tree/nsTreeBodyFrame.cpp b/layout/xul/tree/nsTreeBodyFrame.cpp index 7f00230a8217..be1ec8ee5dc7 100644 --- a/layout/xul/tree/nsTreeBodyFrame.cpp +++ b/layout/xul/tree/nsTreeBodyFrame.cpp @@ -2564,8 +2564,7 @@ class nsDisplayTreeBody final : public nsDisplayItem { void nsTreeBodyFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, const nsDisplayListSet& aLists) { // REVIEW: why did we paint if we were collapsed? that makes no sense! - if (!IsVisibleForPainting()) - return; // We're invisible. Don't paint. + if (!IsVisibleForPainting()) return; // We're invisible. Don't paint. // Handles painting our background, border, and outline. nsLeafBoxFrame::BuildDisplayList(aBuilder, aLists); diff --git a/media/libdav1d/config/other/config.h b/media/libdav1d/config/other/config.h index 8800f071fbe1..f583875d28d6 100644 --- a/media/libdav1d/config/other/config.h +++ b/media/libdav1d/config/other/config.h @@ -24,4 +24,3 @@ #define HAVE_POSIX_MEMALIGN 1 #define HAVE_UNISTD_H 1 - diff --git a/netwerk/base/NetworkConnectivityService.cpp b/netwerk/base/NetworkConnectivityService.cpp index 8319a2c9bd58..cde3ec004cbf 100644 --- a/netwerk/base/NetworkConnectivityService.cpp +++ b/netwerk/base/NetworkConnectivityService.cpp @@ -83,8 +83,7 @@ void NetworkConnectivityService::PerformChecks() { RecheckIPConnectivity(); } -static inline void NotifyObservers(const char *aTopic) -{ +static inline void NotifyObservers(const char *aTopic) { nsCOMPtr obs = mozilla::services::GetObserverService(); obs->NotifyObservers(nullptr, aTopic, nullptr); } diff --git a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp index 7a0c778436d2..5bc3a9e185d7 100644 --- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp +++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp @@ -1773,13 +1773,14 @@ nsUrlClassifierDBService::AsyncClassifyLocalWithTables( if (!tables.IsEmpty()) { nsCOMPtr callback(aCallback); nsCOMPtr cbRunnable = NS_NewRunnableFunction( - "nsUrlClassifierDBService::AsyncClassifyLocalWithTables", - [callback, tables]() -> void { - callback->OnClassifyComplete(NS_OK, // Not used. - tables, - EmptyCString(), // provider. (Not used) - EmptyCString()); // prefix. (Not used) - }); + "nsUrlClassifierDBService::AsyncClassifyLocalWithTables", + [callback, tables]() -> void { + callback->OnClassifyComplete( + NS_OK, // Not used. + tables, + EmptyCString(), // provider. (Not used) + EmptyCString()); // prefix. (Not used) + }); NS_DispatchToMainThread(cbRunnable); return NS_OK; diff --git a/toolkit/recordreplay/HashTable.cpp b/toolkit/recordreplay/HashTable.cpp index 4fe9a2995fa6..941637e6b60f 100644 --- a/toolkit/recordreplay/HashTable.cpp +++ b/toolkit/recordreplay/HashTable.cpp @@ -111,8 +111,7 @@ class StableHashTableInfo { mCallbackStorage(nullptr), mDestroyed(false), mTable(nullptr), - mCallbackHash(0) - { + mCallbackHash(0) { // Use AllocateMemory, as the result will have RWX permissions. mCallbackStorage = (uint8_t*)AllocateMemory(CallbackStorageCapacity, MemoryKind::Tracked); @@ -142,7 +141,8 @@ class StableHashTableInfo { mCallbackHash = HashBytes(mCallbackStorage, mCallbackStorageSize); } else { MOZ_RELEASE_ASSERT(mTable == aTable); - MOZ_RELEASE_ASSERT(mCallbackHash == HashBytes(mCallbackStorage, mCallbackStorageSize)); + MOZ_RELEASE_ASSERT(mCallbackHash == + HashBytes(mCallbackStorage, mCallbackStorageSize)); } } @@ -212,8 +212,7 @@ class StableHashTableInfo { explicit Assembler(StableHashTableInfo& aInfo) : recordreplay::Assembler(aInfo.mCallbackStorage, CallbackStorageCapacity), - mInfo(aInfo) - {} + mInfo(aInfo) {} ~Assembler() { mInfo.mCallbackStorageSize = Current() - mInfo.mCallbackStorage; @@ -424,7 +423,7 @@ void DestroyPLHashTableCallbacks(void* aAllocPrivate) { PLHashTableInfo* info = PLHashTableInfo::MaybeFromPrivate(aAllocPrivate); if (info) { info->MarkDestroyed(); - //delete info; + // delete info; } } diff --git a/toolkit/recordreplay/ProcessRedirectDarwin.cpp b/toolkit/recordreplay/ProcessRedirectDarwin.cpp index 4a1e08063164..c0ec9f5981bb 100644 --- a/toolkit/recordreplay/ProcessRedirectDarwin.cpp +++ b/toolkit/recordreplay/ProcessRedirectDarwin.cpp @@ -2506,54 +2506,53 @@ static SystemRedirection gSystemRedirections[] = { // cannot use dlsym() to lookup symbols that are not externally visible. // Functions which are not overloaded. -#define FOR_EACH_DIAGNOSTIC_REDIRECTION(MACRO) \ - MACRO(PL_HashTableAdd, Preamble_PLHashTable) \ - MACRO(PL_HashTableRemove, Preamble_PLHashTable) \ - MACRO(PL_HashTableLookup, Preamble_PLHashTable) \ - MACRO(PL_HashTableLookupConst, Preamble_PLHashTable) \ - MACRO(PL_HashTableEnumerateEntries, Preamble_PLHashTable) \ - MACRO(PL_HashTableRawAdd, Preamble_PLHashTable) \ - MACRO(PL_HashTableRawRemove, Preamble_PLHashTable) \ - MACRO(PL_HashTableRawLookup, Preamble_PLHashTable) \ +#define FOR_EACH_DIAGNOSTIC_REDIRECTION(MACRO) \ + MACRO(PL_HashTableAdd, Preamble_PLHashTable) \ + MACRO(PL_HashTableRemove, Preamble_PLHashTable) \ + MACRO(PL_HashTableLookup, Preamble_PLHashTable) \ + MACRO(PL_HashTableLookupConst, Preamble_PLHashTable) \ + MACRO(PL_HashTableEnumerateEntries, Preamble_PLHashTable) \ + MACRO(PL_HashTableRawAdd, Preamble_PLHashTable) \ + MACRO(PL_HashTableRawRemove, Preamble_PLHashTable) \ + MACRO(PL_HashTableRawLookup, Preamble_PLHashTable) \ MACRO(PL_HashTableRawLookupConst, Preamble_PLHashTable) // Member functions which need a type specification to resolve overloading. -#define FOR_EACH_DIAGNOSTIC_MEMBER_PTR_WITH_TYPE_REDIRECTION(MACRO) \ +#define FOR_EACH_DIAGNOSTIC_MEMBER_PTR_WITH_TYPE_REDIRECTION(MACRO) \ MACRO(PLDHashEntryHdr* (PLDHashTable::*)(const void*, const fallible_t&), \ &PLDHashTable::Add, Preamble_PLDHashTable) // Member functions which are not overloaded. -#define FOR_EACH_DIAGNOSTIC_MEMBER_PTR_REDIRECTION(MACRO) \ - MACRO(&PLDHashTable::Clear, Preamble_PLDHashTable) \ - MACRO(&PLDHashTable::Remove, Preamble_PLDHashTable) \ +#define FOR_EACH_DIAGNOSTIC_MEMBER_PTR_REDIRECTION(MACRO) \ + MACRO(&PLDHashTable::Clear, Preamble_PLDHashTable) \ + MACRO(&PLDHashTable::Remove, Preamble_PLDHashTable) \ MACRO(&PLDHashTable::RemoveEntry, Preamble_PLDHashTable) -static PreambleResult -Preamble_PLHashTable(CallArguments* aArguments) -{ +static PreambleResult Preamble_PLHashTable(CallArguments* aArguments) { CheckPLHashTable(aArguments->Arg<0, PLHashTable*>()); return PreambleResult::IgnoreRedirect; } -static PreambleResult -Preamble_PLDHashTable(CallArguments* aArguments) -{ +static PreambleResult Preamble_PLDHashTable(CallArguments* aArguments) { CheckPLDHashTable(aArguments->Arg<0, PLDHashTable*>()); return PreambleResult::IgnoreRedirect; } #define MAKE_DIAGNOSTIC_ENTRY_WITH_TYPE(aType, aAddress, aPreamble) \ - { #aAddress, nullptr, nullptr, nullptr, aPreamble }, + {#aAddress, nullptr, nullptr, nullptr, aPreamble}, #define MAKE_DIAGNOSTIC_ENTRY(aAddress, aPreamble) \ - { #aAddress, nullptr, nullptr, nullptr, aPreamble }, + {#aAddress, nullptr, nullptr, nullptr, aPreamble}, static Redirection gDiagnosticRedirections[] = { + // clang-format off FOR_EACH_DIAGNOSTIC_REDIRECTION(MAKE_DIAGNOSTIC_ENTRY) FOR_EACH_DIAGNOSTIC_MEMBER_PTR_WITH_TYPE_REDIRECTION(MAKE_DIAGNOSTIC_ENTRY_WITH_TYPE) FOR_EACH_DIAGNOSTIC_MEMBER_PTR_REDIRECTION(MAKE_DIAGNOSTIC_ENTRY) + // clang-format on }; + #undef MAKE_DIAGNOSTIC_ENTRY_WITH_TYPE #undef MAKE_DIAGNOSTIC_ENTRY @@ -2562,7 +2561,8 @@ static Redirection gDiagnosticRedirections[] = { /////////////////////////////////////////////////////////////////////////////// size_t NumRedirections() { - return ArrayLength(gSystemRedirections) + ArrayLength(gDiagnosticRedirections); + return ArrayLength(gSystemRedirections) + + ArrayLength(gDiagnosticRedirections); } static Redirection* gRedirections; @@ -2593,7 +2593,7 @@ static uint8_t* FunctionStartAddress(Redirection& aRedirection) { template static uint8_t* ConvertMemberPtrToAddress(FnPtr aPtr) { // Dig around in clang's internal representation of member function pointers. - uint8_t** contents = (uint8_t**) &aPtr; + uint8_t** contents = (uint8_t**)&aPtr; return contents[0]; } @@ -2629,18 +2629,21 @@ void EarlyInitializeRedirections() { size_t diagnosticIndex = 0; -#define LOAD_DIAGNOSTIC_ENTRY(aAddress, aPreamble) \ - gDiagnosticRedirections[diagnosticIndex++].mBaseFunction = BitwiseCast(aAddress); +#define LOAD_DIAGNOSTIC_ENTRY(aAddress, aPreamble) \ + gDiagnosticRedirections[diagnosticIndex++].mBaseFunction = \ + BitwiseCast(aAddress); FOR_EACH_DIAGNOSTIC_REDIRECTION(LOAD_DIAGNOSTIC_ENTRY) #undef LOAD_DIAGNOSTIC_ENTRY -#define LOAD_DIAGNOSTIC_ENTRY(aType, aAddress, aPreamble) \ - gDiagnosticRedirections[diagnosticIndex++].mBaseFunction = ConvertMemberPtrToAddress(aAddress); +#define LOAD_DIAGNOSTIC_ENTRY(aType, aAddress, aPreamble) \ + gDiagnosticRedirections[diagnosticIndex++].mBaseFunction = \ + ConvertMemberPtrToAddress(aAddress); FOR_EACH_DIAGNOSTIC_MEMBER_PTR_WITH_TYPE_REDIRECTION(LOAD_DIAGNOSTIC_ENTRY) #undef LOAD_DIAGNOSTIC_ENTRY -#define LOAD_DIAGNOSTIC_ENTRY(aAddress, aPreamble) \ - gDiagnosticRedirections[diagnosticIndex++].mBaseFunction = ConvertMemberPtrToAddress(aAddress); +#define LOAD_DIAGNOSTIC_ENTRY(aAddress, aPreamble) \ + gDiagnosticRedirections[diagnosticIndex++].mBaseFunction = \ + ConvertMemberPtrToAddress(aAddress); FOR_EACH_DIAGNOSTIC_MEMBER_PTR_REDIRECTION(LOAD_DIAGNOSTIC_ENTRY) #undef LOAD_DIAGNOSTIC_ENTRY diff --git a/widget/gtk/mozcontainer.cpp b/widget/gtk/mozcontainer.cpp index 1db28d7ab574..a0a1b1128bbe 100644 --- a/widget/gtk/mozcontainer.cpp +++ b/widget/gtk/mozcontainer.cpp @@ -211,15 +211,15 @@ static void moz_container_unmap_wayland(MozContainer *container) { } static gint moz_container_get_scale(MozContainer *container) { - static auto sGdkWindowGetScaleFactorPtr = (gint(*)(GdkWindow *))dlsym( - RTLD_DEFAULT, "gdk_window_get_scale_factor"); + static auto sGdkWindowGetScaleFactorPtr = + (gint(*)(GdkWindow *))dlsym(RTLD_DEFAULT, "gdk_window_get_scale_factor"); - if (sGdkWindowGetScaleFactorPtr) { - GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(container)); - return (*sGdkWindowGetScaleFactorPtr)(window); - } + if (sGdkWindowGetScaleFactorPtr) { + GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(container)); + return (*sGdkWindowGetScaleFactorPtr)(window); + } - return 1; + return 1; } #endif @@ -352,8 +352,7 @@ void moz_container_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { } if (container->eglwindow) { gint scale = moz_container_get_scale(container); - wl_egl_window_resize(container->eglwindow, - allocation->width * scale, + wl_egl_window_resize(container->eglwindow, allocation->width * scale, allocation->height * scale, 0, 0); } #endif @@ -506,9 +505,9 @@ struct wl_egl_window *moz_container_get_wl_egl_window(MozContainer *container) { GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(container)); gint scale = moz_container_get_scale(container); - container->eglwindow = wl_egl_window_create( - surface, gdk_window_get_width(window) * scale, - gdk_window_get_height(window) * scale); + container->eglwindow = + wl_egl_window_create(surface, gdk_window_get_width(window) * scale, + gdk_window_get_height(window) * scale); } return container->eglwindow; } diff --git a/xpcom/ds/PLDHashTable.h b/xpcom/ds/PLDHashTable.h index 77c419ffff99..8346aa113f80 100644 --- a/xpcom/ds/PLDHashTable.h +++ b/xpcom/ds/PLDHashTable.h @@ -436,10 +436,7 @@ class PLDHashTable { } // Provide access to the raw ops to internal record/replay structures. - const PLDHashTableOps* RecordReplayWrappedOps() const - { - return mOps; - } + const PLDHashTableOps* RecordReplayWrappedOps() const { return mOps; } // Size in entries (gross, not net of free and removed sentinels) for table. // This can be zero if no elements have been added yet, in which case the