Skip to content
This repository was archived by the owner on Aug 4, 2022. It is now read-only.

Commit 8780f9e

Browse files
committed
Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros See: https://reviews.llvm.org/D33440 This is why the diff is bigger than usual # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D26098
1 parent e0ebf0f commit 8780f9e

File tree

427 files changed

+6444
-4536
lines changed

Some content is hidden

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

427 files changed

+6444
-4536
lines changed

accessible/base/MarkupMap.h

Lines changed: 346 additions & 323 deletions
Large diffs are not rendered by default.

caps/tests/gtest/TestOriginAttributes.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,20 @@ static void TestSuffix(const OriginAttributes& attrs) {
1717
EXPECT_EQ(attrs, attrsFromSuffix);
1818
}
1919

20-
TEST(OriginAttributes, Suffix_default) {
20+
TEST(OriginAttributes, Suffix_default)
21+
{
2122
OriginAttributes attrs;
2223
TestSuffix(attrs);
2324
}
2425

25-
TEST(OriginAttributes, Suffix_appId_inIsolatedMozBrowser) {
26+
TEST(OriginAttributes, Suffix_appId_inIsolatedMozBrowser)
27+
{
2628
OriginAttributes attrs(1, true);
2729
TestSuffix(attrs);
2830
}
2931

30-
TEST(OriginAttributes, Suffix_maxAppId_inIsolatedMozBrowser) {
32+
TEST(OriginAttributes, Suffix_maxAppId_inIsolatedMozBrowser)
33+
{
3134
OriginAttributes attrs(4294967295, true);
3235
TestSuffix(attrs);
3336
}

dom/base/AnonymousContent.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ void AnonymousContent::GetComputedStylePropertyValue(
197197
aRv = cs->GetPropertyValue(aPropertyName, aResult);
198198
}
199199

200-
void AnonymousContent::GetTargetIdForEvent(Event& aEvent, DOMString& aResult)
201-
{
200+
void AnonymousContent::GetTargetIdForEvent(Event& aEvent, DOMString& aResult) {
202201
nsCOMPtr<Element> el = do_QueryInterface(aEvent.GetOriginalTarget());
203202
if (el && el->IsInNativeAnonymousSubtree() && mContentNode->Contains(el)) {
204203
aResult.SetKnownLiveAtom(el->GetID(), DOMString::eTreatNullAsNull);

dom/base/DocGroup.cpp

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,21 @@ RefPtr<PerformanceInfoPromise> DocGroup::ReportPerformanceInfo() {
143143
RefPtr<DocGroup> self = this;
144144

145145
return CollectMemoryInfo(top, mainThread)
146-
->Then(mainThread, __func__,
147-
[self, host, pid, windowID, duration, isTopLevel,
148-
items](const PerformanceMemoryInfo& aMemoryInfo) {
149-
PerformanceInfo info =
150-
PerformanceInfo(host, pid, windowID, duration,
151-
self->mPerformanceCounter->GetID(), false,
152-
isTopLevel, aMemoryInfo, items);
153-
154-
return PerformanceInfoPromise::CreateAndResolve(std::move(info),
155-
__func__);
156-
},
157-
[self](const nsresult rv) {
158-
return PerformanceInfoPromise::CreateAndReject(rv, __func__);
159-
});
146+
->Then(
147+
mainThread, __func__,
148+
[self, host, pid, windowID, duration, isTopLevel,
149+
items](const PerformanceMemoryInfo& aMemoryInfo) {
150+
PerformanceInfo info =
151+
PerformanceInfo(host, pid, windowID, duration,
152+
self->mPerformanceCounter->GetID(), false,
153+
isTopLevel, aMemoryInfo, items);
154+
155+
return PerformanceInfoPromise::CreateAndResolve(std::move(info),
156+
__func__);
157+
},
158+
[self](const nsresult rv) {
159+
return PerformanceInfoPromise::CreateAndReject(rv, __func__);
160+
});
160161
}
161162

162163
nsresult DocGroup::Dispatch(TaskCategory aCategory,

dom/base/Document.cpp

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12621,19 +12621,20 @@ already_AddRefed<mozilla::dom::Promise> Document::RequestStorageAccess(
1262112621
AntiTrackingCommon::AddFirstPartyStorageAccessGrantedFor(
1262212622
NodePrincipal(), inner, AntiTrackingCommon::eStorageAccessAPI,
1262312623
performFinalChecks)
12624-
->Then(GetCurrentThreadSerialEventTarget(), __func__,
12625-
[outer, promise] {
12626-
// Step 10. Grant the document access to cookies and store
12627-
// that fact for
12628-
// the purposes of future calls to
12629-
// hasStorageAccess() and requestStorageAccess().
12630-
outer->SetHasStorageAccess(true);
12631-
promise->MaybeResolveWithUndefined();
12632-
},
12633-
[outer, promise] {
12634-
outer->SetHasStorageAccess(false);
12635-
promise->MaybeRejectWithUndefined();
12636-
});
12624+
->Then(
12625+
GetCurrentThreadSerialEventTarget(), __func__,
12626+
[outer, promise] {
12627+
// Step 10. Grant the document access to cookies and store
12628+
// that fact for
12629+
// the purposes of future calls to
12630+
// hasStorageAccess() and requestStorageAccess().
12631+
outer->SetHasStorageAccess(true);
12632+
promise->MaybeResolveWithUndefined();
12633+
},
12634+
[outer, promise] {
12635+
outer->SetHasStorageAccess(false);
12636+
promise->MaybeRejectWithUndefined();
12637+
});
1263712638

1263812639
return promise.forget();
1263912640
}

dom/base/TreeOrderedArrayInlines.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ size_t TreeOrderedArray<Node>::Insert(Node& aNode) {
4747
};
4848

4949
size_t idx;
50-
BinarySearchIf(mList, 0, mList.Length(),
51-
PositionComparator(aNode), &idx);
50+
BinarySearchIf(mList, 0, mList.Length(), PositionComparator(aNode), &idx);
5251
mList.InsertElementAt(idx, &aNode);
5352
return idx;
5453
}

dom/base/UIDirectionManager.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ void OnPrefChange(const char* aPrefName, void*) {
5151
void UIDirectionManager::Initialize() {
5252
DebugOnly<nsresult> rv =
5353
Preferences::RegisterCallback(OnPrefChange, "intl.uidirection");
54-
MOZ_ASSERT(NS_SUCCEEDED(rv),
55-
"Failed to observe \"intl.uidirection\"");
54+
MOZ_ASSERT(NS_SUCCEEDED(rv), "Failed to observe \"intl.uidirection\"");
5655
}
5756

5857
/* static */

dom/base/nsAttrValue.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,9 @@ MiscContainer* nsAttrValue::ClearMiscContainer() {
16451645
delete cont->mValue.mIntMargin;
16461646
break;
16471647
}
1648-
default: { break; }
1648+
default: {
1649+
break;
1650+
}
16491651
}
16501652
}
16511653
ResetMiscAtomOrString();

dom/base/nsAttrValueInlines.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ inline void nsAttrValue::ToString(mozilla::dom::DOMString& aResult) const {
242242
aResult.SetKnownLiveAtom(atom, mozilla::dom::DOMString::eNullNotExpected);
243243
break;
244244
}
245-
default: { ToString(aResult.AsAString()); }
245+
default: {
246+
ToString(aResult.AsAString());
247+
}
246248
}
247249
}
248250

dom/base/nsCCUncollectableMarker.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,9 @@ nsresult nsCCUncollectableMarker::Observe(nsISupports* aSubject,
426426
xpc_UnmarkSkippableJSHolders();
427427
break;
428428
}
429-
default: { break; }
429+
default: {
430+
break;
431+
}
430432
}
431433

432434
return NS_OK;

0 commit comments

Comments
 (0)