Skip to content

Commit a1dce64

Browse files
committed
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D28329 --HG-- extra : moz-landing-system : lando
1 parent c518481 commit a1dce64

File tree

67 files changed

+1333
-1382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1333
-1382
lines changed

accessible/base/nsAccessibilityService.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,8 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
13951395
table = aContext->Parent();
13961396

13971397
if (table) {
1398-
nsIContent* parentContent = aContent->GetParentOrHostNode()->AsContent();
1398+
nsIContent* parentContent =
1399+
aContent->GetParentOrHostNode()->AsContent();
13991400
nsIFrame* parentFrame = nullptr;
14001401
if (parentContent) {
14011402
parentFrame = parentContent->GetPrimaryFrame();

browser/app/winlauncher/DllBlocklistWin.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,15 +346,14 @@ LauncherVoidResult InitializeDllBlocklistOOP(const wchar_t* aFullImagePath,
346346

347347
// As part of our mitigation of binary tampering, copy our import directory
348348
// from the original in our executable file.
349-
LauncherVoidResult importDirRestored =
350-
RestoreImportDirectory(aFullImagePath, ourExeImage, aChildProcess,
351-
ourModule);
349+
LauncherVoidResult importDirRestored = RestoreImportDirectory(
350+
aFullImagePath, ourExeImage, aChildProcess, ourModule);
352351
if (importDirRestored.isErr()) {
353352
return importDirRestored;
354353
}
355354

356355
Maybe<nt::PEHeaders::IATThunks> ntdllThunks =
357-
ourExeImage.GetIATThunksForModule("ntdll.dll");
356+
ourExeImage.GetIATThunksForModule("ntdll.dll");
358357
if (!ntdllThunks) {
359358
return LAUNCHER_ERROR_FROM_WIN32(ERROR_INVALID_DATA);
360359
}

browser/app/winlauncher/LauncherProcessWin.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@
4141
*
4242
* @return Ok if browser startup should proceed
4343
*/
44-
static mozilla::LauncherVoidResult PostCreationSetup(const wchar_t* aFullImagePath,
45-
HANDLE aChildProcess,
46-
HANDLE aChildMainThread,
47-
const bool aIsSafeMode) {
44+
static mozilla::LauncherVoidResult PostCreationSetup(
45+
const wchar_t* aFullImagePath, HANDLE aChildProcess,
46+
HANDLE aChildMainThread, const bool aIsSafeMode) {
4847
// The launcher process's DLL blocking code is incompatible with ASAN because
4948
// it is able to execute before ASAN itself has even initialized.
5049
// Also, the AArch64 build doesn't yet have a working interceptor.
@@ -332,9 +331,8 @@ Maybe<int> LauncherMain(int& argc, wchar_t* argv[],
332331
nsAutoHandle process(pi.hProcess);
333332
nsAutoHandle mainThread(pi.hThread);
334333

335-
LauncherVoidResult setupResult =
336-
PostCreationSetup(argv[0], process.get(), mainThread.get(),
337-
isSafeMode.value());
334+
LauncherVoidResult setupResult = PostCreationSetup(
335+
argv[0], process.get(), mainThread.get(), isSafeMode.value());
338336
if (setupResult.isErr()) {
339337
HandleLauncherError(setupResult);
340338
::TerminateProcess(process.get(), 1);

caps/OriginAttributes.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ class MOZ_STACK_CLASS PopulateFromSuffixIterator final
268268
}
269269

270270
if (aName.EqualsLiteral("geckoViewUserContextId")) {
271-
MOZ_RELEASE_ASSERT(mOriginAttributes->mGeckoViewSessionContextId.IsEmpty());
271+
MOZ_RELEASE_ASSERT(
272+
mOriginAttributes->mGeckoViewSessionContextId.IsEmpty());
272273
mOriginAttributes->mGeckoViewSessionContextId.Assign(aValue);
273274
return true;
274275
}

caps/OriginAttributes.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ class OriginAttributesPattern : public dom::OriginAttributesPatternDictionary {
156156
}
157157

158158
if (mGeckoViewSessionContextId.WasPassed() &&
159-
mGeckoViewSessionContextId.Value() != aAttrs.mGeckoViewSessionContextId) {
159+
mGeckoViewSessionContextId.Value() !=
160+
aAttrs.mGeckoViewSessionContextId) {
160161
return false;
161162
}
162163

@@ -191,8 +192,10 @@ class OriginAttributesPattern : public dom::OriginAttributesPatternDictionary {
191192
return false;
192193
}
193194

194-
if (mGeckoViewSessionContextId.WasPassed() && aOther.mGeckoViewSessionContextId.WasPassed() &&
195-
mGeckoViewSessionContextId.Value() != aOther.mGeckoViewSessionContextId.Value()) {
195+
if (mGeckoViewSessionContextId.WasPassed() &&
196+
aOther.mGeckoViewSessionContextId.WasPassed() &&
197+
mGeckoViewSessionContextId.Value() !=
198+
aOther.mGeckoViewSessionContextId.Value()) {
196199
return false;
197200
}
198201

caps/nsJSPrincipals.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ static bool ReadPrincipalInfo(JSStructuredCloneReader* aReader, uint32_t aTag,
289289

290290
static StaticRefPtr<nsIPrincipal> sActiveWorkerPrincipal;
291291

292-
nsJSPrincipals::AutoSetActiveWorkerPrincipal::AutoSetActiveWorkerPrincipal
293-
(nsIPrincipal* aPrincipal) {
292+
nsJSPrincipals::AutoSetActiveWorkerPrincipal::AutoSetActiveWorkerPrincipal(
293+
nsIPrincipal* aPrincipal) {
294294
MOZ_ASSERT(NS_IsMainThread());
295295
MOZ_RELEASE_ASSERT(!sActiveWorkerPrincipal);
296296
sActiveWorkerPrincipal = aPrincipal;

caps/tests/gtest/TestOriginAttributes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using mozilla::OriginAttributes;
1010
using mozilla::Preferences;
1111

12-
static void TestSuffix(const OriginAttributes& attrs) {
12+
static void TestSuffix(const OriginAttributes &attrs) {
1313
nsAutoCString suffix;
1414
attrs.CreateSuffix(suffix);
1515

dom/base/DocumentOrShadowRoot.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,7 @@ void DocumentOrShadowRoot::NodesFromRect(float aX, float aY, float aTopSize,
361361
float aRightSize, float aBottomSize,
362362
float aLeftSize,
363363
bool aIgnoreRootScrollFrame,
364-
bool aFlushLayout,
365-
bool aOnlyVisible,
364+
bool aFlushLayout, bool aOnlyVisible,
366365
nsTArray<RefPtr<nsINode>>& aReturn) {
367366
// Following the same behavior of elementFromPoint,
368367
// we don't return anything if either coord is negative

dom/base/SelectionChangeEventDispatcher.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace mozilla {
2020
namespace dom {
2121
class Document;
2222
class Selection;
23-
}
23+
} // namespace dom
2424

2525
class SelectionChangeEventDispatcher final {
2626
public:

dom/base/nsDOMWindowUtils.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,8 +1166,7 @@ nsDOMWindowUtils::NodesFromRect(float aX, float aY, float aTopSize,
11661166

11671167
AutoTArray<RefPtr<nsINode>, 8> nodes;
11681168
doc->NodesFromRect(aX, aY, aTopSize, aRightSize, aBottomSize, aLeftSize,
1169-
aIgnoreRootScrollFrame, aFlushLayout, aOnlyVisible,
1170-
nodes);
1169+
aIgnoreRootScrollFrame, aFlushLayout, aOnlyVisible, nodes);
11711170
list->SetCapacity(nodes.Length());
11721171
for (auto& node : nodes) {
11731172
list->AppendElement(node->AsContent());

dom/base/nsGlobalWindowOuter.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2824,8 +2824,8 @@ void nsPIDOMWindowOuter::SetInitialKeyboardIndicators(
28242824
windowRoot->SetShowFocusRings(aShowFocusRings == UIStateChangeType_Set);
28252825
}
28262826

2827-
nsContentUtils::SetKeyboardIndicatorsOnRemoteChildren(
2828-
this, aShowAccelerators, aShowFocusRings);
2827+
nsContentUtils::SetKeyboardIndicatorsOnRemoteChildren(this, aShowAccelerators,
2828+
aShowFocusRings);
28292829
}
28302830

28312831
Element* nsPIDOMWindowOuter::GetFrameElementInternal() const {
@@ -6282,9 +6282,7 @@ void nsGlobalWindowOuter::ReallyCloseWindow() {
62826282
// XXXbz now that we have mHavePendingClose, is this needed?
62836283
bool isTab;
62846284
if (rootWin == this || !bwin ||
6285-
(NS_SUCCEEDED(
6286-
bwin->IsTabContentWindow(this, &isTab)) &&
6287-
isTab)) {
6285+
(NS_SUCCEEDED(bwin->IsTabContentWindow(this, &isTab)) && isTab)) {
62886286
treeOwnerAsWin->Destroy();
62896287
}
62906288
}
@@ -6849,8 +6847,8 @@ void nsGlobalWindowOuter::SetKeyboardIndicators(
68496847
windowRoot->SetShowFocusRings(aShowFocusRings == UIStateChangeType_Set);
68506848
}
68516849

6852-
nsContentUtils::SetKeyboardIndicatorsOnRemoteChildren(
6853-
this, aShowAccelerators, aShowFocusRings);
6850+
nsContentUtils::SetKeyboardIndicatorsOnRemoteChildren(this, aShowAccelerators,
6851+
aShowFocusRings);
68546852

68556853
bool newShouldShowFocusRing = ShouldShowFocusRing();
68566854
if (mInnerWindow && nsGlobalWindowInner::Cast(mInnerWindow)->mHasFocus &&

dom/base/nsHistory.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#include "mozilla/dom/ChildSHistory.h"
1313
#include "nsCOMPtr.h"
1414
#include "nsCycleCollectionParticipant.h"
15-
#include "nsIWeakReferenceUtils.h"// for nsWeakPtr
16-
#include "nsPIDOMWindow.h" // for GetParentObject
15+
#include "nsIWeakReferenceUtils.h" // for nsWeakPtr
16+
#include "nsPIDOMWindow.h" // for GetParentObject
1717
#include "nsStringFwd.h"
1818
#include "nsWrapperCache.h"
1919

dom/base/nsIDocumentObserver.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentObserver, NS_IDOCUMENT_OBSERVER_IID)
9494
nsIContent* aContent, \
9595
mozilla::EventStates aStateMask) override;
9696

97-
#define NS_DECL_NSIDOCUMENTOBSERVER \
98-
NS_DECL_NSIDOCUMENTOBSERVER_BEGINUPDATE \
99-
NS_DECL_NSIDOCUMENTOBSERVER_ENDUPDATE \
100-
NS_DECL_NSIDOCUMENTOBSERVER_BEGINLOAD \
101-
NS_DECL_NSIDOCUMENTOBSERVER_ENDLOAD \
102-
NS_DECL_NSIDOCUMENTOBSERVER_CONTENTSTATECHANGED \
97+
#define NS_DECL_NSIDOCUMENTOBSERVER \
98+
NS_DECL_NSIDOCUMENTOBSERVER_BEGINUPDATE \
99+
NS_DECL_NSIDOCUMENTOBSERVER_ENDUPDATE \
100+
NS_DECL_NSIDOCUMENTOBSERVER_BEGINLOAD \
101+
NS_DECL_NSIDOCUMENTOBSERVER_ENDLOAD \
102+
NS_DECL_NSIDOCUMENTOBSERVER_CONTENTSTATECHANGED \
103103
NS_DECL_NSIMUTATIONOBSERVER
104104

105105
#define NS_IMPL_NSIDOCUMENTOBSERVER_CORE_STUB(_class) \
@@ -111,9 +111,9 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentObserver, NS_IDOCUMENT_OBSERVER_IID)
111111
void _class::BeginLoad(mozilla::dom::Document*) {} \
112112
void _class::EndLoad(mozilla::dom::Document*) {}
113113

114-
#define NS_IMPL_NSIDOCUMENTOBSERVER_STATE_STUB(_class) \
115-
void _class::ContentStateChanged(mozilla::dom::Document*, \
116-
nsIContent* aContent, \
114+
#define NS_IMPL_NSIDOCUMENTOBSERVER_STATE_STUB(_class) \
115+
void _class::ContentStateChanged(mozilla::dom::Document*, \
116+
nsIContent* aContent, \
117117
mozilla::EventStates aStateMask) {}
118118

119119
#define NS_IMPL_NSIDOCUMENTOBSERVER_CONTENT(_class) \

0 commit comments

Comments
 (0)