From a801064e4237a95dfceea0edf6831c21bf869688 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 6 Jul 2019 08:18:28 +0000 Subject: [PATCH] Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D35622 --- docshell/base/nsDocShell.h | 7 +- dom/base/BindContext.h | 1 - dom/base/DocGroup.cpp | 14 ++- dom/base/DocGroup.h | 5 +- dom/base/ShadowRoot.h | 4 +- dom/base/nsGlobalWindowInner.h | 3 +- dom/base/nsGlobalWindowOuter.h | 1 + dom/base/nsImageLoadingContent.cpp | 1 - dom/base/nsNodeUtils.cpp | 5 +- dom/bindings/RemoteObjectProxy.h | 3 +- dom/gamepad/fallback/FallbackGamepad.cpp | 3 +- dom/html/nsIFormControl.h | 4 +- dom/ipc/BrowserChild.h | 6 +- dom/localstorage/ActorsParent.cpp | 14 +-- dom/media/AutoplayPolicy.cpp | 10 ++- gfx/2d/DrawTargetD2D1.cpp | 3 +- gfx/2d/PathCairo.cpp | 6 +- gfx/2d/PathRecording.cpp | 2 +- gfx/2d/PathRecording.h | 15 ++-- gfx/2d/PathSkia.cpp | 8 +- gfx/2d/PathSkia.h | 10 +-- gfx/2d/ScaledFontDWrite.cpp | 3 +- gfx/config/gfxVars.h | 2 +- gfx/layers/apz/public/APZUpdater.h | 4 +- gfx/layers/apz/src/APZCTreeManager.h | 7 +- gfx/layers/apz/src/APZUpdater.cpp | 7 +- gfx/layers/apz/src/AsyncPanZoomController.cpp | 5 +- gfx/layers/apz/src/HitTestingTreeNode.cpp | 10 +-- gfx/layers/client/TextureClient.cpp | 87 +++++++++---------- gfx/layers/client/TextureClient.h | 8 +- gfx/layers/composite/CompositableHost.cpp | 2 +- gfx/layers/composite/TiledContentHost.cpp | 2 +- gfx/layers/ipc/CompositorBridgeParent.cpp | 7 +- gfx/layers/ipc/ImageBridgeChild.cpp | 2 +- gfx/layers/ipc/LayersMessageUtils.h | 7 +- gfx/layers/opengl/TextureHostOGL.cpp | 3 +- gfx/layers/wr/WebRenderCommandBuilder.cpp | 3 +- gfx/thebes/gfxMacPlatformFontList.mm | 23 +++-- js/public/Value.h | 2 +- js/src/gc/Statistics.cpp | 3 +- js/src/jit/BaselineIC.h | 1 - js/src/vm/Initialization.cpp | 6 +- js/src/vm/RegExpShared.h | 7 +- js/src/wasm/WasmCraneliftCompile.cpp | 28 +++--- layout/base/nsDocumentViewer.cpp | 7 +- layout/generic/nsGridContainerFrame.cpp | 15 ++-- layout/painting/FrameLayerBuilder.cpp | 2 +- layout/painting/nsCSSRenderingGradients.cpp | 1 - layout/painting/nsDisplayList.h | 4 +- layout/style/ServoStyleConstsInlines.h | 2 +- layout/style/nsStyleStruct.cpp | 6 +- layout/svg/nsSVGImageFrame.h | 2 +- layout/xul/nsXULPopupManager.cpp | 6 +- .../src/peerconnection/PeerConnectionImpl.h | 4 +- mozglue/misc/interceptor/MMPolicies.h | 52 +++++------ mozglue/tests/gtest/TestDLLBlocklist.cpp | 16 ++-- toolkit/components/places/FaviconHelpers.cpp | 3 +- .../test/gtest/TestCompatVersionCompare.cpp | 28 +++--- uriloader/base/nsDocLoader.cpp | 16 ++-- uriloader/base/nsDocLoader.h | 5 +- widget/GfxInfoBase.cpp | 3 +- widget/InputData.h | 27 +++--- xpcom/base/nsVersionComparator.cpp | 3 +- xpcom/ds/nsGkAtoms.h | 4 +- 64 files changed, 276 insertions(+), 284 deletions(-) diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h index c28da292be634..1bea3fb8320d1 100644 --- a/docshell/base/nsDocShell.h +++ b/docshell/base/nsDocShell.h @@ -270,9 +270,10 @@ class nsDocShell final : public nsDocLoader, LOCATION_CHANGE_SAME_DOCUMENT); } - // This function is created exclusively for dom.background_loading_iframe is set. - // As soon as the current DocShell knows itself can be treated as background loading, - // it triggers the parent docshell to see if the parent document can fire load event earlier. + // This function is created exclusively for dom.background_loading_iframe is + // set. As soon as the current DocShell knows itself can be treated as + // background loading, it triggers the parent docshell to see if the parent + // document can fire load event earlier. void TriggerParentCheckDocShellIsEmpty() { RefPtr parent = GetParentDocshell(); if (parent) { diff --git a/dom/base/BindContext.h b/dom/base/BindContext.h index 7f5fc99a52b47..df4b5f5aba642 100644 --- a/dom/base/BindContext.h +++ b/dom/base/BindContext.h @@ -113,7 +113,6 @@ struct MOZ_STACK_CLASS BindContext final { } private: - static bool IsLikelyUndisplayed(const nsINode& aParent) { return aParent.IsAnyOfHTMLElements(nsGkAtoms::style, nsGkAtoms::script); } diff --git a/dom/base/DocGroup.cpp b/dom/base/DocGroup.cpp index 01dcd49380271..80f4fb58ded58 100644 --- a/dom/base/DocGroup.cpp +++ b/dom/base/DocGroup.cpp @@ -194,14 +194,12 @@ void DocGroup::SignalSlotChange(HTMLSlotElement& aSlot) { } bool DocGroup::TryToLoadIframesInBackground() { - return - StaticPrefs::dom_separate_event_queue_for_post_message_enabled() && - StaticPrefs::dom_cross_origin_iframes_loaded_in_background(); + return StaticPrefs::dom_separate_event_queue_for_post_message_enabled() && + StaticPrefs::dom_cross_origin_iframes_loaded_in_background(); } nsresult DocGroup::QueueIframePostMessages( - already_AddRefed&& aRunnable, - uint64_t aWindowId) { + already_AddRefed&& aRunnable, uint64_t aWindowId) { if (DocGroup::TryToLoadIframesInBackground()) { if (!mIframePostMessageQueue) { nsCOMPtr target = GetMainThreadSerialEventTarget(); @@ -221,8 +219,7 @@ nsresult DocGroup::QueueIframePostMessages( mIframesUsedPostMessageQueue.PutEntry(aWindowId); - mIframePostMessageQueue->Dispatch(std::move(aRunnable), - NS_DISPATCH_NORMAL); + mIframePostMessageQueue->Dispatch(std::move(aRunnable), NS_DISPATCH_NORMAL); return NS_OK; } return NS_ERROR_FAILURE; @@ -231,8 +228,7 @@ nsresult DocGroup::QueueIframePostMessages( void DocGroup::TryFlushIframePostMessages(uint64_t aWindowId) { if (DocGroup::TryToLoadIframesInBackground()) { mIframesUsedPostMessageQueue.RemoveEntry(aWindowId); - if (mIframePostMessageQueue && - mIframesUsedPostMessageQueue.IsEmpty()) { + if (mIframePostMessageQueue && mIframesUsedPostMessageQueue.IsEmpty()) { MOZ_ASSERT(mIframePostMessageQueue->IsPaused()); nsresult rv = mIframePostMessageQueue->SetIsPaused(true); MOZ_ALWAYS_SUCCEEDS(rv); diff --git a/dom/base/DocGroup.h b/dom/base/DocGroup.h index ebdd9aa7c7bf7..8879c9304e69c 100644 --- a/dom/base/DocGroup.h +++ b/dom/base/DocGroup.h @@ -105,9 +105,8 @@ class DocGroup final { // Returns true if any of its documents are active but not in the bfcache. bool IsActive() const; - nsresult QueueIframePostMessages( - already_AddRefed&& aRunnable, - uint64_t aWindowId); + nsresult QueueIframePostMessages(already_AddRefed&& aRunnable, + uint64_t aWindowId); void TryFlushIframePostMessages(uint64_t aWindowId); diff --git a/dom/base/ShadowRoot.h b/dom/base/ShadowRoot.h index 2e6a99b7411b4..4de3c5440e349 100644 --- a/dom/base/ShadowRoot.h +++ b/dom/base/ShadowRoot.h @@ -161,9 +161,7 @@ class ShadowRoot final : public DocumentFragment, void PartAdded(const Element&); void PartRemoved(const Element&); - const nsTArray& Parts() const { - return mParts; - } + const nsTArray& Parts() const { return mParts; } const RawServoAuthorStyles* GetServoStyles() const { return mServoStyles.get(); diff --git a/dom/base/nsGlobalWindowInner.h b/dom/base/nsGlobalWindowInner.h index 9114ff65d4137..1aac9dacf95f2 100644 --- a/dom/base/nsGlobalWindowInner.h +++ b/dom/base/nsGlobalWindowInner.h @@ -1443,7 +1443,8 @@ class nsGlobalWindowInner final : public mozilla::dom::EventTarget, : Runnable("DeprioritizedLoadRunner"), mInner(aInner) {} NS_IMETHOD Run() override { - if (mInner) {; + if (mInner) { + ; RefPtr inner = std::move(mInner); inner->Run(); } diff --git a/dom/base/nsGlobalWindowOuter.h b/dom/base/nsGlobalWindowOuter.h index 681d922a1619b..6e1557460dfa6 100644 --- a/dom/base/nsGlobalWindowOuter.h +++ b/dom/base/nsGlobalWindowOuter.h @@ -541,6 +541,7 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget, nsresult GetPrompter(nsIPrompt** aPrompt) override; RefPtr mPostMessageEventQueue; + protected: nsPIDOMWindowOuter* GetOpenerWindowOuter(); // Initializes the mWasOffline member variable diff --git a/dom/base/nsImageLoadingContent.cpp b/dom/base/nsImageLoadingContent.cpp index 38efa3c376210..60730b6b5b367 100644 --- a/dom/base/nsImageLoadingContent.cpp +++ b/dom/base/nsImageLoadingContent.cpp @@ -1146,7 +1146,6 @@ nsresult nsImageLoadingContent::LoadImage(nsIURI* aNewURI, bool aForce, nsLoadFlags loadFlags = aLoadFlags | nsContentUtils::CORSModeToLoadImageFlags(GetCORSMode()); - RefPtr& req = PrepareNextRequest(aImageLoadType); nsCOMPtr content = do_QueryInterface(static_cast(this)); diff --git a/dom/base/nsNodeUtils.cpp b/dom/base/nsNodeUtils.cpp index 27b94ec2396ca..179904d352f5a 100644 --- a/dom/base/nsNodeUtils.cpp +++ b/dom/base/nsNodeUtils.cpp @@ -320,8 +320,9 @@ void nsNodeUtils::LastRelease(nsINode* aNode) { aNode->UnsetFlags(NODE_HAS_LISTENERMANAGER); } - NS_ASSERTION(!Element::FromNode(aNode) || - !Element::FromNode(aNode)->GetXBLBinding(), "Node has binding on destruction"); + NS_ASSERTION( + !Element::FromNode(aNode) || !Element::FromNode(aNode)->GetXBLBinding(), + "Node has binding on destruction"); aNode->ReleaseWrapper(aNode); diff --git a/dom/bindings/RemoteObjectProxy.h b/dom/bindings/RemoteObjectProxy.h index 7887a951fb7a0..4b5ac9dd922ab 100644 --- a/dom/bindings/RemoteObjectProxy.h +++ b/dom/bindings/RemoteObjectProxy.h @@ -172,8 +172,7 @@ class RemoteObjectProxy : public RemoteObjectProxyBase { * represents an object implementing the WebIDL interface for * aProtoID. */ -inline bool IsRemoteObjectProxy(JSObject* aObj, - prototypes::ID aProtoID) { +inline bool IsRemoteObjectProxy(JSObject* aObj, prototypes::ID aProtoID) { if (!js::IsProxy(aObj)) { return false; } diff --git a/dom/gamepad/fallback/FallbackGamepad.cpp b/dom/gamepad/fallback/FallbackGamepad.cpp index e83ae6ed4e28d..be86fd037e3ee 100644 --- a/dom/gamepad/fallback/FallbackGamepad.cpp +++ b/dom/gamepad/fallback/FallbackGamepad.cpp @@ -13,7 +13,8 @@ void StartGamepadMonitoring() {} void StopGamepadMonitoring() {} -void SetGamepadLightIndicatorColor(uint32_t, uint32_t, uint8_t, uint8_t, uint8_t) {} +void SetGamepadLightIndicatorColor(uint32_t, uint32_t, uint8_t, uint8_t, + uint8_t) {} } // namespace dom } // namespace mozilla diff --git a/dom/html/nsIFormControl.h b/dom/html/nsIFormControl.h index 43f72ddf0dd8f..1b19d337be2bd 100644 --- a/dom/html/nsIFormControl.h +++ b/dom/html/nsIFormControl.h @@ -293,8 +293,8 @@ bool nsIFormControl::IsSingleLineTextControl(bool aExcludePassword, bool nsIFormControl::IsSubmittableControl() const { uint32_t type = ControlType(); return type == NS_FORM_OBJECT || type == NS_FORM_TEXTAREA || - type == NS_FORM_SELECT || - type & NS_FORM_BUTTON_ELEMENT || type & NS_FORM_INPUT_ELEMENT; + type == NS_FORM_SELECT || type & NS_FORM_BUTTON_ELEMENT || + type & NS_FORM_INPUT_ELEMENT; } bool nsIFormControl::AllowDraggableChildren() const { diff --git a/dom/ipc/BrowserChild.h b/dom/ipc/BrowserChild.h index 97ab82cb6305c..bd9d4f2a86eda 100644 --- a/dom/ipc/BrowserChild.h +++ b/dom/ipc/BrowserChild.h @@ -256,9 +256,9 @@ class BrowserChild final : public nsMessageManagerScriptExecutor, JS::Handle aCpows, nsIPrincipal* aPrincipal) override; - bool DoUpdateZoomConstraints( - const uint32_t& aPresShellId, const ViewID& aViewId, - const Maybe& aConstraints); + bool DoUpdateZoomConstraints(const uint32_t& aPresShellId, + const ViewID& aViewId, + const Maybe& aConstraints); mozilla::ipc::IPCResult RecvLoadURL(const nsCString& aURI, const ShowInfo& aInfo); diff --git a/dom/localstorage/ActorsParent.cpp b/dom/localstorage/ActorsParent.cpp index 48e6f994a37f1..0ec1f2b0a230b 100644 --- a/dom/localstorage/ActorsParent.cpp +++ b/dom/localstorage/ActorsParent.cpp @@ -4387,8 +4387,8 @@ nsresult Connection::BeginWriteTransaction() { MOZ_ASSERT(mStorageConnection); CachedStatement stmt; - nsresult rv = GetCachedStatement(NS_LITERAL_CSTRING("BEGIN IMMEDIATE;"), - &stmt); + nsresult rv = + GetCachedStatement(NS_LITERAL_CSTRING("BEGIN IMMEDIATE;"), &stmt); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } @@ -9425,9 +9425,7 @@ QuotaClient::MatchFunction::OnFunctionCall( ******************************************************************************/ AutoWriteTransaction::AutoWriteTransaction(bool aShadowWrites) - : mConnection(nullptr) - , mShadowWrites(aShadowWrites) -{ + : mConnection(nullptr), mShadowWrites(aShadowWrites) { AssertIsOnConnectionThread(); MOZ_COUNT_CTOR(mozilla::dom::AutoWriteTransaction); @@ -9494,7 +9492,8 @@ nsresult AutoWriteTransaction::Commit() { return NS_OK; } -nsresult AutoWriteTransaction::LockAndAttachShadowDatabase(Connection* aConnection) { +nsresult AutoWriteTransaction::LockAndAttachShadowDatabase( + Connection* aConnection) { AssertIsOnConnectionThread(); MOZ_ASSERT(aConnection); MOZ_ASSERT(!mConnection); @@ -9511,7 +9510,8 @@ nsresult AutoWriteTransaction::LockAndAttachShadowDatabase(Connection* aConnecti mShadowDatabaseLock.emplace( aConnection->GetQuotaClient()->ShadowDatabaseMutex()); - nsresult rv = AttachShadowDatabase(quotaManager->GetBasePath(), storageConnection); + nsresult rv = + AttachShadowDatabase(quotaManager->GetBasePath(), storageConnection); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } diff --git a/dom/media/AutoplayPolicy.cpp b/dom/media/AutoplayPolicy.cpp index 267a082dd2b8a..969a48d8682b2 100644 --- a/dom/media/AutoplayPolicy.cpp +++ b/dom/media/AutoplayPolicy.cpp @@ -74,7 +74,8 @@ static uint32_t SiteAutoplayPerm(const Document* aDocument) { NS_ENSURE_TRUE(permMgr, nsIPermissionManager::DENY_ACTION); uint32_t perm; - nsresult rv = permMgr->TestExactPermissionFromPrincipal(principal, NS_LITERAL_CSTRING("autoplay-media"), &perm); + nsresult rv = permMgr->TestExactPermissionFromPrincipal( + principal, NS_LITERAL_CSTRING("autoplay-media"), &perm); NS_ENSURE_SUCCESS(rv, nsIPermissionManager::DENY_ACTION); return perm; } @@ -187,9 +188,10 @@ static bool IsAllowedToPlayInternal(const HTMLMediaElement& aElement) { uint32_t defaultBehaviour = DefaultAutoplayBehaviour(); uint32_t sitePermission = SiteAutoplayPerm(approver); - AUTOPLAY_LOG("IsAllowedToPlayInternal, isInaudible=%d," - "isUsingAutoplayModel=%d, sitePermission=%d, defaultBehaviour=%d", - isInaudible, isUsingAutoplayModel, sitePermission, defaultBehaviour); + AUTOPLAY_LOG( + "IsAllowedToPlayInternal, isInaudible=%d," + "isUsingAutoplayModel=%d, sitePermission=%d, defaultBehaviour=%d", + isInaudible, isUsingAutoplayModel, sitePermission, defaultBehaviour); // For site permissions we store permissionManager values except // for BLOCKED_ALL, for the default pref values we store diff --git a/gfx/2d/DrawTargetD2D1.cpp b/gfx/2d/DrawTargetD2D1.cpp index 5873cee2a506c..7bd2e9f813666 100644 --- a/gfx/2d/DrawTargetD2D1.cpp +++ b/gfx/2d/DrawTargetD2D1.cpp @@ -2172,7 +2172,8 @@ already_AddRefed DrawTargetD2D1::GetImageForSurface( case SurfaceType::DUAL_DT: { // Sometimes we have a dual drawtarget but the underlying targets // are d2d surfaces. Let's not readback and reupload in those cases. - SourceSurfaceDual* dualSurface = static_cast(surface.get()); + SourceSurfaceDual* dualSurface = + static_cast(surface.get()); SourceSurface* first = dualSurface->GetFirstSurface(); if (first->GetType() == SurfaceType::D2D1_1_IMAGE) { MOZ_ASSERT(dualSurface->SameSurfaceTypes()); diff --git a/gfx/2d/PathCairo.cpp b/gfx/2d/PathCairo.cpp index bddab619c2c59..28ad343237027 100644 --- a/gfx/2d/PathCairo.cpp +++ b/gfx/2d/PathCairo.cpp @@ -103,13 +103,13 @@ void PathBuilderCairo::Arc(const Point& aOrigin, float aRadius, } already_AddRefed PathBuilderCairo::Finish() { - return MakeAndAddRef(mFillRule, mPathData, mCurrentPoint, mBeginPoint); + return MakeAndAddRef(mFillRule, mPathData, mCurrentPoint, + mBeginPoint); } PathCairo::PathCairo(FillRule aFillRule, std::vector& aPathData, - const Point& aCurrentPoint, - const Point& aBeginPoint) + const Point& aCurrentPoint, const Point& aBeginPoint) : mFillRule(aFillRule), mContainingContext(nullptr), mCurrentPoint(aCurrentPoint), diff --git a/gfx/2d/PathRecording.cpp b/gfx/2d/PathRecording.cpp index 2f9f05522e7af..896cd2205456f 100644 --- a/gfx/2d/PathRecording.cpp +++ b/gfx/2d/PathRecording.cpp @@ -11,7 +11,7 @@ namespace mozilla { namespace gfx { -#define NEXT_PARAMS(_type) \ +#define NEXT_PARAMS(_type) \ const _type params = *reinterpret_cast(nextByte); \ nextByte += sizeof(_type); diff --git a/gfx/2d/PathRecording.h b/gfx/2d/PathRecording.h index 25fc61fc97041..622fa7f4cf8c8 100644 --- a/gfx/2d/PathRecording.h +++ b/gfx/2d/PathRecording.h @@ -161,13 +161,9 @@ class PathBuilderRecording final : public PathBuilder { /* Point the current subpath is at - or where the next subpath will start * if there is no active subpath. */ - Point CurrentPoint() const final { - return mPathBuilder->CurrentPoint(); - } + Point CurrentPoint() const final { return mPathBuilder->CurrentPoint(); } - Point BeginPoint() const final { - return mPathBuilder->BeginPoint(); - } + Point BeginPoint() const final { return mPathBuilder->BeginPoint(); } void SetCurrentPoint(const Point& aPoint) final { mPathBuilder->SetCurrentPoint(aPoint); @@ -193,8 +189,11 @@ class PathRecording final : public Path { PathRecording(Path* aPath, PathOps&& aOps, FillRule aFillRule, const Point& aCurrentPoint, const Point& aBeginPoint) - : mPath(aPath), mPathOps(std::move(aOps)), mFillRule(aFillRule), - mCurrentPoint(aCurrentPoint), mBeginPoint(aBeginPoint) {} + : mPath(aPath), + mPathOps(std::move(aOps)), + mFillRule(aFillRule), + mCurrentPoint(aCurrentPoint), + mBeginPoint(aBeginPoint) {} ~PathRecording(); diff --git a/gfx/2d/PathSkia.cpp b/gfx/2d/PathSkia.cpp index 638e4e73b497a..ce405db9a0543 100644 --- a/gfx/2d/PathSkia.cpp +++ b/gfx/2d/PathSkia.cpp @@ -82,8 +82,8 @@ void PathBuilderSkia::Arc(const Point& aOrigin, float aRadius, } already_AddRefed PathBuilderSkia::Finish() { - RefPtr path = MakeAndAddRef(mPath, mFillRule, - mCurrentPoint, mBeginPoint); + RefPtr path = + MakeAndAddRef(mPath, mFillRule, mCurrentPoint, mBeginPoint); mCurrentPoint = Point(0.0, 0.0); mBeginPoint = Point(0.0, 0.0); return path.forget(); @@ -98,8 +98,8 @@ already_AddRefed PathSkia::CopyToBuilder( already_AddRefed PathSkia::TransformedCopyToBuilder( const Matrix& aTransform, FillRule aFillRule) const { - RefPtr builder = MakeAndAddRef( - aTransform, mPath, aFillRule); + RefPtr builder = + MakeAndAddRef(aTransform, mPath, aFillRule); builder->mCurrentPoint = aTransform.TransformPoint(mCurrentPoint); builder->mBeginPoint = aTransform.TransformPoint(mBeginPoint); diff --git a/gfx/2d/PathSkia.h b/gfx/2d/PathSkia.h index 95f152b070306..2e8147b77f460 100644 --- a/gfx/2d/PathSkia.h +++ b/gfx/2d/PathSkia.h @@ -50,13 +50,11 @@ class PathSkia : public Path { public: MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathSkia, override) - PathSkia(SkPath& aPath, - FillRule aFillRule, - Point aCurrentPoint = Point(), + PathSkia(SkPath& aPath, FillRule aFillRule, Point aCurrentPoint = Point(), Point aBeginPoint = Point()) - : mFillRule(aFillRule) - , mCurrentPoint(aCurrentPoint) - , mBeginPoint(aBeginPoint) { + : mFillRule(aFillRule), + mCurrentPoint(aCurrentPoint), + mBeginPoint(aBeginPoint) { mPath.swap(aPath); } diff --git a/gfx/2d/ScaledFontDWrite.cpp b/gfx/2d/ScaledFontDWrite.cpp index 4e646b5cdf9df..2a54f99d9a0ba 100644 --- a/gfx/2d/ScaledFontDWrite.cpp +++ b/gfx/2d/ScaledFontDWrite.cpp @@ -306,7 +306,8 @@ bool UnscaledFontDWrite::GetFontFileData(FontFileDataOutput aDataCallback, } RefPtr stream; - hr = loader->CreateStreamFromKey(referenceKey, refKeySize, getter_AddRefs(stream)); + hr = loader->CreateStreamFromKey(referenceKey, refKeySize, + getter_AddRefs(stream)); if (FAILED(hr)) { return false; } diff --git a/gfx/config/gfxVars.h b/gfx/config/gfxVars.h index faf47966a51b6..9042de2a77ef5 100644 --- a/gfx/config/gfxVars.h +++ b/gfx/config/gfxVars.h @@ -51,7 +51,7 @@ class gfxVarReceiver; _(AllowD3D11KeyedMutex, bool, false) \ _(SystemTextQuality, int32_t, 5 /* CLEARTYPE_QUALITY */) \ _(LayersWindowRecordingPath, nsCString, nsCString()) \ - _(RemoteCanvasEnabled, bool, false) \ + _(RemoteCanvasEnabled, bool, false) /* Add new entries above this line. */ diff --git a/gfx/layers/apz/public/APZUpdater.h b/gfx/layers/apz/public/APZUpdater.h index 131440b3c1f85..d179ed8306340 100644 --- a/gfx/layers/apz/public/APZUpdater.h +++ b/gfx/layers/apz/public/APZUpdater.h @@ -62,8 +62,8 @@ class APZUpdater { void UpdateFocusState(LayersId aRootLayerTreeId, WRRootId aOriginatingWrRootId, const FocusTarget& aFocusTarget); - void UpdateHitTestingTree(Layer* aRoot, - bool aIsFirstPaint, LayersId aOriginatingLayersId, + void UpdateHitTestingTree(Layer* aRoot, bool aIsFirstPaint, + LayersId aOriginatingLayersId, uint32_t aPaintSequenceNumber); /** * This should be called (in the WR-enabled case) when the compositor receives diff --git a/gfx/layers/apz/src/APZCTreeManager.h b/gfx/layers/apz/src/APZCTreeManager.h index 7f11ea2a47642..71d865c868fa9 100644 --- a/gfx/layers/apz/src/APZCTreeManager.h +++ b/gfx/layers/apz/src/APZCTreeManager.h @@ -185,7 +185,8 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge { * * @param aRoot The root of the (full) layer tree * @param aOriginatingLayersId The layers id of the subtree that triggered - * this repaint, and to which aIsFirstPaint applies. + * this repaint, and to which aIsFirstPaint + * applies. * @param aIsFirstPaint True if the layers update that this is called in * response to included a first-paint. If this is true, * the part of the tree that is affected by the @@ -196,8 +197,8 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge { * process' layer subtree has its own sequence * numbers. */ - void UpdateHitTestingTree(Layer* aRoot, - bool aIsFirstPaint, LayersId aOriginatingLayersId, + void UpdateHitTestingTree(Layer* aRoot, bool aIsFirstPaint, + LayersId aOriginatingLayersId, uint32_t aPaintSequenceNumber); /** diff --git a/gfx/layers/apz/src/APZUpdater.cpp b/gfx/layers/apz/src/APZUpdater.cpp index 02330cf5f88cf..2a7e7dd1300ac 100644 --- a/gfx/layers/apz/src/APZUpdater.cpp +++ b/gfx/layers/apz/src/APZUpdater.cpp @@ -177,14 +177,13 @@ void APZUpdater::UpdateFocusState(LayersId aRootLayerTreeId, aOriginatingWrRootId.mLayersId, aFocusTarget)); } -void APZUpdater::UpdateHitTestingTree(Layer* aRoot, - bool aIsFirstPaint, +void APZUpdater::UpdateHitTestingTree(Layer* aRoot, bool aIsFirstPaint, LayersId aOriginatingWrRootId, uint32_t aPaintSequenceNumber) { MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread()); AssertOnUpdaterThread(); - mApz->UpdateHitTestingTree(aRoot, aIsFirstPaint, - aOriginatingWrRootId, aPaintSequenceNumber); + mApz->UpdateHitTestingTree(aRoot, aIsFirstPaint, aOriginatingWrRootId, + aPaintSequenceNumber); } void APZUpdater::UpdateScrollDataAndTreeState( diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index 544024b00c66d..6736f653e8881 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -2587,7 +2587,7 @@ nsEventStatus AsyncPanZoomController::OnPan(const PanGestureInput& aEvent, physicalPanDisplacement.x * scrollUnitWidth, physicalPanDisplacement.y * scrollUnitHeight); physicalPanDisplacement = ToScreenCoordinates(physicalPanDisplacementPL, - aEvent.mLocalPanStartPoint); + aEvent.mLocalPanStartPoint); logicalPanDisplacement.x *= scrollUnitWidth; logicalPanDisplacement.y *= scrollUnitHeight; } @@ -3967,8 +3967,7 @@ void AsyncPanZoomController::RequestContentRepaint( NewRunnableMethod( "layers::APZCTreeManager::SendSubtreeTransformsToChromeMainThread", GetApzcTreeManager(), - &APZCTreeManager::SendSubtreeTransformsToChromeMainThread, - this)); + &APZCTreeManager::SendSubtreeTransformsToChromeMainThread, this)); } bool AsyncPanZoomController::UpdateAnimation( diff --git a/gfx/layers/apz/src/HitTestingTreeNode.cpp b/gfx/layers/apz/src/HitTestingTreeNode.cpp index b66207d0adecd..988ce32658015 100644 --- a/gfx/layers/apz/src/HitTestingTreeNode.cpp +++ b/gfx/layers/apz/src/HitTestingTreeNode.cpp @@ -4,8 +4,8 @@ #include "HitTestingTreeNode.h" -#include "AsyncPanZoomController.h" // for AsyncPanZoomController -#include "LayersLogging.h" // for Stringify +#include "AsyncPanZoomController.h" // for AsyncPanZoomController +#include "LayersLogging.h" // for Stringify #include "mozilla/StaticPrefs.h" #include "mozilla/gfx/Point.h" // for Point4D #include "mozilla/layers/APZUtils.h" // for CompleteAsyncTransform @@ -322,9 +322,9 @@ LayerToScreenMatrix4x4 HitTestingTreeNode::GetTransformToGecko() const { LayerToParentLayerMatrix4x4 thisToParent = mTransform * AsyncTransformMatrix(); if (mApzc) { - thisToParent = thisToParent * - ViewAs( - mApzc->GetTransformToLastDispatchedPaint()); + thisToParent = + thisToParent * ViewAs( + mApzc->GetTransformToLastDispatchedPaint()); } ParentLayerToScreenMatrix4x4 parentToRoot = ViewAs( diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp index c96f76da3076e..3510d67eecd26 100644 --- a/gfx/layers/client/TextureClient.cpp +++ b/gfx/layers/client/TextureClient.cpp @@ -237,9 +237,8 @@ class TextureChild final : PTextureChild { friend void DeallocateTextureClient(TextureDeallocParams params); }; -static inline gfx::BackendType -BackendTypeForBackendSelector(LayersBackend aLayersBackend, BackendSelector aSelector) -{ +static inline gfx::BackendType BackendTypeForBackendSelector( + LayersBackend aLayersBackend, BackendSelector aSelector) { switch (aSelector) { case BackendSelector::Canvas: return gfxPlatform::GetPlatform()->GetPreferredCanvasBackend(); @@ -251,44 +250,41 @@ BackendTypeForBackendSelector(LayersBackend aLayersBackend, BackendSelector aSel } }; -static TextureType -GetTextureType(gfx::SurfaceFormat aFormat, gfx::IntSize aSize, - LayersBackend aLayersBackend, gfx::BackendType aBackendType, - int32_t aMaxTextureSize, TextureAllocationFlags aAllocFlags) -{ +static TextureType GetTextureType(gfx::SurfaceFormat aFormat, + gfx::IntSize aSize, + LayersBackend aLayersBackend, + gfx::BackendType aBackendType, + int32_t aMaxTextureSize, + TextureAllocationFlags aAllocFlags) { #ifdef XP_WIN if ((aLayersBackend == LayersBackend::LAYERS_D3D11 || aLayersBackend == LayersBackend::LAYERS_WR) && - (aBackendType == gfx::BackendType::DIRECT2D || - aBackendType == gfx::BackendType::DIRECT2D1_1 || - (!!(aAllocFlags & ALLOC_FOR_OUT_OF_BAND_CONTENT) && - DeviceManagerDx::Get()->GetContentDevice())) && - aSize.width <= aMaxTextureSize && - aSize.height <= aMaxTextureSize && + (aBackendType == gfx::BackendType::DIRECT2D || + aBackendType == gfx::BackendType::DIRECT2D1_1 || + (!!(aAllocFlags & ALLOC_FOR_OUT_OF_BAND_CONTENT) && + DeviceManagerDx::Get()->GetContentDevice())) && + aSize.width <= aMaxTextureSize && aSize.height <= aMaxTextureSize && !(aAllocFlags & ALLOC_UPDATE_FROM_SURFACE)) { return TextureType::D3D11; } if (aLayersBackend != LayersBackend::LAYERS_WR && aFormat == SurfaceFormat::B8G8R8X8 && - aBackendType == gfx::BackendType::CAIRO && - NS_IsMainThread()) { + aBackendType == gfx::BackendType::CAIRO && NS_IsMainThread()) { return TextureType::DIB; } #endif #ifdef MOZ_X11 gfxSurfaceType type = - gfxPlatform::GetPlatform()->ScreenReferenceSurface()->GetType(); + gfxPlatform::GetPlatform()->ScreenReferenceSurface()->GetType(); if (aLayersBackend == LayersBackend::LAYERS_BASIC && - aBackendType == gfx::BackendType::CAIRO && - type == gfxSurfaceType::Xlib) { + aBackendType == gfx::BackendType::CAIRO && type == gfxSurfaceType::Xlib) { return TextureType::X11; } if (aLayersBackend == LayersBackend::LAYERS_OPENGL && - type == gfxSurfaceType::Xlib && - aFormat != SurfaceFormat::A8 && + type == gfxSurfaceType::Xlib && aFormat != SurfaceFormat::A8 && gl::sGLXLibrary.UseTextureFromPixmap()) { return TextureType::X11; } @@ -309,9 +305,8 @@ GetTextureType(gfx::SurfaceFormat aFormat, gfx::IntSize aSize, return TextureType::Unknown; } -static bool -ShouldRemoteTextureType(TextureType aTextureType, BackendSelector aSelector) -{ +static bool ShouldRemoteTextureType(TextureType aTextureType, + BackendSelector aSelector) { if (!XRE_IsContentProcess()) { return false; } @@ -329,19 +324,19 @@ ShouldRemoteTextureType(TextureType aTextureType, BackendSelector aSelector) } /* static */ -TextureData* -TextureData::Create(TextureForwarder* aAllocator, gfx::SurfaceFormat aFormat, - gfx::IntSize aSize, LayersBackend aLayersBackend, - int32_t aMaxTextureSize, BackendSelector aSelector, - TextureFlags aTextureFlags, - TextureAllocationFlags aAllocFlags) -{ +TextureData* TextureData::Create(TextureForwarder* aAllocator, + gfx::SurfaceFormat aFormat, gfx::IntSize aSize, + LayersBackend aLayersBackend, + int32_t aMaxTextureSize, + BackendSelector aSelector, + TextureFlags aTextureFlags, + TextureAllocationFlags aAllocFlags) { gfx::BackendType moz2DBackend = - BackendTypeForBackendSelector(aLayersBackend, aSelector); + BackendTypeForBackendSelector(aLayersBackend, aSelector); - TextureType textureType = GetTextureType(aFormat, aSize, aLayersBackend, - moz2DBackend, aMaxTextureSize, - aAllocFlags); + TextureType textureType = + GetTextureType(aFormat, aSize, aLayersBackend, moz2DBackend, + aMaxTextureSize, aAllocFlags); if (ShouldRemoteTextureType(textureType, aSelector)) { RefPtr canvasChild = aAllocator->GetCanvasChild(); @@ -351,7 +346,7 @@ TextureData::Create(TextureForwarder* aAllocator, gfx::SurfaceFormat aFormat, } } - switch(textureType) { + switch (textureType) { #ifdef XP_WIN case TextureType::D3D11: return D3D11TextureData::Create(aSize, aFormat, aAllocFlags); @@ -376,16 +371,14 @@ TextureData::Create(TextureForwarder* aAllocator, gfx::SurfaceFormat aFormat, } /* static */ -bool -TextureData::IsRemote(LayersBackend aLayersBackend, BackendSelector aSelector) -{ +bool TextureData::IsRemote(LayersBackend aLayersBackend, + BackendSelector aSelector) { gfx::BackendType moz2DBackend = - BackendTypeForBackendSelector(aLayersBackend, aSelector); + BackendTypeForBackendSelector(aLayersBackend, aSelector); - TextureType textureType = - GetTextureType(gfx::SurfaceFormat::UNKNOWN, gfx::IntSize(1,1), - aLayersBackend, moz2DBackend, INT32_MAX, - TextureAllocationFlags::ALLOC_DEFAULT); + TextureType textureType = GetTextureType( + gfx::SurfaceFormat::UNKNOWN, gfx::IntSize(1, 1), aLayersBackend, + moz2DBackend, INT32_MAX, TextureAllocationFlags::ALLOC_DEFAULT); return ShouldRemoteTextureType(textureType, aSelector); } @@ -1196,9 +1189,9 @@ already_AddRefed TextureClient::CreateForDrawing( return nullptr; } - TextureData* data = - TextureData::Create(aAllocator, aFormat, aSize, aLayersBackend, - aMaxTextureSize, aSelector, aTextureFlags, aAllocFlags); + TextureData* data = TextureData::Create( + aAllocator, aFormat, aSize, aLayersBackend, aMaxTextureSize, aSelector, + aTextureFlags, aAllocFlags); if (data) { return MakeAndAddRef(data, aTextureFlags, aAllocator); diff --git a/gfx/layers/client/TextureClient.h b/gfx/layers/client/TextureClient.h index a61832443e603..be7346067b6ba 100644 --- a/gfx/layers/client/TextureClient.h +++ b/gfx/layers/client/TextureClient.h @@ -246,11 +246,9 @@ class TextureData { }; static TextureData* Create(TextureForwarder* aAllocator, - gfx::SurfaceFormat aFormat, - gfx::IntSize aSize, + gfx::SurfaceFormat aFormat, gfx::IntSize aSize, LayersBackend aLayersBackend, - int32_t aMaxTextureSize, - BackendSelector aSelector, + int32_t aMaxTextureSize, BackendSelector aSelector, TextureFlags aTextureFlags, TextureAllocationFlags aAllocFlags); @@ -314,7 +312,7 @@ class TextureData { virtual GPUVideoTextureData* AsGPUVideoTextureData() { return nullptr; } -protected: + protected: TextureData() { MOZ_COUNT_CTOR(TextureData); } }; diff --git a/gfx/layers/composite/CompositableHost.cpp b/gfx/layers/composite/CompositableHost.cpp index 5dcb98bba2aa5..056f26de04a21 100644 --- a/gfx/layers/composite/CompositableHost.cpp +++ b/gfx/layers/composite/CompositableHost.cpp @@ -10,7 +10,7 @@ #include "ContentHost.h" // for ContentHostDoubleBuffered, etc #include "Effects.h" // for EffectMask, Effect, etc #include "gfxUtils.h" -#include "ImageHost.h" // for ImageHostBuffered, etc +#include "ImageHost.h" // for ImageHostBuffered, etc #include "Layers.h" #include "TiledContentHost.h" // for TiledContentHost #include "mozilla/gfx/gfxVars.h" diff --git a/gfx/layers/composite/TiledContentHost.cpp b/gfx/layers/composite/TiledContentHost.cpp index 4934b5c29a1af..b562f852d6866 100644 --- a/gfx/layers/composite/TiledContentHost.cpp +++ b/gfx/layers/composite/TiledContentHost.cpp @@ -16,7 +16,7 @@ #include "mozilla/layers/Effects.h" // for TexturedEffect, Effect, etc #include "mozilla/layers/LayerMetricsWrapper.h" // for LayerMetricsWrapper #include "mozilla/layers/PTextureParent.h" -#include "mozilla/layers/TextureHostOGL.h" // for TextureHostOGL +#include "mozilla/layers/TextureHostOGL.h" // for TextureHostOGL #ifdef XP_DARWIN # include "mozilla/layers/TextureSync.h" // for TextureSync #endif diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index 1dde723dadee1..57fd0a02cb84a 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -853,8 +853,7 @@ void CompositorBridgeParent::NotifyShadowTreeTransaction( WRRootId::NonWebRender(aId), aFocusTarget); if (aHitTestUpdate) { mApzUpdater->UpdateHitTestingTree( - mLayerManager->GetRoot(), aIsFirstPaint, aId, - aPaintSequenceNumber); + mLayerManager->GetRoot(), aIsFirstPaint, aId, aPaintSequenceNumber); } } @@ -1248,8 +1247,8 @@ void CompositorBridgeParent::ShadowLayersUpdated( if (aHitTestUpdate) { AutoResolveRefLayers resolve(mCompositionManager); - mApzUpdater->UpdateHitTestingTree(root, - aInfo.isFirstPaint(), mRootLayerTreeID, + mApzUpdater->UpdateHitTestingTree(root, aInfo.isFirstPaint(), + mRootLayerTreeID, aInfo.paintSequenceNumber()); } } diff --git a/gfx/layers/ipc/ImageBridgeChild.cpp b/gfx/layers/ipc/ImageBridgeChild.cpp index 1996634895761..cbf067ce15eab 100644 --- a/gfx/layers/ipc/ImageBridgeChild.cpp +++ b/gfx/layers/ipc/ImageBridgeChild.cpp @@ -21,7 +21,7 @@ #include "mozilla/ipc/MessageChannel.h" // for MessageChannel, etc #include "mozilla/ipc/Transport.h" // for Transport #include "mozilla/gfx/gfxVars.h" -#include "mozilla/gfx/Point.h" // for IntSize +#include "mozilla/gfx/Point.h" // for IntSize #include "mozilla/layers/AsyncCanvasRenderer.h" #include "mozilla/media/MediaSystemResourceManager.h" // for MediaSystemResourceManager #include "mozilla/media/MediaSystemResourceManagerChild.h" // for MediaSystemResourceManagerChild diff --git a/gfx/layers/ipc/LayersMessageUtils.h b/gfx/layers/ipc/LayersMessageUtils.h index 67d39e6cbb545..82c75ce4f4919 100644 --- a/gfx/layers/ipc/LayersMessageUtils.h +++ b/gfx/layers/ipc/LayersMessageUtils.h @@ -84,10 +84,9 @@ struct ParamTraits template <> struct ParamTraits - : public ContiguousEnumSerializer< - mozilla::layers::TextureType, - mozilla::layers::TextureType::Unknown, - mozilla::layers::TextureType::Last> {}; + : public ContiguousEnumSerializer {}; template <> struct ParamTraits diff --git a/gfx/layers/opengl/TextureHostOGL.cpp b/gfx/layers/opengl/TextureHostOGL.cpp index 9a21d6a02929b..ad081779c1a46 100644 --- a/gfx/layers/opengl/TextureHostOGL.cpp +++ b/gfx/layers/opengl/TextureHostOGL.cpp @@ -718,8 +718,7 @@ void EGLImageTextureSource::BindTexture(GLenum aTextureUnit, return egl->HasKHRImageBase() && egl->HasKHRImageTexture2D() && gl->IsExtensionSupported(GLContext::OES_EGL_image); }(); - MOZ_ASSERT(supportsEglImage, - "EGLImage not supported or disabled in runtime"); + MOZ_ASSERT(supportsEglImage, "EGLImage not supported or disabled in runtime"); #endif GLuint tex = mCompositor->GetTemporaryTexture(mTextureTarget, aTextureUnit); diff --git a/gfx/layers/wr/WebRenderCommandBuilder.cpp b/gfx/layers/wr/WebRenderCommandBuilder.cpp index bbca3c959cfab..4fb4c0ce6d9bb 100644 --- a/gfx/layers/wr/WebRenderCommandBuilder.cpp +++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp @@ -1073,7 +1073,8 @@ void WebRenderScrollDataCollection::AppendRoot( // created above. size_t rootMetadataTarget = layerScrollData.size() - 1; for (size_t i = rootMetadataTarget; i > 0; i--) { - if (auto zoomContainerId = layerScrollData[i - 1].GetAsyncZoomContainerId()) { + if (auto zoomContainerId = + layerScrollData[i - 1].GetAsyncZoomContainerId()) { if (*zoomContainerId == aRootMetadata->GetMetrics().GetScrollId()) { rootMetadataTarget = i - 1; break; diff --git a/gfx/thebes/gfxMacPlatformFontList.mm b/gfx/thebes/gfxMacPlatformFontList.mm index f6b423647d228..12e9f98447a7c 100644 --- a/gfx/thebes/gfxMacPlatformFontList.mm +++ b/gfx/thebes/gfxMacPlatformFontList.mm @@ -1376,22 +1376,20 @@ NS_ConvertUTF16toUTF8 familyNameString(reinterpret_cast(buffer.Elemen return nullptr; } - newFontEntry = new MacOSFontEntry(aFontName, fontRef, aWeightForEntry, - aStretchForEntry, aStyleForEntry, false, - true); + newFontEntry = new MacOSFontEntry(aFontName, fontRef, aWeightForEntry, aStretchForEntry, + aStyleForEntry, false, true); ::CFRelease(fontRef); return newFontEntry; } -static void ReleaseData(void* info, const void* data, size_t size) { - free((void*)data); -} +static void ReleaseData(void* info, const void* data, size_t size) { free((void*)data); } -gfxFontEntry* gfxMacPlatformFontList::MakePlatformFont( - const nsACString& aFontName, WeightRange aWeightForEntry, - StretchRange aStretchForEntry, SlantStyleRange aStyleForEntry, - const uint8_t* aFontData, uint32_t aLength) { +gfxFontEntry* gfxMacPlatformFontList::MakePlatformFont(const nsACString& aFontName, + WeightRange aWeightForEntry, + StretchRange aStretchForEntry, + SlantStyleRange aStyleForEntry, + const uint8_t* aFontData, uint32_t aLength) { NS_ASSERTION(aFontData, "MakePlatformFont called with null data"); // create the font entry @@ -1412,9 +1410,8 @@ static void ReleaseData(void* info, const void* data, size_t size) { } auto newFontEntry = - MakeUnique(NS_ConvertUTF16toUTF8(uniqueName), fontRef, - aWeightForEntry, aStretchForEntry, - aStyleForEntry, true, false); + MakeUnique(NS_ConvertUTF16toUTF8(uniqueName), fontRef, aWeightForEntry, + aStretchForEntry, aStyleForEntry, true, false); ::CFRelease(fontRef); return newFontEntry.release(); } diff --git a/js/public/Value.h b/js/public/Value.h index bdba301a356d2..18bac739f26a8 100644 --- a/js/public/Value.h +++ b/js/public/Value.h @@ -283,7 +283,7 @@ static inline double CanonicalizeNaN(double d) { // Some architectures (not to name names) generate NaNs with bit // patterns that don't conform to JS::Value's bit pattern // restrictions. -#define JS_NONCANONICAL_HARDWARE_NAN +# define JS_NONCANONICAL_HARDWARE_NAN #endif /** diff --git a/js/src/gc/Statistics.cpp b/js/src/gc/Statistics.cpp index b16884b662a4b..0a900b55264f5 100644 --- a/js/src/gc/Statistics.cpp +++ b/js/src/gc/Statistics.cpp @@ -1056,8 +1056,7 @@ void Statistics::endGC() { runtime->addTelemetry(JS_TELEMETRY_GC_TIME_BETWEEN_S, timeSinceLastGC.ToSeconds()); if (!nonincremental()) { - runtime->addTelemetry(JS_TELEMETRY_GC_SLICE_COUNT, - slices_.length()); + runtime->addTelemetry(JS_TELEMETRY_GC_SLICE_COUNT, slices_.length()); } } diff --git a/js/src/jit/BaselineIC.h b/js/src/jit/BaselineIC.h index de97ed2b9da81..c5a94c76a6b9b 100644 --- a/js/src/jit/BaselineIC.h +++ b/js/src/jit/BaselineIC.h @@ -1677,7 +1677,6 @@ class ICCall_Fallback : public ICMonitoredFallbackStub { : ICMonitoredFallbackStub(ICStub::Call_Fallback, stubCode) {} }; - // IC for constructing an iterator from an input value. class ICGetIterator_Fallback : public ICFallbackStub { friend class ICStubSpace; diff --git a/js/src/vm/Initialization.cpp b/js/src/vm/Initialization.cpp index b2a50b7c2b851..b546e4ffb5e87 100644 --- a/js/src/vm/Initialization.cpp +++ b/js/src/vm/Initialization.cpp @@ -68,9 +68,9 @@ static void CheckCanonicalNaN() { // with our canonical NaN, we must canonicalize every double. This // is implemented for C++ code in Value::bitsFromDouble, but is not // implemented for JIT code. -#if !defined(JS_CODEGEN_NONE) -#error "No JIT support for non-canonical hardware NaN" -#endif +# if !defined(JS_CODEGEN_NONE) +# error "No JIT support for non-canonical hardware NaN" +# endif #else // Assert that the NaN generated by hardware operations is diff --git a/js/src/vm/RegExpShared.h b/js/src/vm/RegExpShared.h index 521cdf0463ca7..44a703db6d79e 100644 --- a/js/src/vm/RegExpShared.h +++ b/js/src/vm/RegExpShared.h @@ -48,10 +48,9 @@ enum RegExpRunStatus { /* * Layout of the reg exp bytecode header. */ -struct RegExpByteCodeHeader -{ - uint32_t length; // Number of instructions. - uint32_t numRegisters; // Number of registers used. +struct RegExpByteCodeHeader { + uint32_t length; // Number of instructions. + uint32_t numRegisters; // Number of registers used. }; /* diff --git a/js/src/wasm/WasmCraneliftCompile.cpp b/js/src/wasm/WasmCraneliftCompile.cpp index 4f47de58c947c..35e7e9c4e2dbe 100644 --- a/js/src/wasm/WasmCraneliftCompile.cpp +++ b/js/src/wasm/WasmCraneliftCompile.cpp @@ -76,8 +76,8 @@ static void DisassembleCode(uint8_t* code, size_t codeLen) { #if defined(JS_CODEGEN_X64) && defined(JS_JITSPEW) && \ defined(ENABLE_WASM_CRANELIFT) zydisDisassemble(code, codeLen, [](const char* text) { - JitSpew(JitSpew_Codegen, "%s", text); - }); + JitSpew(JitSpew_Codegen, "%s", text); + }); #else JitSpew(JitSpew_Codegen, "*** No disassembly available ***"); #endif @@ -441,21 +441,21 @@ bool wasm::CraneliftCompileFunctions(const ModuleEnvironment& env, uint32_t totalCodeSize = masm.currentOffset(); uint8_t* codeBuf = (uint8_t*)js_malloc(totalCodeSize); if (codeBuf) { - masm.executableCopy(codeBuf, totalCodeSize); + masm.executableCopy(codeBuf, totalCodeSize); - for (const FuncCompileInput& func : inputs) { - JitSpew(JitSpew_Codegen, "# ========================================"); - JitSpew(JitSpew_Codegen, "# Start of wasm cranelift code for index %d", - (int)func.index); + for (const FuncCompileInput& func : inputs) { + JitSpew(JitSpew_Codegen, "# ========================================"); + JitSpew(JitSpew_Codegen, "# Start of wasm cranelift code for index %d", + (int)func.index); - uint32_t codeStart = code->codeRanges[func.index].begin(); - uint32_t codeEnd = code->codeRanges[func.index].end(); - DisassembleCode(codeBuf + codeStart, codeEnd - codeStart); + uint32_t codeStart = code->codeRanges[func.index].begin(); + uint32_t codeEnd = code->codeRanges[func.index].end(); + DisassembleCode(codeBuf + codeStart, codeEnd - codeStart); - JitSpew(JitSpew_Codegen, "# End of wasm cranelift code for index %d", - (int)func.index); - } - js_free(codeBuf); + JitSpew(JitSpew_Codegen, "# End of wasm cranelift code for index %d", + (int)func.index); + } + js_free(codeBuf); } } diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index ec32f0ab8ffb8..05b00354f8ca2 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -1124,7 +1124,7 @@ nsDocumentViewer::LoadComplete(nsresult aStatus) { RefPtr docShell = nsDocShell::Cast(childIDocShell); if (docShell && docShell->TreatAsBackgroundLoad() && docShell->GetDocument()->GetReadyStateEnum() < - Document::READYSTATE_COMPLETE) { + Document::READYSTATE_COMPLETE) { docShells.AppendElement(childIDocShell); } } @@ -1134,7 +1134,7 @@ nsDocumentViewer::LoadComplete(nsresult aStatus) { RefPtr docShell = nsDocShell::Cast(docShells[i]); if (docShell && docShell->TreatAsBackgroundLoad() && docShell->GetDocument()->GetReadyStateEnum() < - Document::READYSTATE_COMPLETE) { + Document::READYSTATE_COMPLETE) { nsEventStatus status = nsEventStatus_eIgnore; WidgetEvent event(true, eLoad); event.mFlags.mBubbles = false; @@ -1144,7 +1144,8 @@ nsDocumentViewer::LoadComplete(nsresult aStatus) { nsCOMPtr element = win->GetFrameElementInternal(); docShell->SetFakeOnLoadDispatched(); - EventDispatcher::Dispatch(element, nullptr, &event, nullptr, &status); + EventDispatcher::Dispatch(element, nullptr, &event, nullptr, + &status); } } } diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp index 8a3b2f4fef445..26ec4813caa03 100644 --- a/layout/generic/nsGridContainerFrame.cpp +++ b/layout/generic/nsGridContainerFrame.cpp @@ -835,7 +835,8 @@ struct nsGridContainerFrame::UsedTrackSizes { /** Helper function for the above method */ void ResolveSubgridTrackSizesForAxis(nsGridContainerFrame* aFrame, LogicalAxis aAxis, Subgrid* aSubgrid, - gfxContext& aRC, nscoord aContentBoxSize); + gfxContext& aRC, + nscoord aContentBoxSize); // This only has valid sizes when mCanResolveLineRangeSize is true in // the same axis. It may have zero tracks (a grid with only abs.pos. @@ -3011,9 +3012,11 @@ void nsGridContainerFrame::UsedTrackSizes::ResolveTrackSizesForAxis( const auto& range = subgrid->mArea.LineRangeForAxis(parentAxis); nscoord contentBoxSize = range.ToLength(parentSizes->mSizes[parentAxis]); auto parentWM = aFrame->GetParent()->GetWritingMode(); - contentBoxSize -= subgrid->mMarginBorderPadding.StartEnd(parentAxis, parentWM); + contentBoxSize -= + subgrid->mMarginBorderPadding.StartEnd(parentAxis, parentWM); contentBoxSize = std::max(nscoord(0), contentBoxSize); - ResolveSubgridTrackSizesForAxis(aFrame, aAxis, subgrid, aRC, contentBoxSize); + ResolveSubgridTrackSizesForAxis(aFrame, aAxis, subgrid, aRC, + contentBoxSize); } } @@ -3050,7 +3053,8 @@ void nsGridContainerFrame::GridReflowInput::CalculateTrackSizesForAxis( if (MOZ_LIKELY(!isSubgriddedAxis)) { tracks.Initialize(sizingFunctions, gapStyle, gridEnd, aContentBoxSize); } else { - tracks.mGridGap = nsLayoutUtils::ResolveGapToLength(gapStyle, aContentBoxSize); + tracks.mGridGap = + nsLayoutUtils::ResolveGapToLength(gapStyle, aContentBoxSize); tracks.mContentBoxSize = aContentBoxSize; const auto* subgrid = mFrame->GetProperty(Subgrid::Prop()); tracks.mSizes.SetLength(gridEnd); @@ -3097,7 +3101,8 @@ void nsGridContainerFrame::GridReflowInput::CalculateTrackSizesForAxis( } if (aContentBoxSize != NS_UNCONSTRAINEDSIZE) { - tracks.AlignJustifyContent(mGridStyle, mWM, aContentBoxSize, isSubgriddedAxis); + tracks.AlignJustifyContent(mGridStyle, mWM, aContentBoxSize, + isSubgriddedAxis); } else if (!useParentGaps) { const nscoord gridGap = tracks.mGridGap; nscoord pos = 0; diff --git a/layout/painting/FrameLayerBuilder.cpp b/layout/painting/FrameLayerBuilder.cpp index c44bf8650f167..4637e5fd4fb68 100644 --- a/layout/painting/FrameLayerBuilder.cpp +++ b/layout/painting/FrameLayerBuilder.cpp @@ -3797,7 +3797,7 @@ UniquePtr PaintedLayerData::CreateInactiveLayerData( FrameLayerBuilder* layerBuilder = new FrameLayerBuilder(); // Ownership of layerBuilder is passed to tempManager. layerBuilder->Init(aState->Builder(), tempManager, this, true, - &aItem->GetClip()); + &aItem->GetClip()); tempManager->BeginTransaction(); if (aState->LayerBuilder()->GetRetainingLayerManager()) { diff --git a/layout/painting/nsCSSRenderingGradients.cpp b/layout/painting/nsCSSRenderingGradients.cpp index 0c2f0bbb7cdc5..b85c28d91a6fd 100644 --- a/layout/painting/nsCSSRenderingGradients.cpp +++ b/layout/painting/nsCSSRenderingGradients.cpp @@ -119,7 +119,6 @@ static Tuple ComputeLinearGradientLine( gfxPoint start(startX, startY); gfxPoint end = gfxPoint(aBoxSize.width, aBoxSize.height) - start; return MakeTuple(start, end); - } default: break; diff --git a/layout/painting/nsDisplayList.h b/layout/painting/nsDisplayList.h index 202b12801bae4..e946ddd7a79ef 100644 --- a/layout/painting/nsDisplayList.h +++ b/layout/painting/nsDisplayList.h @@ -626,9 +626,7 @@ class nsDisplayListBuilder { void SetPartialUpdate(bool aPartial) { mPartialUpdate = aPartial; } bool IsBuilding() const { return mIsBuilding; } - void SetIsBuilding(bool aIsBuilding) { - mIsBuilding = aIsBuilding; - } + void SetIsBuilding(bool aIsBuilding) { mIsBuilding = aIsBuilding; } bool InInvalidSubtree() const { return mInInvalidSubtree; } diff --git a/layout/style/ServoStyleConstsInlines.h b/layout/style/ServoStyleConstsInlines.h index a410f809579f5..88be577753c38 100644 --- a/layout/style/ServoStyleConstsInlines.h +++ b/layout/style/ServoStyleConstsInlines.h @@ -252,7 +252,7 @@ inline StyleAtom::StyleAtom(already_AddRefed aAtom) { nsAtom* atom = aAtom.take(); if (atom->IsStatic()) { ptrdiff_t offset = reinterpret_cast(atom->AsStatic()) - - reinterpret_cast(&detail::gGkAtoms); + reinterpret_cast(&detail::gGkAtoms); _0 = (offset << 1) | 1; } else { _0 = reinterpret_cast(atom); diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 8d969b24372e9..9ee7df0b3a39e 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -1402,7 +1402,8 @@ nsChangeHint nsStylePosition::CalcDifference( hint |= nsChangeHint_RecomputePosition | nsChangeHint_UpdateParentOverflow; } else { - hint |= nsChangeHint_NeedReflow | nsChangeHint_ReflowChangesSizeOrPosition; + hint |= + nsChangeHint_NeedReflow | nsChangeHint_ReflowChangesSizeOrPosition; } } return hint; @@ -3067,7 +3068,8 @@ nsChangeHint nsStyleDisplay::CalcDifference( // reflow anyway. if (IsAbsolutelyPositionedStyle() && aOldPosition.NeedsHypotheticalPositionIfAbsPos()) { - hint |= nsChangeHint_NeedReflow | nsChangeHint_ReflowChangesSizeOrPosition; + hint |= + nsChangeHint_NeedReflow | nsChangeHint_ReflowChangesSizeOrPosition; } else { hint |= nsChangeHint_NeutralChange; } diff --git a/layout/svg/nsSVGImageFrame.h b/layout/svg/nsSVGImageFrame.h index 23c583447e322..9dc2d7c0dfd44 100644 --- a/layout/svg/nsSVGImageFrame.h +++ b/layout/svg/nsSVGImageFrame.h @@ -89,7 +89,7 @@ class nsSVGImageFrame final : public mozilla::SVGGeometryFrame, PostDestroyData& aPostDestroyData) override; bool GetIntrinsicImageDimensions(mozilla::gfx::Size& aSize, - mozilla::AspectRatio& aAspectRatio) const; + mozilla::AspectRatio& aAspectRatio) const; #ifdef DEBUG_FRAME_DUMP virtual nsresult GetFrameName(nsAString& aResult) const override { diff --git a/layout/xul/nsXULPopupManager.cpp b/layout/xul/nsXULPopupManager.cpp index 2de9541f3b8bd..f528b8df997b6 100644 --- a/layout/xul/nsXULPopupManager.cpp +++ b/layout/xul/nsXULPopupManager.cpp @@ -2246,10 +2246,8 @@ static nsIContent* FindDefaultInsertionPoint(nsIContent* aParent) { } } bool multiple = false; // Unused - return aParent - ->OwnerDoc() - ->BindingManager() - ->FindNestedSingleInsertionPoint(aParent, &multiple); + return aParent->OwnerDoc()->BindingManager()->FindNestedSingleInsertionPoint( + aParent, &multiple); } nsContainerFrame* nsXULPopupManager::ImmediateParentFrame( diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h index f0e2de6505919..42171625c7e10 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h @@ -216,9 +216,7 @@ class PeerConnectionImpl final static void ConnectThread(void* aData); // Get the main thread - nsCOMPtr GetMainThread() { - return mThread; - } + nsCOMPtr GetMainThread() { return mThread; } // Get the STS thread nsIEventTarget* GetSTSThread() { diff --git a/mozglue/misc/interceptor/MMPolicies.h b/mozglue/misc/interceptor/MMPolicies.h index f3994d1e21b3e..3fdfbbd0a0c9b 100644 --- a/mozglue/misc/interceptor/MMPolicies.h +++ b/mozglue/misc/interceptor/MMPolicies.h @@ -21,37 +21,37 @@ // MinGW does not have these definitions yet #if defined(__MINGW32__) typedef struct _MEM_ADDRESS_REQUIREMENTS { - PVOID LowestStartingAddress; - PVOID HighestEndingAddress; - SIZE_T Alignment; + PVOID LowestStartingAddress; + PVOID HighestEndingAddress; + SIZE_T Alignment; } MEM_ADDRESS_REQUIREMENTS, *PMEM_ADDRESS_REQUIREMENTS; typedef enum MEM_EXTENDED_PARAMETER_TYPE { - MemExtendedParameterInvalidType = 0, - MemExtendedParameterAddressRequirements, - MemExtendedParameterNumaNode, - MemExtendedParameterPartitionHandle, - MemExtendedParameterUserPhysicalHandle, - MemExtendedParameterAttributeFlags, - MemExtendedParameterMax -} MEM_EXTENDED_PARAMETER_TYPE, *PMEM_EXTENDED_PARAMETER_TYPE; - -#define MEM_EXTENDED_PARAMETER_TYPE_BITS 8 + MemExtendedParameterInvalidType = 0, + MemExtendedParameterAddressRequirements, + MemExtendedParameterNumaNode, + MemExtendedParameterPartitionHandle, + MemExtendedParameterUserPhysicalHandle, + MemExtendedParameterAttributeFlags, + MemExtendedParameterMax +} MEM_EXTENDED_PARAMETER_TYPE, + *PMEM_EXTENDED_PARAMETER_TYPE; + +# define MEM_EXTENDED_PARAMETER_TYPE_BITS 8 typedef struct DECLSPEC_ALIGN(8) MEM_EXTENDED_PARAMETER { - - struct { - DWORD64 Type : MEM_EXTENDED_PARAMETER_TYPE_BITS; - DWORD64 Reserved : 64 - MEM_EXTENDED_PARAMETER_TYPE_BITS; - } DUMMYSTRUCTNAME; - - union { - DWORD64 ULong64; - PVOID Pointer; - SIZE_T Size; - HANDLE Handle; - DWORD ULong; - } DUMMYUNIONNAME; + struct { + DWORD64 Type : MEM_EXTENDED_PARAMETER_TYPE_BITS; + DWORD64 Reserved : 64 - MEM_EXTENDED_PARAMETER_TYPE_BITS; + } DUMMYSTRUCTNAME; + + union { + DWORD64 ULong64; + PVOID Pointer; + SIZE_T Size; + HANDLE Handle; + DWORD ULong; + } DUMMYUNIONNAME; } MEM_EXTENDED_PARAMETER, *PMEM_EXTENDED_PARAMETER; #endif // defined(__MINGW32__) diff --git a/mozglue/tests/gtest/TestDLLBlocklist.cpp b/mozglue/tests/gtest/TestDLLBlocklist.cpp index 15ba2f765ed9f..02f8c73cd33b8 100644 --- a/mozglue/tests/gtest/TestDLLBlocklist.cpp +++ b/mozglue/tests/gtest/TestDLLBlocklist.cpp @@ -35,7 +35,8 @@ static nsString GetFullPath(const nsAString& aLeaf) { return ret; } -TEST(TestDllBlocklist, BlockDllByName) { +TEST(TestDllBlocklist, BlockDllByName) +{ // The DLL name has capital letters, so this also tests that the comparison // is case-insensitive. NS_NAMED_LITERAL_STRING(kLeafName, "TestDllBlocklist_MatchByName.dll"); @@ -47,7 +48,8 @@ TEST(TestDllBlocklist, BlockDllByName) { EXPECT_TRUE(!::GetModuleHandleW(kLeafName.get())); } -TEST(TestDllBlocklist, BlockDllByVersion) { +TEST(TestDllBlocklist, BlockDllByVersion) +{ NS_NAMED_LITERAL_STRING(kLeafName, "TestDllBlocklist_MatchByVersion.dll"); nsString dllPath = GetFullPath(kLeafName); @@ -57,7 +59,8 @@ TEST(TestDllBlocklist, BlockDllByVersion) { EXPECT_TRUE(!::GetModuleHandleW(kLeafName.get())); } -TEST(TestDllBlocklist, AllowDllByVersion) { +TEST(TestDllBlocklist, AllowDllByVersion) +{ NS_NAMED_LITERAL_STRING(kLeafName, "TestDllBlocklist_AllowByVersion.dll"); nsString dllPath = GetFullPath(kLeafName); @@ -71,7 +74,8 @@ TEST(TestDllBlocklist, AllowDllByVersion) { #define DLL_BLOCKLIST_STRING_TYPE const char* #include "mozilla/WindowsDllBlocklistDefs.h" -TEST(TestDllBlocklist, BlocklistIntegrity) { +TEST(TestDllBlocklist, BlocklistIntegrity) +{ nsTArray dupes; DECLARE_POINTER_TO_FIRST_DLL_BLOCKLIST_ENTRY(pFirst); DECLARE_POINTER_TO_LAST_DLL_BLOCKLIST_ENTRY(pLast); @@ -99,7 +103,8 @@ TEST(TestDllBlocklist, BlocklistIntegrity) { } } -TEST(TestDllBlocklist, BlockThreadWithLoadLibraryEntryPoint) { +TEST(TestDllBlocklist, BlockThreadWithLoadLibraryEntryPoint) +{ // Only supported on Nightly #if defined(NIGHTLY_BUILD) using ThreadProc = unsigned(__stdcall*)(void*); @@ -133,4 +138,3 @@ TEST(TestDllBlocklist, BlockThreadWithLoadLibraryEntryPoint) { EXPECT_TRUE(!::GetModuleHandleW(kLeafNameW.get())); #endif // defined(NIGHTLY_BUILD) } - diff --git a/toolkit/components/places/FaviconHelpers.cpp b/toolkit/components/places/FaviconHelpers.cpp index 16da88648481a..66c77b4d7b82c 100644 --- a/toolkit/components/places/FaviconHelpers.cpp +++ b/toolkit/components/places/FaviconHelpers.cpp @@ -848,7 +848,8 @@ AsyncAssociateIconToPage::Run() { " SELECT icon_id FROM moz_icons_to_pages " " JOIN moz_icons i ON icon_id = i.id " " WHERE page_id = :page_id " - " AND expire_ms < strftime('%s','now','localtime','start of day','-7 days','utc') * 1000 " + " AND expire_ms < strftime('%s','now','localtime','start of day','-7 " + "days','utc') * 1000 " ") AND page_id = :page_id "); NS_ENSURE_STATE(stmt); mozStorageStatementScoper scoper(stmt); diff --git a/toolkit/xre/test/gtest/TestCompatVersionCompare.cpp b/toolkit/xre/test/gtest/TestCompatVersionCompare.cpp index 86e7afb813f2b..ca36f1f48d20b 100644 --- a/toolkit/xre/test/gtest/TestCompatVersionCompare.cpp +++ b/toolkit/xre/test/gtest/TestCompatVersionCompare.cpp @@ -10,27 +10,31 @@ void CheckCompatVersionCompare(const nsCString& aOldCompatVersion, const nsCString& aNewCompatVersion, bool aExpectedSame, bool aExpectedDowngrade) { - printf("Comparing '%s' to '%s'.\n", aOldCompatVersion.get(), aNewCompatVersion.get()); + printf("Comparing '%s' to '%s'.\n", aOldCompatVersion.get(), + aNewCompatVersion.get()); int32_t result = CompareCompatVersions(aOldCompatVersion, aNewCompatVersion); - ASSERT_EQ(aExpectedSame, result == 0) << "Version sameness check should match."; - ASSERT_EQ(aExpectedDowngrade, result > 0) << "Version downgrade check should match."; + ASSERT_EQ(aExpectedSame, result == 0) + << "Version sameness check should match."; + ASSERT_EQ(aExpectedDowngrade, result > 0) + << "Version downgrade check should match."; } -void CheckExpectedResult( - const char* aOldAppVersion, const char* aOldAppID, const char* aOldToolkitID, - const char* aNewAppVersion, const char* aNewAppID, const char* aNewToolkitID, - bool aExpectedSame, bool aExpectedDowngrade) { - +void CheckExpectedResult(const char* aOldAppVersion, const char* aOldAppID, + const char* aOldToolkitID, const char* aNewAppVersion, + const char* aNewAppID, const char* aNewToolkitID, + bool aExpectedSame, bool aExpectedDowngrade) { nsCString oldCompatVersion; - BuildCompatVersion(aOldAppVersion, aOldAppID, aOldToolkitID, oldCompatVersion); + BuildCompatVersion(aOldAppVersion, aOldAppID, aOldToolkitID, + oldCompatVersion); nsCString newCompatVersion; - BuildCompatVersion(aNewAppVersion, aNewAppID, aNewToolkitID, newCompatVersion); + BuildCompatVersion(aNewAppVersion, aNewAppID, aNewToolkitID, + newCompatVersion); - CheckCompatVersionCompare(oldCompatVersion, newCompatVersion, - aExpectedSame, aExpectedDowngrade); + CheckCompatVersionCompare(oldCompatVersion, newCompatVersion, aExpectedSame, + aExpectedDowngrade); } // clang-format off diff --git a/uriloader/base/nsDocLoader.cpp b/uriloader/base/nsDocLoader.cpp index 1630c12a5a063..235b7e1819114 100644 --- a/uriloader/base/nsDocLoader.cpp +++ b/uriloader/base/nsDocLoader.cpp @@ -260,13 +260,9 @@ nsDocLoader::Stop(void) { return rv; } -bool nsDocLoader::TreatAsBackgroundLoad() { - return mTreatAsBackgroundLoad; -} +bool nsDocLoader::TreatAsBackgroundLoad() { return mTreatAsBackgroundLoad; } -void nsDocLoader::SetBackgroundLoadIframe() { - mTreatAsBackgroundLoad = true; -} +void nsDocLoader::SetBackgroundLoadIframe() { mTreatAsBackgroundLoad = true; } bool nsDocLoader::IsBusy() { nsresult rv; @@ -306,7 +302,7 @@ bool nsDocLoader::IsBusy() { // If 'dom.cross_origin_iframes_loaded_in_background' is set, the parent // document treats cross domain iframes as background loading frame - if (loader && static_cast(loader)->TreatAsBackgroundLoad()) { + if (loader && static_cast(loader)->TreatAsBackgroundLoad()) { continue; } // This is a safe cast, because we only put nsDocLoader objects into the @@ -761,8 +757,8 @@ void nsDocLoader::DocLoaderIsEmpty(bool aFlushLayout) { (mozilla::dom::DocGroup::TryToLoadIframesInBackground() && !HasFakeOnLoadDispatched())) { MOZ_LOG(gDocLoaderLog, LogLevel::Debug, - ("DocLoader:%p: Firing load event for document.open\n", - this)); + ("DocLoader:%p: Firing load event for document.open\n", + this)); // This is a very cut-down version of // nsDocumentViewer::LoadComplete that doesn't do various things @@ -777,7 +773,7 @@ void nsDocLoader::DocLoaderIsEmpty(bool aFlushLayout) { nsEventStatus unused = nsEventStatus_eIgnore; doc->SetLoadEventFiring(true); EventDispatcher::Dispatch(window, nullptr, &event, nullptr, - &unused); + &unused); doc->SetLoadEventFiring(false); // Now unsuppress painting on the presshell, if we diff --git a/uriloader/base/nsDocLoader.h b/uriloader/base/nsDocLoader.h index 53efaa3048875..c84d2508e369c 100644 --- a/uriloader/base/nsDocLoader.h +++ b/uriloader/base/nsDocLoader.h @@ -125,9 +125,9 @@ class nsDocLoader : public nsIDocumentLoader, bool TreatAsBackgroundLoad(); - void SetFakeOnLoadDispatched(){ mHasFakeOnLoadDispatched = true; }; + void SetFakeOnLoadDispatched() { mHasFakeOnLoadDispatched = true; }; - bool HasFakeOnLoadDispatched(){ return mHasFakeOnLoadDispatched; }; + bool HasFakeOnLoadDispatched() { return mHasFakeOnLoadDispatched; }; void ResetToFirstLoad() { mHasFakeOnLoadDispatched = false; @@ -223,6 +223,7 @@ class nsDocLoader : public nsIDocumentLoader, // loadgroup has no active requests before checking for "real" emptiness if // aFlushLayout is true. void DocLoaderIsEmpty(bool aFlushLayout); + protected: struct nsStatusInfo : public mozilla::LinkedListElement { nsString mStatusMessage; diff --git a/widget/GfxInfoBase.cpp b/widget/GfxInfoBase.cpp index 3a70d887023d9..5479470369ded 100644 --- a/widget/GfxInfoBase.cpp +++ b/widget/GfxInfoBase.cpp @@ -1087,7 +1087,8 @@ NS_IMETHODIMP GfxInfoBase::GetFailures(nsTArray& indices, // assuming this is not a big deal, as the size of the array should be small // and the strings in it should be small as well (the error messages in the // code.) The second copy happens with the AppendElement() calls. - // Technically, we don't need the mutex lock after the StringVectorCopy() call. + // Technically, we don't need the mutex lock after the StringVectorCopy() + // call. LoggingRecord loggedStrings = logForwarder->LoggingRecordCopy(); LoggingRecord::const_iterator it; for (it = loggedStrings.begin(); it != loggedStrings.end(); ++it) { diff --git a/widget/InputData.h b/widget/InputData.h index fc87949cc80aa..a2cefaab35c55 100644 --- a/widget/InputData.h +++ b/widget/InputData.h @@ -381,11 +381,11 @@ class PanGestureInput : public InputData { PanDeltaType mDeltaType = PANDELTA_PIXEL; - bool mHandledByAPZ: 1; + bool mHandledByAPZ : 1; // true if this is a PANGESTURE_END event that will be followed by a // PANGESTURE_MOMENTUMSTART event. - bool mFollowedByMomentum: 1; + bool mFollowedByMomentum : 1; // If this is true, and this event started a new input block that couldn't // find a scrollable target which is scrollable in the horizontal component @@ -393,24 +393,31 @@ class PanGestureInput : public InputData { // hold until a content response has arrived, even if the block has a // confirmed target. // This is used by events that can result in a swipe instead of a scroll. - bool mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection: 1; + bool mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection : 1; // This is used by APZ to communicate to the macOS widget code whether // the overscroll-behavior of the scroll frame handling this swipe allows // non-local overscroll behaviors in the horizontal direction (such as // swipe navigation). - bool mOverscrollBehaviorAllowsSwipe: 1; + bool mOverscrollBehaviorAllowsSwipe : 1; // true if APZ should do a fling animation after this pan ends, like - // it would with touchscreens. (For platforms that don't emit momentum events.) - bool mSimulateMomentum: 1; + // it would with touchscreens. (For platforms that don't emit momentum + // events.) + bool mSimulateMomentum : 1; void SetHandledByAPZ(bool aHandled) { mHandledByAPZ = aHandled; } - void SetFollowedByMomentum(bool aFollowed) { mFollowedByMomentum = aFollowed; } - void SetRequiresContentResponseIfCannotScrollHorizontallyInStartDirection(bool aRequires) { - mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection = aRequires; + void SetFollowedByMomentum(bool aFollowed) { + mFollowedByMomentum = aFollowed; + } + void SetRequiresContentResponseIfCannotScrollHorizontallyInStartDirection( + bool aRequires) { + mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection = + aRequires; + } + void SetOverscrollBehaviorAllowsSwipe(bool aAllows) { + mOverscrollBehaviorAllowsSwipe = aAllows; } - void SetOverscrollBehaviorAllowsSwipe(bool aAllows) { mOverscrollBehaviorAllowsSwipe = aAllows; } void SetSimulateMomentum(bool aSimulate) { mSimulateMomentum = aSimulate; } }; diff --git a/xpcom/base/nsVersionComparator.cpp b/xpcom/base/nsVersionComparator.cpp index 5d9cce997fea8..f12e54272a8e4 100644 --- a/xpcom/base/nsVersionComparator.cpp +++ b/xpcom/base/nsVersionComparator.cpp @@ -196,7 +196,8 @@ static wchar_t* ParseVP(wchar_t* aPart, VersionPartW& aResult) { aResult.strBlen = wcslen(aResult.strB); } else { aResult.strBlen = numstart - aResult.strB; - aResult.numC = ns_wcstol(numstart, const_cast(&aResult.extraD)); + aResult.numC = + ns_wcstol(numstart, const_cast(&aResult.extraD)); if (!*aResult.extraD) { aResult.extraD = nullptr; diff --git a/xpcom/ds/nsGkAtoms.h b/xpcom/ds/nsGkAtoms.h index a35460982f606..25313893ba490 100644 --- a/xpcom/ds/nsGkAtoms.h +++ b/xpcom/ds/nsGkAtoms.h @@ -180,8 +180,6 @@ class nsGkAtoms { #undef GK_ATOM }; -inline bool nsAtom::IsEmpty() const { - return this == nsGkAtoms::_empty; -} +inline bool nsAtom::IsEmpty() const { return this == nsGkAtoms::_empty; } #endif /* nsGkAtoms_h___ */