Skip to content

Commit

Permalink
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Browse files Browse the repository at this point in the history
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D28329

--HG--
extra : moz-landing-system : lando
  • Loading branch information
sylvestre committed Apr 22, 2019
1 parent c518481 commit a1dce64
Show file tree
Hide file tree
Showing 67 changed files with 1,333 additions and 1,382 deletions.
3 changes: 2 additions & 1 deletion accessible/base/nsAccessibilityService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,8 @@ nsAccessibilityService::CreateAccessibleByFrameType(nsIFrame* aFrame,
table = aContext->Parent();

if (table) {
nsIContent* parentContent = aContent->GetParentOrHostNode()->AsContent();
nsIContent* parentContent =
aContent->GetParentOrHostNode()->AsContent();
nsIFrame* parentFrame = nullptr;
if (parentContent) {
parentFrame = parentContent->GetPrimaryFrame();
Expand Down
7 changes: 3 additions & 4 deletions browser/app/winlauncher/DllBlocklistWin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,14 @@ LauncherVoidResult InitializeDllBlocklistOOP(const wchar_t* aFullImagePath,

// As part of our mitigation of binary tampering, copy our import directory
// from the original in our executable file.
LauncherVoidResult importDirRestored =
RestoreImportDirectory(aFullImagePath, ourExeImage, aChildProcess,
ourModule);
LauncherVoidResult importDirRestored = RestoreImportDirectory(
aFullImagePath, ourExeImage, aChildProcess, ourModule);
if (importDirRestored.isErr()) {
return importDirRestored;
}

Maybe<nt::PEHeaders::IATThunks> ntdllThunks =
ourExeImage.GetIATThunksForModule("ntdll.dll");
ourExeImage.GetIATThunksForModule("ntdll.dll");
if (!ntdllThunks) {
return LAUNCHER_ERROR_FROM_WIN32(ERROR_INVALID_DATA);
}
Expand Down
12 changes: 5 additions & 7 deletions browser/app/winlauncher/LauncherProcessWin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@
*
* @return Ok if browser startup should proceed
*/
static mozilla::LauncherVoidResult PostCreationSetup(const wchar_t* aFullImagePath,
HANDLE aChildProcess,
HANDLE aChildMainThread,
const bool aIsSafeMode) {
static mozilla::LauncherVoidResult PostCreationSetup(
const wchar_t* aFullImagePath, HANDLE aChildProcess,
HANDLE aChildMainThread, const bool aIsSafeMode) {
// The launcher process's DLL blocking code is incompatible with ASAN because
// it is able to execute before ASAN itself has even initialized.
// Also, the AArch64 build doesn't yet have a working interceptor.
Expand Down Expand Up @@ -332,9 +331,8 @@ Maybe<int> LauncherMain(int& argc, wchar_t* argv[],
nsAutoHandle process(pi.hProcess);
nsAutoHandle mainThread(pi.hThread);

LauncherVoidResult setupResult =
PostCreationSetup(argv[0], process.get(), mainThread.get(),
isSafeMode.value());
LauncherVoidResult setupResult = PostCreationSetup(
argv[0], process.get(), mainThread.get(), isSafeMode.value());
if (setupResult.isErr()) {
HandleLauncherError(setupResult);
::TerminateProcess(process.get(), 1);
Expand Down
3 changes: 2 additions & 1 deletion caps/OriginAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ class MOZ_STACK_CLASS PopulateFromSuffixIterator final
}

if (aName.EqualsLiteral("geckoViewUserContextId")) {
MOZ_RELEASE_ASSERT(mOriginAttributes->mGeckoViewSessionContextId.IsEmpty());
MOZ_RELEASE_ASSERT(
mOriginAttributes->mGeckoViewSessionContextId.IsEmpty());
mOriginAttributes->mGeckoViewSessionContextId.Assign(aValue);
return true;
}
Expand Down
9 changes: 6 additions & 3 deletions caps/OriginAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ class OriginAttributesPattern : public dom::OriginAttributesPatternDictionary {
}

if (mGeckoViewSessionContextId.WasPassed() &&
mGeckoViewSessionContextId.Value() != aAttrs.mGeckoViewSessionContextId) {
mGeckoViewSessionContextId.Value() !=
aAttrs.mGeckoViewSessionContextId) {
return false;
}

Expand Down Expand Up @@ -191,8 +192,10 @@ class OriginAttributesPattern : public dom::OriginAttributesPatternDictionary {
return false;
}

if (mGeckoViewSessionContextId.WasPassed() && aOther.mGeckoViewSessionContextId.WasPassed() &&
mGeckoViewSessionContextId.Value() != aOther.mGeckoViewSessionContextId.Value()) {
if (mGeckoViewSessionContextId.WasPassed() &&
aOther.mGeckoViewSessionContextId.WasPassed() &&
mGeckoViewSessionContextId.Value() !=
aOther.mGeckoViewSessionContextId.Value()) {
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions caps/nsJSPrincipals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ static bool ReadPrincipalInfo(JSStructuredCloneReader* aReader, uint32_t aTag,

static StaticRefPtr<nsIPrincipal> sActiveWorkerPrincipal;

nsJSPrincipals::AutoSetActiveWorkerPrincipal::AutoSetActiveWorkerPrincipal
(nsIPrincipal* aPrincipal) {
nsJSPrincipals::AutoSetActiveWorkerPrincipal::AutoSetActiveWorkerPrincipal(
nsIPrincipal* aPrincipal) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_RELEASE_ASSERT(!sActiveWorkerPrincipal);
sActiveWorkerPrincipal = aPrincipal;
Expand Down
2 changes: 1 addition & 1 deletion caps/tests/gtest/TestOriginAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using mozilla::OriginAttributes;
using mozilla::Preferences;

static void TestSuffix(const OriginAttributes& attrs) {
static void TestSuffix(const OriginAttributes &attrs) {
nsAutoCString suffix;
attrs.CreateSuffix(suffix);

Expand Down
3 changes: 1 addition & 2 deletions dom/base/DocumentOrShadowRoot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,7 @@ void DocumentOrShadowRoot::NodesFromRect(float aX, float aY, float aTopSize,
float aRightSize, float aBottomSize,
float aLeftSize,
bool aIgnoreRootScrollFrame,
bool aFlushLayout,
bool aOnlyVisible,
bool aFlushLayout, bool aOnlyVisible,
nsTArray<RefPtr<nsINode>>& aReturn) {
// Following the same behavior of elementFromPoint,
// we don't return anything if either coord is negative
Expand Down
2 changes: 1 addition & 1 deletion dom/base/SelectionChangeEventDispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace mozilla {
namespace dom {
class Document;
class Selection;
}
} // namespace dom

class SelectionChangeEventDispatcher final {
public:
Expand Down
3 changes: 1 addition & 2 deletions dom/base/nsDOMWindowUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1166,8 +1166,7 @@ nsDOMWindowUtils::NodesFromRect(float aX, float aY, float aTopSize,

AutoTArray<RefPtr<nsINode>, 8> nodes;
doc->NodesFromRect(aX, aY, aTopSize, aRightSize, aBottomSize, aLeftSize,
aIgnoreRootScrollFrame, aFlushLayout, aOnlyVisible,
nodes);
aIgnoreRootScrollFrame, aFlushLayout, aOnlyVisible, nodes);
list->SetCapacity(nodes.Length());
for (auto& node : nodes) {
list->AppendElement(node->AsContent());
Expand Down
12 changes: 5 additions & 7 deletions dom/base/nsGlobalWindowOuter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2824,8 +2824,8 @@ void nsPIDOMWindowOuter::SetInitialKeyboardIndicators(
windowRoot->SetShowFocusRings(aShowFocusRings == UIStateChangeType_Set);
}

nsContentUtils::SetKeyboardIndicatorsOnRemoteChildren(
this, aShowAccelerators, aShowFocusRings);
nsContentUtils::SetKeyboardIndicatorsOnRemoteChildren(this, aShowAccelerators,
aShowFocusRings);
}

Element* nsPIDOMWindowOuter::GetFrameElementInternal() const {
Expand Down Expand Up @@ -6282,9 +6282,7 @@ void nsGlobalWindowOuter::ReallyCloseWindow() {
// XXXbz now that we have mHavePendingClose, is this needed?
bool isTab;
if (rootWin == this || !bwin ||
(NS_SUCCEEDED(
bwin->IsTabContentWindow(this, &isTab)) &&
isTab)) {
(NS_SUCCEEDED(bwin->IsTabContentWindow(this, &isTab)) && isTab)) {
treeOwnerAsWin->Destroy();
}
}
Expand Down Expand Up @@ -6849,8 +6847,8 @@ void nsGlobalWindowOuter::SetKeyboardIndicators(
windowRoot->SetShowFocusRings(aShowFocusRings == UIStateChangeType_Set);
}

nsContentUtils::SetKeyboardIndicatorsOnRemoteChildren(
this, aShowAccelerators, aShowFocusRings);
nsContentUtils::SetKeyboardIndicatorsOnRemoteChildren(this, aShowAccelerators,
aShowFocusRings);

bool newShouldShowFocusRing = ShouldShowFocusRing();
if (mInnerWindow && nsGlobalWindowInner::Cast(mInnerWindow)->mHasFocus &&
Expand Down
4 changes: 2 additions & 2 deletions dom/base/nsHistory.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "mozilla/dom/ChildSHistory.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsIWeakReferenceUtils.h"// for nsWeakPtr
#include "nsPIDOMWindow.h" // for GetParentObject
#include "nsIWeakReferenceUtils.h" // for nsWeakPtr
#include "nsPIDOMWindow.h" // for GetParentObject
#include "nsStringFwd.h"
#include "nsWrapperCache.h"

Expand Down
18 changes: 9 additions & 9 deletions dom/base/nsIDocumentObserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentObserver, NS_IDOCUMENT_OBSERVER_IID)
nsIContent* aContent, \
mozilla::EventStates aStateMask) override;

#define NS_DECL_NSIDOCUMENTOBSERVER \
NS_DECL_NSIDOCUMENTOBSERVER_BEGINUPDATE \
NS_DECL_NSIDOCUMENTOBSERVER_ENDUPDATE \
NS_DECL_NSIDOCUMENTOBSERVER_BEGINLOAD \
NS_DECL_NSIDOCUMENTOBSERVER_ENDLOAD \
NS_DECL_NSIDOCUMENTOBSERVER_CONTENTSTATECHANGED \
#define NS_DECL_NSIDOCUMENTOBSERVER \
NS_DECL_NSIDOCUMENTOBSERVER_BEGINUPDATE \
NS_DECL_NSIDOCUMENTOBSERVER_ENDUPDATE \
NS_DECL_NSIDOCUMENTOBSERVER_BEGINLOAD \
NS_DECL_NSIDOCUMENTOBSERVER_ENDLOAD \
NS_DECL_NSIDOCUMENTOBSERVER_CONTENTSTATECHANGED \
NS_DECL_NSIMUTATIONOBSERVER

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

#define NS_IMPL_NSIDOCUMENTOBSERVER_STATE_STUB(_class) \
void _class::ContentStateChanged(mozilla::dom::Document*, \
nsIContent* aContent, \
#define NS_IMPL_NSIDOCUMENTOBSERVER_STATE_STUB(_class) \
void _class::ContentStateChanged(mozilla::dom::Document*, \
nsIContent* aContent, \
mozilla::EventStates aStateMask) {}

#define NS_IMPL_NSIDOCUMENTOBSERVER_CONTENT(_class) \
Expand Down
Loading

0 comments on commit a1dce64

Please sign in to comment.