Skip to content

Commit

Permalink
Bug 1519636 - clang-format-8: Reformat recent changes to the Google c…
Browse files Browse the repository at this point in the history
…oding 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

--HG--
extra : moz-landing-system : lando
  • Loading branch information
sylvestre committed Apr 4, 2019
1 parent 859b7ee commit 399dbd2
Show file tree
Hide file tree
Showing 427 changed files with 6,444 additions and 4,536 deletions.
669 changes: 346 additions & 323 deletions accessible/base/MarkupMap.h

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions caps/tests/gtest/TestOriginAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,20 @@ static void TestSuffix(const OriginAttributes& attrs) {
EXPECT_EQ(attrs, attrsFromSuffix);
}

TEST(OriginAttributes, Suffix_default) {
TEST(OriginAttributes, Suffix_default)
{
OriginAttributes attrs;
TestSuffix(attrs);
}

TEST(OriginAttributes, Suffix_appId_inIsolatedMozBrowser) {
TEST(OriginAttributes, Suffix_appId_inIsolatedMozBrowser)
{
OriginAttributes attrs(1, true);
TestSuffix(attrs);
}

TEST(OriginAttributes, Suffix_maxAppId_inIsolatedMozBrowser) {
TEST(OriginAttributes, Suffix_maxAppId_inIsolatedMozBrowser)
{
OriginAttributes attrs(4294967295, true);
TestSuffix(attrs);
}
3 changes: 1 addition & 2 deletions dom/base/AnonymousContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ void AnonymousContent::GetComputedStylePropertyValue(
aRv = cs->GetPropertyValue(aPropertyName, aResult);
}

void AnonymousContent::GetTargetIdForEvent(Event& aEvent, DOMString& aResult)
{
void AnonymousContent::GetTargetIdForEvent(Event& aEvent, DOMString& aResult) {
nsCOMPtr<Element> el = do_QueryInterface(aEvent.GetOriginalTarget());
if (el && el->IsInNativeAnonymousSubtree() && mContentNode->Contains(el)) {
aResult.SetKnownLiveAtom(el->GetID(), DOMString::eTreatNullAsNull);
Expand Down
29 changes: 15 additions & 14 deletions dom/base/DocGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,20 +143,21 @@ RefPtr<PerformanceInfoPromise> DocGroup::ReportPerformanceInfo() {
RefPtr<DocGroup> self = this;

return CollectMemoryInfo(top, mainThread)
->Then(mainThread, __func__,
[self, host, pid, windowID, duration, isTopLevel,
items](const PerformanceMemoryInfo& aMemoryInfo) {
PerformanceInfo info =
PerformanceInfo(host, pid, windowID, duration,
self->mPerformanceCounter->GetID(), false,
isTopLevel, aMemoryInfo, items);

return PerformanceInfoPromise::CreateAndResolve(std::move(info),
__func__);
},
[self](const nsresult rv) {
return PerformanceInfoPromise::CreateAndReject(rv, __func__);
});
->Then(
mainThread, __func__,
[self, host, pid, windowID, duration, isTopLevel,
items](const PerformanceMemoryInfo& aMemoryInfo) {
PerformanceInfo info =
PerformanceInfo(host, pid, windowID, duration,
self->mPerformanceCounter->GetID(), false,
isTopLevel, aMemoryInfo, items);

return PerformanceInfoPromise::CreateAndResolve(std::move(info),
__func__);
},
[self](const nsresult rv) {
return PerformanceInfoPromise::CreateAndReject(rv, __func__);
});
}

nsresult DocGroup::Dispatch(TaskCategory aCategory,
Expand Down
27 changes: 14 additions & 13 deletions dom/base/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12621,19 +12621,20 @@ already_AddRefed<mozilla::dom::Promise> Document::RequestStorageAccess(
AntiTrackingCommon::AddFirstPartyStorageAccessGrantedFor(
NodePrincipal(), inner, AntiTrackingCommon::eStorageAccessAPI,
performFinalChecks)
->Then(GetCurrentThreadSerialEventTarget(), __func__,
[outer, promise] {
// Step 10. Grant the document access to cookies and store
// that fact for
// the purposes of future calls to
// hasStorageAccess() and requestStorageAccess().
outer->SetHasStorageAccess(true);
promise->MaybeResolveWithUndefined();
},
[outer, promise] {
outer->SetHasStorageAccess(false);
promise->MaybeRejectWithUndefined();
});
->Then(
GetCurrentThreadSerialEventTarget(), __func__,
[outer, promise] {
// Step 10. Grant the document access to cookies and store
// that fact for
// the purposes of future calls to
// hasStorageAccess() and requestStorageAccess().
outer->SetHasStorageAccess(true);
promise->MaybeResolveWithUndefined();
},
[outer, promise] {
outer->SetHasStorageAccess(false);
promise->MaybeRejectWithUndefined();
});

return promise.forget();
}
Expand Down
3 changes: 1 addition & 2 deletions dom/base/TreeOrderedArrayInlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ size_t TreeOrderedArray<Node>::Insert(Node& aNode) {
};

size_t idx;
BinarySearchIf(mList, 0, mList.Length(),
PositionComparator(aNode), &idx);
BinarySearchIf(mList, 0, mList.Length(), PositionComparator(aNode), &idx);
mList.InsertElementAt(idx, &aNode);
return idx;
}
Expand Down
3 changes: 1 addition & 2 deletions dom/base/UIDirectionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ void OnPrefChange(const char* aPrefName, void*) {
void UIDirectionManager::Initialize() {
DebugOnly<nsresult> rv =
Preferences::RegisterCallback(OnPrefChange, "intl.uidirection");
MOZ_ASSERT(NS_SUCCEEDED(rv),
"Failed to observe \"intl.uidirection\"");
MOZ_ASSERT(NS_SUCCEEDED(rv), "Failed to observe \"intl.uidirection\"");
}

/* static */
Expand Down
4 changes: 3 additions & 1 deletion dom/base/nsAttrValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,9 @@ MiscContainer* nsAttrValue::ClearMiscContainer() {
delete cont->mValue.mIntMargin;
break;
}
default: { break; }
default: {
break;
}
}
}
ResetMiscAtomOrString();
Expand Down
4 changes: 3 additions & 1 deletion dom/base/nsAttrValueInlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ inline void nsAttrValue::ToString(mozilla::dom::DOMString& aResult) const {
aResult.SetKnownLiveAtom(atom, mozilla::dom::DOMString::eNullNotExpected);
break;
}
default: { ToString(aResult.AsAString()); }
default: {
ToString(aResult.AsAString());
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion dom/base/nsCCUncollectableMarker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,9 @@ nsresult nsCCUncollectableMarker::Observe(nsISupports* aSubject,
xpc_UnmarkSkippableJSHolders();
break;
}
default: { break; }
default: {
break;
}
}

return NS_OK;
Expand Down
6 changes: 4 additions & 2 deletions dom/base/test/gtest/TestContentUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#include "mozilla/CycleCollectedJSContext.h"
#include "mozilla/dom/SimpleGlobalObject.h"

TEST(DOM_Base_ContentUtils, StringifyJSON_EmptyValue) {
TEST(DOM_Base_ContentUtils, StringifyJSON_EmptyValue)
{
JSObject* globalObject = mozilla::dom::SimpleGlobalObject::Create(
mozilla::dom::SimpleGlobalObject::GlobalType::BindingDetail);
mozilla::dom::AutoJSAPI jsAPI;
Expand All @@ -25,7 +26,8 @@ TEST(DOM_Base_ContentUtils, StringifyJSON_EmptyValue) {
ASSERT_TRUE(serializedValue.EqualsLiteral("null"));
}

TEST(DOM_Base_ContentUtils, StringifyJSON_Object) {
TEST(DOM_Base_ContentUtils, StringifyJSON_Object)
{
JSObject* globalObject = mozilla::dom::SimpleGlobalObject::Create(
mozilla::dom::SimpleGlobalObject::GlobalType::BindingDetail);
mozilla::dom::AutoJSAPI jsAPI;
Expand Down
Loading

0 comments on commit 399dbd2

Please sign in to comment.