Bug 1416384 - Part 8: Stylistic fixes in nsGlobalWindow{Inner,Outer}.cpp, r=smaug
authorNika Layzell <nika@thelayzells.com>
Wed, 15 Nov 2017 11:34:41 -0500
changeset 392036 476642ee328b1363bd6505ed6ab04e57aeb75bdf
parent 392035 149ba94317911ec3bafa545db59e59f7abe2fcf0
child 392037 7b2f3fa349b001af0dce735501014c72f0f512c7
push id32909
push usercbrindusan@mozilla.com
push dateWed, 15 Nov 2017 22:25:14 +0000
treeherdermozilla-central@f41930a869a8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1416384
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1416384 - Part 8: Stylistic fixes in nsGlobalWindow{Inner,Outer}.cpp, r=smaug MozReview-Commit-ID: KDllmZzdn6m
dom/base/nsGlobalWindowInner.cpp
dom/base/nsGlobalWindowOuter.cpp
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -490,19 +490,19 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED(IdleR
 NS_IMPL_ADDREF_INHERITED(IdleRequestTimeoutHandler, TimeoutHandler)
 NS_IMPL_RELEASE_INHERITED(IdleRequestTimeoutHandler, TimeoutHandler)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(IdleRequestTimeoutHandler)
 NS_INTERFACE_MAP_END_INHERITING(TimeoutHandler)
 
 uint32_t
 nsGlobalWindowInner::RequestIdleCallback(JSContext* aCx,
-                                    IdleRequestCallback& aCallback,
-                                    const IdleRequestOptions& aOptions,
-                                    ErrorResult& aError)
+                                         IdleRequestCallback& aCallback,
+                                         const IdleRequestOptions& aOptions,
+                                         ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsInnerWindow());
   AssertIsOnMainThread();
 
   uint32_t handle = mIdleRequestCallbackCounter++;
 
   RefPtr<IdleRequest> request =
     new IdleRequest(&aCallback, handle);
@@ -1463,17 +1463,17 @@ nsGlobalWindowInner::TraceGlobalJSObject
 void
 nsGlobalWindowInner::SetInitialPrincipalToSubject()
 {
   MOZ_CRASH("Virtual outer window only function");
 }
 
 PopupControlState
 nsGlobalWindowInner::PushPopupControlState(PopupControlState aState,
-                                      bool aForce) const
+                                           bool aForce) const
 {
   MOZ_CRASH("Virtual outer window only function");
 }
 
 void
 nsGlobalWindowInner::PopPopupControlState(PopupControlState aState) const
 {
   MOZ_CRASH("Virtual outer window only function");
@@ -1483,18 +1483,18 @@ PopupControlState
 nsGlobalWindowInner::GetPopupControlState() const
 {
   MOZ_ASSERT(NS_IsMainThread());
   return gPopupControlState;
 }
 
 nsresult
 nsGlobalWindowInner::SetNewDocument(nsIDocument* aDocument,
-                               nsISupports* aState,
-                               bool aForceReuseInnerWindow)
+                                    nsISupports* aState,
+                                    bool aForceReuseInnerWindow)
 {
   NS_PRECONDITION(mDocumentPrincipal == nullptr,
                   "mDocumentPrincipal prematurely set!");
   MOZ_ASSERT(aDocument);
 
   if (!mOuterWindow) {
     return NS_ERROR_NOT_INITIALIZED;
   }
@@ -1536,17 +1536,17 @@ nsGlobalWindowInner::InnerSetNewDocument
                         mMutationBits ? 1 : 0);
 
   // Clear our mutation bitfield.
   mMutationBits = 0;
 }
 
 void
 nsGlobalWindowInner::SetOpenerWindow(nsPIDOMWindowOuter* aOpener,
-                                bool aOriginalOpener)
+                                     bool aOriginalOpener)
 {
   FORWARD_TO_OUTER_VOID(SetOpenerWindow, (aOpener, aOriginalOpener));
 }
 
 void
 nsGlobalWindowInner::UpdateParentTarget()
 {
   // Try to get our frame element's tab child global (its in-process message
@@ -2320,19 +2320,19 @@ nsGlobalWindowInner::GetScriptableTop()
 already_AddRefed<nsPIDOMWindowOuter>
 nsGlobalWindowInner::GetTop()
 {
   MOZ_CRASH("Virtual outer window only function");
 }
 
 void
 nsGlobalWindowInner::GetContent(JSContext* aCx,
-                           JS::MutableHandle<JSObject*> aRetval,
-                           CallerType aCallerType,
-                           ErrorResult& aError)
+                                JS::MutableHandle<JSObject*> aRetval,
+                                CallerType aCallerType,
+                                ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(GetContentOuter,
                             (aCx, aRetval, aCallerType, aError), aError, );
 }
 
 MozSelfSupport*
 nsGlobalWindowInner::GetMozSelfSupport(ErrorResult& aError)
 {
@@ -2451,18 +2451,18 @@ nsGlobalWindowInner::GetFrames()
 already_AddRefed<nsPIDOMWindowOuter>
 nsGlobalWindowInner::IndexedGetter(uint32_t aIndex)
 {
   FORWARD_TO_OUTER(IndexedGetterOuter, (aIndex), nullptr);
 }
 
 bool
 nsGlobalWindowInner::DoResolve(JSContext* aCx, JS::Handle<JSObject*> aObj,
-                          JS::Handle<jsid> aId,
-                          JS::MutableHandle<JS::PropertyDescriptor> aDesc)
+                               JS::Handle<jsid> aId,
+                               JS::MutableHandle<JS::PropertyDescriptor> aDesc)
 {
   MOZ_ASSERT(IsInnerWindow());
 
   // Note: Keep this in sync with MayResolve.
 
   // Note: The infallibleInit call in GlobalResolve depends on this check.
   if (!JSID_IS_STRING(aId)) {
     return true;
@@ -2519,17 +2519,17 @@ nsGlobalWindowInner::MayResolve(jsid aId
   nsAutoString name;
   AssignJSFlatString(name, JSID_TO_FLAT_STRING(aId));
 
   return nameSpaceManager->LookupName(name);
 }
 
 void
 nsGlobalWindowInner::GetOwnPropertyNames(JSContext* aCx, JS::AutoIdVector& aNames,
-                                    bool aEnumerableOnly, ErrorResult& aRv)
+                                         bool aEnumerableOnly, ErrorResult& aRv)
 {
   if (aEnumerableOnly) {
     // The names we would return from here get defined on the window via one of
     // two codepaths.  The ones coming from the WebIDLGlobalNameHash will end up
     // in the DefineConstructor function in BindingUtils, which always defines
     // things as non-enumerable.  The ones coming from the script namespace
     // manager get defined by nsDOMClassInfo::PostCreatePrototype calling
     // ResolvePrototype and using the resulting descriptot to define the
@@ -2691,17 +2691,17 @@ nsGlobalWindowInner::GetControllers(nsIC
 nsPIDOMWindowOuter*
 nsGlobalWindowInner::GetOpenerWindow(ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(GetOpenerWindowOuter, (), aError, nullptr);
 }
 
 void
 nsGlobalWindowInner::GetOpener(JSContext* aCx, JS::MutableHandle<JS::Value> aRetval,
-                          ErrorResult& aError)
+                               ErrorResult& aError)
 {
   MOZ_ASSERT(IsInnerWindow());
 
   nsCOMPtr<nsPIDOMWindowOuter> opener = GetOpenerWindow(aError);
   if (aError.Failed() || !opener) {
     aRetval.setNull();
     return;
   }
@@ -2712,17 +2712,17 @@ nsGlobalWindowInner::GetOpener(JSContext
 already_AddRefed<nsPIDOMWindowOuter>
 nsGlobalWindowInner::GetOpener()
 {
   FORWARD_TO_OUTER(GetOpener, (), nullptr);
 }
 
 void
 nsGlobalWindowInner::SetOpener(JSContext* aCx, JS::Handle<JS::Value> aOpener,
-                          ErrorResult& aError)
+                               ErrorResult& aError)
 {
   // Check if we were called from a privileged chrome script.  If not, and if
   // aOpener is not null, just define aOpener on our inner window's JS object,
   // wrapped into the current compartment so that for Xrays we define on the
   // Xray expando object, but don't set it on the outer window, so that it'll
   // get reset on navigation.  This is just like replaceable properties, but
   // we're not quite readonly.
   if (!aOpener.isNull() && !nsContentUtils::IsCallerChrome()) {
@@ -2798,19 +2798,19 @@ nsGlobalWindowInner::GetInnerWidth(Calle
   // called by GetReplaceableWindowCoord need it.  If this ever changes, fix
   //   nsresult nsGlobalWindowInner::GetInnerWidth(int32_t* aInnerWidth)
   // to actually take a useful CallerType and pass it in here.
   FORWARD_TO_OUTER_OR_THROW(GetInnerWidthOuter, (aError), aError, 0);
 }
 
 void
 nsGlobalWindowInner::GetInnerWidth(JSContext* aCx,
-                              JS::MutableHandle<JS::Value> aValue,
-                              CallerType aCallerType,
-                              ErrorResult& aError)
+                                   JS::MutableHandle<JS::Value> aValue,
+                                   CallerType aCallerType,
+                                   ErrorResult& aError)
 {
   GetReplaceableWindowCoord(aCx, &nsGlobalWindowInner::GetInnerWidth, aValue,
                             aCallerType, aError);
 }
 
 nsresult
 nsGlobalWindowInner::GetInnerWidth(int32_t* aInnerWidth)
 {
@@ -2818,26 +2818,26 @@ nsGlobalWindowInner::GetInnerWidth(int32
   // Callee doesn't care about the caller type, but play it safe.
   *aInnerWidth = GetInnerWidth(CallerType::NonSystem, rv);
 
   return rv.StealNSResult();
 }
 
 void
 nsGlobalWindowInner::SetInnerWidth(int32_t aInnerWidth, CallerType aCallerType,
-                              ErrorResult& aError)
+                                   ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(SetInnerWidthOuter,
                             (aInnerWidth, aCallerType, aError), aError, );
 }
 
 void
 nsGlobalWindowInner::SetInnerWidth(JSContext* aCx, JS::Handle<JS::Value> aValue,
-                              CallerType aCallerType,
-                              ErrorResult& aError)
+                                   CallerType aCallerType,
+                                   ErrorResult& aError)
 {
   SetReplaceableWindowCoord(aCx, &nsGlobalWindowInner::SetInnerWidth,
                             aValue, "innerWidth", aCallerType, aError);
 }
 
 int32_t
 nsGlobalWindowInner::GetInnerHeight(CallerType aCallerType, ErrorResult& aError)
 {
@@ -2845,19 +2845,19 @@ nsGlobalWindowInner::GetInnerHeight(Call
   // called by GetReplaceableWindowCoord need it.  If this ever changes, fix
   //   nsresult nsGlobalWindowInner::GetInnerHeight(int32_t* aInnerWidth)
   // to actually take a useful CallerType and pass it in here.
   FORWARD_TO_OUTER_OR_THROW(GetInnerHeightOuter, (aError), aError, 0);
 }
 
 void
 nsGlobalWindowInner::GetInnerHeight(JSContext* aCx,
-                              JS::MutableHandle<JS::Value> aValue,
-                              CallerType aCallerType,
-                              ErrorResult& aError)
+                                    JS::MutableHandle<JS::Value> aValue,
+                                    CallerType aCallerType,
+                                    ErrorResult& aError)
 {
   GetReplaceableWindowCoord(aCx, &nsGlobalWindowInner::GetInnerHeight, aValue,
                             aCallerType, aError);
 }
 
 nsresult
 nsGlobalWindowInner::GetInnerHeight(int32_t* aInnerHeight)
 {
@@ -2865,112 +2865,112 @@ nsGlobalWindowInner::GetInnerHeight(int3
   // Callee doesn't care about the caller type, but play it safe.
   *aInnerHeight = GetInnerHeight(CallerType::NonSystem, rv);
 
   return rv.StealNSResult();
 }
 
 void
 nsGlobalWindowInner::SetInnerHeight(int32_t aInnerHeight,
-                               CallerType aCallerType,
-                               ErrorResult& aError)
+                                    CallerType aCallerType,
+                                    ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(SetInnerHeightOuter,
                             (aInnerHeight, aCallerType, aError), aError, );
 }
 
 void
 nsGlobalWindowInner::SetInnerHeight(JSContext* aCx, JS::Handle<JS::Value> aValue,
-                               CallerType aCallerType, ErrorResult& aError)
+                                    CallerType aCallerType, ErrorResult& aError)
 {
   SetReplaceableWindowCoord(aCx, &nsGlobalWindowInner::SetInnerHeight,
                             aValue, "innerHeight", aCallerType, aError);
 }
 
 int32_t
 nsGlobalWindowInner::GetOuterWidth(CallerType aCallerType, ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(GetOuterWidthOuter, (aCallerType, aError),
                             aError, 0);
 }
 
 void
 nsGlobalWindowInner::GetOuterWidth(JSContext* aCx,
-                              JS::MutableHandle<JS::Value> aValue,
-                              CallerType aCallerType,
-                              ErrorResult& aError)
+                                   JS::MutableHandle<JS::Value> aValue,
+                                   CallerType aCallerType,
+                                   ErrorResult& aError)
 {
   GetReplaceableWindowCoord(aCx, &nsGlobalWindowInner::GetOuterWidth, aValue,
                             aCallerType, aError);
 }
 
 int32_t
 nsGlobalWindowInner::GetOuterHeight(CallerType aCallerType, ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(GetOuterHeightOuter, (aCallerType, aError),
                             aError, 0);
 }
 
 void
 nsGlobalWindowInner::GetOuterHeight(JSContext* aCx,
-                               JS::MutableHandle<JS::Value> aValue,
-                               CallerType aCallerType,
-                               ErrorResult& aError)
+                                    JS::MutableHandle<JS::Value> aValue,
+                                    CallerType aCallerType,
+                                    ErrorResult& aError)
 {
   GetReplaceableWindowCoord(aCx, &nsGlobalWindowInner::GetOuterHeight, aValue,
                             aCallerType, aError);
 }
 
 void
 nsGlobalWindowInner::SetOuterWidth(int32_t aOuterWidth,
-                              CallerType aCallerType,
-                              ErrorResult& aError)
+                                   CallerType aCallerType,
+                                   ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(SetOuterWidthOuter,
                             (aOuterWidth, aCallerType, aError), aError, );
 }
 
 void
 nsGlobalWindowInner::SetOuterWidth(JSContext* aCx, JS::Handle<JS::Value> aValue,
-                              CallerType aCallerType,
-                              ErrorResult& aError)
+                                   CallerType aCallerType,
+                                   ErrorResult& aError)
 {
   SetReplaceableWindowCoord(aCx, &nsGlobalWindowInner::SetOuterWidth,
                             aValue, "outerWidth", aCallerType, aError);
 }
 
 void
 nsGlobalWindowInner::SetOuterHeight(int32_t aOuterHeight,
-                               CallerType aCallerType,
-                               ErrorResult& aError)
+                                    CallerType aCallerType,
+                                    ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(SetOuterHeightOuter,
                             (aOuterHeight, aCallerType, aError), aError, );
 }
 
 void
 nsGlobalWindowInner::SetOuterHeight(JSContext* aCx, JS::Handle<JS::Value> aValue,
-                               CallerType aCallerType,
-                               ErrorResult& aError)
+                                    CallerType aCallerType,
+                                    ErrorResult& aError)
 {
   SetReplaceableWindowCoord(aCx, &nsGlobalWindowInner::SetOuterHeight,
                             aValue, "outerHeight", aCallerType, aError);
 }
 
 int32_t
 nsGlobalWindowInner::GetScreenX(CallerType aCallerType, ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(GetScreenXOuter, (aCallerType, aError), aError, 0);
 }
 
 void
 nsGlobalWindowInner::GetScreenX(JSContext* aCx,
-                           JS::MutableHandle<JS::Value> aValue,
-                           CallerType aCallerType,
-                           ErrorResult& aError)
+                                JS::MutableHandle<JS::Value> aValue,
+                                CallerType aCallerType,
+                                ErrorResult& aError)
 {
   GetReplaceableWindowCoord(aCx, &nsGlobalWindowInner::GetScreenX, aValue,
                             aCallerType, aError);
 }
 
 float
 nsGlobalWindowInner::GetMozInnerScreenX(CallerType aCallerType, ErrorResult& aError)
 {
@@ -2992,17 +2992,17 @@ nsGlobalWindowInner::GetDevicePixelRatio
 uint64_t
 nsGlobalWindowInner::GetMozPaintCount(ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(GetMozPaintCountOuter, (), aError, 0);
 }
 
 int32_t
 nsGlobalWindowInner::RequestAnimationFrame(FrameRequestCallback& aCallback,
-                                      ErrorResult& aError)
+                                           ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsInnerWindow());
 
   if (!mDoc) {
     return 0;
   }
 
   if (GetWrapperPreserveColor()) {
@@ -3023,71 +3023,71 @@ nsGlobalWindowInner::CancelAnimationFram
     return;
   }
 
   mDoc->CancelFrameRequestCallback(aHandle);
 }
 
 already_AddRefed<MediaQueryList>
 nsGlobalWindowInner::MatchMedia(const nsAString& aMediaQueryList,
-                           CallerType aCallerType,
-                           ErrorResult& aError)
+                                CallerType aCallerType,
+                                ErrorResult& aError)
 {
   // FIXME: This whole forward-to-outer and then get a pres
   // shell/context off the docshell dance is sort of silly; it'd make
   // more sense to forward to the inner, but it's what everyone else
   // (GetSelection, GetScrollXY, etc.) does around here.
   FORWARD_TO_OUTER_OR_THROW(MatchMediaOuter, (aMediaQueryList, aCallerType), aError, nullptr);
 }
 
 void
 nsGlobalWindowInner::SetScreenX(int32_t aScreenX,
-                           CallerType aCallerType,
-                           ErrorResult& aError)
+                                CallerType aCallerType,
+                                ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(SetScreenXOuter,
                             (aScreenX, aCallerType, aError), aError, );
 }
 
 void
 nsGlobalWindowInner::SetScreenX(JSContext* aCx, JS::Handle<JS::Value> aValue,
-                           CallerType aCallerType, ErrorResult& aError)
+                                CallerType aCallerType, ErrorResult& aError)
 {
   SetReplaceableWindowCoord(aCx, &nsGlobalWindowInner::SetScreenX,
                             aValue, "screenX", aCallerType, aError);
 }
 
 int32_t
 nsGlobalWindowInner::GetScreenY(CallerType aCallerType, ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(GetScreenYOuter, (aCallerType, aError), aError, 0);
 }
 
 void
 nsGlobalWindowInner::GetScreenY(JSContext* aCx,
-                           JS::MutableHandle<JS::Value> aValue,
-                           CallerType aCallerType, ErrorResult& aError)
+                                JS::MutableHandle<JS::Value> aValue,
+                                CallerType aCallerType, ErrorResult& aError)
 {
   GetReplaceableWindowCoord(aCx, &nsGlobalWindowInner::GetScreenY, aValue,
                             aCallerType, aError);
 }
 
 void
 nsGlobalWindowInner::SetScreenY(int32_t aScreenY,
-                           CallerType aCallerType,
-                           ErrorResult& aError)
+                                CallerType aCallerType,
+                                ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(SetScreenYOuter,
                             (aScreenY, aCallerType, aError), aError, );
 }
 
 void
 nsGlobalWindowInner::SetScreenY(JSContext* aCx, JS::Handle<JS::Value> aValue,
-                           CallerType aCallerType,
-                           ErrorResult& aError)
+                                CallerType aCallerType,
+                                ErrorResult& aError)
 {
   SetReplaceableWindowCoord(aCx, &nsGlobalWindowInner::SetScreenY,
                             aValue, "screenY", aCallerType, aError);
 }
 
 int32_t
 nsGlobalWindowInner::GetScrollMinX(ErrorResult& aError)
 {
@@ -3195,17 +3195,17 @@ nsGlobalWindowInner::SetFullScreen(bool 
 nsresult
 nsGlobalWindowInner::SetFullScreen(bool aFullScreen)
 {
   FORWARD_TO_OUTER(SetFullScreen, (aFullScreen), NS_ERROR_NOT_INITIALIZED);
 }
 
 nsresult
 nsGlobalWindowInner::SetFullscreenInternal(FullscreenReason aReason,
-                                      bool aFullScreen)
+                                           bool aFullScreen)
 {
   MOZ_CRASH("Virtual outer window only function");
 }
 
 /* virtual */ void
 nsGlobalWindowInner::FullscreenWillChange(bool aIsFullscreen)
 {
   MOZ_CRASH("Virtual outer window only function");
@@ -3263,53 +3263,53 @@ nsGlobalWindowInner::Dump(const nsAStrin
     fputs(cstr, fp);
     fflush(fp);
     free(cstr);
   }
 }
 
 void
 nsGlobalWindowInner::Alert(nsIPrincipal& aSubjectPrincipal,
-                      ErrorResult& aError)
+                           ErrorResult& aError)
 {
   MOZ_ASSERT(IsInnerWindow());
   Alert(EmptyString(), aSubjectPrincipal, aError);
 }
 
 void
 nsGlobalWindowInner::Alert(const nsAString& aMessage,
-                      nsIPrincipal& aSubjectPrincipal,
-                      ErrorResult& aError)
+                           nsIPrincipal& aSubjectPrincipal,
+                           ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(AlertOuter, (aMessage, aSubjectPrincipal, aError),
                             aError, );
 }
 
 bool
 nsGlobalWindowInner::Confirm(const nsAString& aMessage,
-                        nsIPrincipal& aSubjectPrincipal,
-                        ErrorResult& aError)
+                             nsIPrincipal& aSubjectPrincipal,
+                             ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(ConfirmOuter, (aMessage, aSubjectPrincipal, aError),
                             aError, false);
 }
 
 already_AddRefed<Promise>
 nsGlobalWindowInner::Fetch(const RequestOrUSVString& aInput,
-                      const RequestInit& aInit,
-                      CallerType aCallerType, ErrorResult& aRv)
+                           const RequestInit& aInit,
+                           CallerType aCallerType, ErrorResult& aRv)
 {
   return FetchRequest(this, aInput, aInit, aCallerType, aRv);
 }
 
 void
 nsGlobalWindowInner::Prompt(const nsAString& aMessage, const nsAString& aInitial,
-                       nsAString& aReturn,
-                       nsIPrincipal& aSubjectPrincipal,
-                       ErrorResult& aError)
+                            nsAString& aReturn,
+                            nsIPrincipal& aSubjectPrincipal,
+                            ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(PromptOuter,
                             (aMessage, aInitial, aReturn, aSubjectPrincipal,
                              aError),
                             aError, );
 }
 
 void
@@ -3373,47 +3373,47 @@ nsGlobalWindowInner::IsWindowPrintEnable
 void
 nsGlobalWindowInner::Print(ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(PrintOuter, (aError), aError, );
 }
 
 void
 nsGlobalWindowInner::MoveTo(int32_t aXPos, int32_t aYPos,
-                       CallerType aCallerType, ErrorResult& aError)
+                            CallerType aCallerType, ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(MoveToOuter,
                             (aXPos, aYPos, aCallerType, aError), aError, );
 }
 
 void
 nsGlobalWindowInner::MoveBy(int32_t aXDif, int32_t aYDif,
-                       CallerType aCallerType, ErrorResult& aError)
+                            CallerType aCallerType, ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(MoveByOuter,
                             (aXDif, aYDif, aCallerType, aError), aError, );
 }
 
 nsresult
 nsGlobalWindowInner::MoveBy(int32_t aXDif, int32_t aYDif)
 {
   FORWARD_TO_OUTER(MoveBy, (aXDif, aYDif), NS_ERROR_UNEXPECTED);
 }
 
 void
 nsGlobalWindowInner::ResizeTo(int32_t aWidth, int32_t aHeight,
-                         CallerType aCallerType, ErrorResult& aError)
+                              CallerType aCallerType, ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(ResizeToOuter,
                             (aWidth, aHeight, aCallerType, aError), aError, );
 }
 
 void
 nsGlobalWindowInner::ResizeBy(int32_t aWidthDif, int32_t aHeightDif,
-                         CallerType aCallerType, ErrorResult& aError)
+                              CallerType aCallerType, ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(ResizeByOuter,
                             (aWidthDif, aHeightDif, aCallerType, aError),
                             aError, );
 }
 
 void
 nsGlobalWindowInner::SizeToContent(CallerType aCallerType, ErrorResult& aError)
@@ -3484,17 +3484,17 @@ nsGlobalWindowInner::ScrollTo(const Scro
 void
 nsGlobalWindowInner::Scroll(const ScrollToOptions& aOptions)
 {
   ScrollTo(aOptions);
 }
 
 void
 nsGlobalWindowInner::ScrollTo(const CSSIntPoint& aScroll,
-                         const ScrollOptions& aOptions)
+                              const ScrollOptions& aOptions)
 {
   // When scrolling to a non-zero offset, we need to determine whether that
   // position is within our scrollable range, so we need updated layout
   // information which requires a layout flush, otherwise all we need is to
   // flush frames to be able to access our scrollable frame here.
   FlushType flushType = (aScroll.x || aScroll.y) ?
                           FlushType::Layout :
                           FlushType::Frames;
@@ -3559,17 +3559,17 @@ nsGlobalWindowInner::ScrollBy(const Scro
     }
 
     ScrollTo(scrollPos, aOptions);
   }
 }
 
 void
 nsGlobalWindowInner::ScrollByLines(int32_t numLines,
-                              const ScrollOptions& aOptions)
+                                   const ScrollOptions& aOptions)
 {
   MOZ_ASSERT(IsInnerWindow());
 
   FlushPendingNotifications(FlushType::Layout);
   nsIScrollableFrame *sf = GetScrollFrame();
   if (sf) {
     // It seems like it would make more sense for ScrollByLines to use
     // SMOOTH mode, but tests seem to depend on the synchronous behaviour.
@@ -3580,17 +3580,17 @@ nsGlobalWindowInner::ScrollByLines(int32
                  smoothScroll
                    ? nsIScrollableFrame::SMOOTH_MSD
                    : nsIScrollableFrame::INSTANT);
   }
 }
 
 void
 nsGlobalWindowInner::ScrollByPages(int32_t numPages,
-                              const ScrollOptions& aOptions)
+                                   const ScrollOptions& aOptions)
 {
   MOZ_ASSERT(IsInnerWindow());
 
   FlushPendingNotifications(FlushType::Layout);
   nsIScrollableFrame *sf = GetScrollFrame();
   if (sf) {
     // It seems like it would make more sense for ScrollByPages to use
     // SMOOTH mode, but tests seem to depend on the synchronous behaviour.
@@ -3655,19 +3655,19 @@ nsGlobalWindowInner::ReleaseEvents()
 {
   if (mDoc) {
     mDoc->WarnOnceAbout(nsIDocument::eUseOfReleaseEvents);
   }
 }
 
 void
 nsGlobalWindowInner::FirePopupBlockedEvent(nsIDocument* aDoc,
-                                      nsIURI* aPopupURI,
-                                      const nsAString& aPopupWindowName,
-                                      const nsAString& aPopupWindowFeatures)
+                                           nsIURI* aPopupURI,
+                                           const nsAString& aPopupWindowName,
+                                           const nsAString& aPopupWindowFeatures)
 {
   MOZ_CRASH("Virtual outer window only function");
 }
 
 // static
 bool
 nsGlobalWindowInner::CanSetProperty(const char *aPrefName)
 {
@@ -3678,26 +3678,26 @@ nsGlobalWindowInner::CanSetProperty(cons
 
   // If the pref is set to true, we can not set the property
   // and vice versa.
   return !Preferences::GetBool(aPrefName, true);
 }
 
 already_AddRefed<nsPIDOMWindowOuter>
 nsGlobalWindowInner::Open(const nsAString& aUrl, const nsAString& aName,
-                     const nsAString& aOptions, ErrorResult& aError)
+                          const nsAString& aOptions, ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(OpenOuter, (aUrl, aName, aOptions, aError), aError,
                             nullptr);
 }
 
 nsresult
 nsGlobalWindowInner::Open(const nsAString& aUrl, const nsAString& aName,
-                     const nsAString& aOptions, nsIDocShellLoadInfo* aLoadInfo,
-                     bool aForceNoOpener, nsPIDOMWindowOuter **_retval)
+                          const nsAString& aOptions, nsIDocShellLoadInfo* aLoadInfo,
+                          bool aForceNoOpener, nsPIDOMWindowOuter **_retval)
 {
   FORWARD_TO_OUTER(Open, (aUrl, aName, aOptions, aLoadInfo, aForceNoOpener,
                           _retval),
                    NS_ERROR_NOT_INITIALIZED);
 }
 
 // like Open, but attaches to the new window any extra parameters past
 // [features] as a JS property named "arguments"
@@ -3708,28 +3708,28 @@ nsGlobalWindowInner::OpenDialog(const ns
                                 nsPIDOMWindowOuter** _retval)
 {
   MOZ_CRASH("Virtual outer window only function");
 }
 
 // Like Open, but passes aNavigate=false.
 /* virtual */ nsresult
 nsGlobalWindowInner::OpenNoNavigate(const nsAString& aUrl,
-                               const nsAString& aName,
-                               const nsAString& aOptions,
-                               nsPIDOMWindowOuter **_retval)
+                                    const nsAString& aName,
+                                    const nsAString& aOptions,
+                                    nsPIDOMWindowOuter **_retval)
 {
   MOZ_CRASH("Virtual outer window only function");
 }
 
 already_AddRefed<nsPIDOMWindowOuter>
 nsGlobalWindowInner::OpenDialog(JSContext* aCx, const nsAString& aUrl,
-                           const nsAString& aName, const nsAString& aOptions,
-                           const Sequence<JS::Value>& aExtraArgument,
-                           ErrorResult& aError)
+                                const nsAString& aName, const nsAString& aOptions,
+                                const Sequence<JS::Value>& aExtraArgument,
+                                ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(OpenDialogOuter,
                             (aCx, aUrl, aName, aOptions, aExtraArgument, aError),
                             aError, nullptr);
 }
 
 already_AddRefed<nsPIDOMWindowOuter>
 nsGlobalWindowInner::GetFrames(ErrorResult& aError)
@@ -3769,33 +3769,33 @@ nsGlobalWindowInner::CallerInnerWindow()
   // The calling window must be holding a reference, so we can return a weak
   // pointer.
   nsCOMPtr<nsPIDOMWindowInner> win = do_QueryInterface(global);
   return nsGlobalWindowInner::Cast(win);
 }
 
 void
 nsGlobalWindowInner::PostMessageMoz(JSContext* aCx, JS::Handle<JS::Value> aMessage,
-                               const nsAString& aTargetOrigin,
-                               JS::Handle<JS::Value> aTransfer,
-                               nsIPrincipal& aSubjectPrincipal,
-                               ErrorResult& aError)
+                                    const nsAString& aTargetOrigin,
+                                    JS::Handle<JS::Value> aTransfer,
+                                    nsIPrincipal& aSubjectPrincipal,
+                                    ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(PostMessageMozOuter,
                             (aCx, aMessage, aTargetOrigin, aTransfer,
                              aSubjectPrincipal, aError),
                             aError, );
 }
 
 void
 nsGlobalWindowInner::PostMessageMoz(JSContext* aCx, JS::Handle<JS::Value> aMessage,
-                               const nsAString& aTargetOrigin,
-                               const Sequence<JSObject*>& aTransfer,
-                               nsIPrincipal& aSubjectPrincipal,
-                               ErrorResult& aRv)
+                                    const nsAString& aTargetOrigin,
+                                    const Sequence<JSObject*>& aTransfer,
+                                    nsIPrincipal& aSubjectPrincipal,
+                                    ErrorResult& aRv)
 {
   JS::Rooted<JS::Value> transferArray(aCx, JS::UndefinedValue());
 
   aRv = nsContentUtils::CreateJSValueFromSequenceOfObject(aCx, aTransfer,
                                                           &transferArray);
   if (NS_WARN_IF(aRv.Failed())) {
     return;
   }
@@ -3857,17 +3857,18 @@ nsGlobalWindowInner::IsInModalState()
     return false;
   }
 
   return topWin->mModalStateDepth != 0;
 }
 
 // static
 void
-nsGlobalWindowInner::NotifyDOMWindowDestroyed(nsGlobalWindowInner* aWindow) {
+nsGlobalWindowInner::NotifyDOMWindowDestroyed(nsGlobalWindowInner* aWindow)
+{
   nsCOMPtr<nsIObserverService> observerService =
     services::GetObserverService();
   if (observerService) {
     observerService->
       NotifyObservers(ToSupports(aWindow),
                       DOM_WINDOW_DESTROYED_TOPIC, nullptr);
   }
 }
@@ -3880,31 +3881,33 @@ nsGlobalWindowInner::NotifyWindowIDDestr
   nsresult rv = Dispatch(TaskCategory::Other, runnable.forget());
   if (NS_SUCCEEDED(rv)) {
     mNotifiedIDDestroyed = true;
   }
 }
 
 // static
 void
-nsGlobalWindowInner::NotifyDOMWindowFrozen(nsGlobalWindowInner* aWindow) {
+nsGlobalWindowInner::NotifyDOMWindowFrozen(nsGlobalWindowInner* aWindow)
+{
   if (aWindow) {
     nsCOMPtr<nsIObserverService> observerService =
       services::GetObserverService();
     if (observerService) {
       observerService->
         NotifyObservers(ToSupports(aWindow),
                         DOM_WINDOW_FROZEN_TOPIC, nullptr);
     }
   }
 }
 
 // static
 void
-nsGlobalWindowInner::NotifyDOMWindowThawed(nsGlobalWindowInner* aWindow) {
+nsGlobalWindowInner::NotifyDOMWindowThawed(nsGlobalWindowInner* aWindow)
+{
   if (aWindow) {
     nsCOMPtr<nsIObserverService> observerService =
       services::GetObserverService();
     if (observerService) {
       observerService->
         NotifyObservers(ToSupports(aWindow),
                         DOM_WINDOW_THAWED_TOPIC, nullptr);
     }
@@ -3918,29 +3921,29 @@ nsGlobalWindowInner::GetCachedXBLPrototy
   if (mCachedXBLPrototypeHandlers) {
     mCachedXBLPrototypeHandlers->Get(aKey, handler.address());
   }
   return handler;
 }
 
 void
 nsGlobalWindowInner::CacheXBLPrototypeHandler(nsXBLPrototypeHandler* aKey,
-                                         JS::Handle<JSObject*> aHandler)
+                                              JS::Handle<JSObject*> aHandler)
 {
   if (!mCachedXBLPrototypeHandlers) {
     mCachedXBLPrototypeHandlers = MakeUnique<XBLPrototypeHandlerTable>();
     PreserveWrapper(ToSupports(this));
   }
 
   mCachedXBLPrototypeHandlers->Put(aKey, aHandler);
 }
 
 Element*
 nsGlobalWindowInner::GetFrameElement(nsIPrincipal& aSubjectPrincipal,
-                                ErrorResult& aError)
+                                     ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(GetFrameElementOuter, (aSubjectPrincipal), aError,
                             nullptr);
 }
 
 Element*
 nsGlobalWindowInner::GetRealFrameElement(ErrorResult& aError)
 {
@@ -3958,18 +3961,18 @@ nsGlobalWindowInner::GetFrameElement()
   nsCOMPtr<nsIDOMElement> frameElement =
     do_QueryInterface(GetRealFrameElement(dummy));
   dummy.SuppressException();
   return frameElement.forget();
 }
 
 /* static */ bool
 nsGlobalWindowInner::TokenizeDialogOptions(nsAString& aToken,
-                                      nsAString::const_iterator& aIter,
-                                      nsAString::const_iterator aEnd)
+                                           nsAString::const_iterator& aIter,
+                                           nsAString::const_iterator aEnd)
 {
   while (aIter != aEnd && nsCRT::IsAsciiSpace(*aIter)) {
     ++aIter;
   }
 
   if (aIter == aEnd) {
     return false;
   }
@@ -3996,17 +3999,17 @@ nsGlobalWindowInner::TokenizeDialogOptio
 
 // Helper for converting window.showModalDialog() options (list of ';'
 // separated name (:|=) value pairs) to a format that's parsable by
 // our normal window opening code.
 
 /* static */
 void
 nsGlobalWindowInner::ConvertDialogOptions(const nsAString& aOptions,
-                                     nsAString& aResult)
+                                          nsAString& aResult)
 {
   nsAString::const_iterator end;
   aOptions.EndReading(end);
 
   nsAString::const_iterator iter;
   aOptions.BeginReading(iter);
 
   nsAutoString token;
@@ -4082,17 +4085,19 @@ nsGlobalWindowInner::ConvertDialogOption
         !TokenizeDialogOptions(token, iter, end) ||
         !token.EqualsLiteral(";")) {
       break;
     }
   }
 }
 
 nsresult
-nsGlobalWindowInner::UpdateCommands(const nsAString& anAction, nsISelection* aSel, int16_t aReason)
+nsGlobalWindowInner::UpdateCommands(const nsAString& anAction,
+                                    nsISelection* aSel,
+                                    int16_t aReason)
 {
   // If this is a child process, redirect to the parent process.
   if (nsIDocShell* docShell = GetDocShell()) {
     if (nsCOMPtr<nsITabChild> child = docShell->GetTabChild()) {
       nsCOMPtr<nsPIWindowRoot> root = GetTopWindowRoot();
       if (root) {
         nsContentUtils::AddScriptRunner(
           new ChildCommandDispatcher(root, child, anAction));
@@ -4132,44 +4137,44 @@ nsGlobalWindowInner::GetSelection(ErrorR
 already_AddRefed<nsISelection>
 nsGlobalWindowInner::GetSelection()
 {
   MOZ_CRASH("Virtual outer window only function");
 }
 
 bool
 nsGlobalWindowInner::Find(const nsAString& aString, bool aCaseSensitive,
-                     bool aBackwards, bool aWrapAround, bool aWholeWord,
-                     bool aSearchInFrames, bool aShowDialog,
-                     ErrorResult& aError)
+                          bool aBackwards, bool aWrapAround, bool aWholeWord,
+                          bool aSearchInFrames, bool aShowDialog,
+                          ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(FindOuter,
                             (aString, aCaseSensitive, aBackwards, aWrapAround,
                              aWholeWord, aSearchInFrames, aShowDialog, aError),
                             aError, false);
 }
 
 void
 nsGlobalWindowInner::GetOrigin(nsAString& aOrigin)
 {
   MOZ_DIAGNOSTIC_ASSERT(IsInnerWindow());
   nsContentUtils::GetUTFOrigin(GetPrincipal(), aOrigin);
 }
 
 void
 nsGlobalWindowInner::Atob(const nsAString& aAsciiBase64String,
-                     nsAString& aBinaryData, ErrorResult& aError)
+                          nsAString& aBinaryData, ErrorResult& aError)
 {
   MOZ_ASSERT(IsInnerWindow());
   aError = nsContentUtils::Atob(aAsciiBase64String, aBinaryData);
 }
 
 void
 nsGlobalWindowInner::Btoa(const nsAString& aBinaryData,
-                     nsAString& aAsciiBase64String, ErrorResult& aError)
+                          nsAString& aAsciiBase64String, ErrorResult& aError)
 {
   MOZ_ASSERT(IsInnerWindow());
   aError = nsContentUtils::Btoa(aBinaryData, aAsciiBase64String);
 }
 
 //*****************************************************************************
 // nsGlobalWindowInner::nsIDOMEventTarget
 //*****************************************************************************
@@ -4177,18 +4182,18 @@ nsGlobalWindowInner::Btoa(const nsAStrin
 nsPIDOMWindowOuter*
 nsGlobalWindowInner::GetOwnerGlobalForBindings()
 {
   return nsPIDOMWindowOuter::GetFromCurrentInner(this);
 }
 
 NS_IMETHODIMP
 nsGlobalWindowInner::RemoveEventListener(const nsAString& aType,
-                                    nsIDOMEventListener* aListener,
-                                    bool aUseCapture)
+                                         nsIDOMEventListener* aListener,
+                                         bool aUseCapture)
 {
   if (RefPtr<EventListenerManager> elm = GetExistingListenerManager()) {
     elm->RemoveEventListener(aType, aListener, aUseCapture);
   }
   return NS_OK;
 }
 
 NS_IMPL_REMOVE_SYSTEM_EVENT_LISTENER(nsGlobalWindowInner)
@@ -4219,19 +4224,19 @@ nsGlobalWindowInner::DispatchEvent(nsIDO
                                                   aEvent, presContext, &status);
 
   *aRetVal = (status != nsEventStatus_eConsumeNoDefault);
   return rv;
 }
 
 NS_IMETHODIMP
 nsGlobalWindowInner::AddEventListener(const nsAString& aType,
-                                 nsIDOMEventListener *aListener,
-                                 bool aUseCapture, bool aWantsUntrusted,
-                                 uint8_t aOptionalArgc)
+                                      nsIDOMEventListener *aListener,
+                                      bool aUseCapture, bool aWantsUntrusted,
+                                      uint8_t aOptionalArgc)
 {
   NS_ASSERTION(!aWantsUntrusted || aOptionalArgc > 1,
                "Won't check if this is chrome, you want to set "
                "aWantsUntrusted to false or make the aWantsUntrusted "
                "explicit by making optional_argc non-zero.");
 
   if (!aWantsUntrusted &&
       (aOptionalArgc < 2 && !nsContentUtils::IsChromeDoc(mDoc))) {
@@ -4241,20 +4246,20 @@ nsGlobalWindowInner::AddEventListener(co
   EventListenerManager* manager = GetOrCreateListenerManager();
   NS_ENSURE_STATE(manager);
   manager->AddEventListener(aType, aListener, aUseCapture, aWantsUntrusted);
   return NS_OK;
 }
 
 void
 nsGlobalWindowInner::AddEventListener(const nsAString& aType,
-                                 EventListener* aListener,
-                                 const AddEventListenerOptionsOrBoolean& aOptions,
-                                 const Nullable<bool>& aWantsUntrusted,
-                                 ErrorResult& aRv)
+                                      EventListener* aListener,
+                                      const AddEventListenerOptionsOrBoolean& aOptions,
+                                      const Nullable<bool>& aWantsUntrusted,
+                                      ErrorResult& aRv)
 {
   bool wantsUntrusted;
   if (aWantsUntrusted.IsNull()) {
     wantsUntrusted = !nsContentUtils::IsChromeDoc(mDoc);
   } else {
     wantsUntrusted = aWantsUntrusted.Value();
   }
 
@@ -4264,20 +4269,20 @@ nsGlobalWindowInner::AddEventListener(co
     return;
   }
 
   manager->AddEventListener(aType, aListener, aOptions, wantsUntrusted);
 }
 
 NS_IMETHODIMP
 nsGlobalWindowInner::AddSystemEventListener(const nsAString& aType,
-                                       nsIDOMEventListener *aListener,
-                                       bool aUseCapture,
-                                       bool aWantsUntrusted,
-                                       uint8_t aOptionalArgc)
+                                            nsIDOMEventListener *aListener,
+                                            bool aUseCapture,
+                                            bool aWantsUntrusted,
+                                            uint8_t aOptionalArgc)
 {
   NS_ASSERTION(!aWantsUntrusted || aOptionalArgc > 1,
                "Won't check if this is chrome, you want to set "
                "aWantsUntrusted to false or make the aWantsUntrusted "
                "explicit by making optional_argc non-zero.");
 
   if (!aWantsUntrusted &&
       (aOptionalArgc < 2 && !nsContentUtils::IsChromeDoc(mDoc))) {
@@ -4454,18 +4459,18 @@ nsGlobalWindowInner::ResetVRTelemetry(bo
 void
 nsGlobalWindowInner::SetChromeEventHandler(EventTarget* aChromeEventHandler)
 {
   MOZ_CRASH("Virtual outer window only function");
 }
 
 void
 nsGlobalWindowInner::SetFocusedNode(nsIContent* aNode,
-                               uint32_t aFocusMethod,
-                               bool aNeedsFocus)
+                                    uint32_t aFocusMethod,
+                                    bool aNeedsFocus)
 {
   if (aNode && aNode->GetComposedDoc() != mDoc) {
     NS_WARNING("Trying to set focus to a node from a wrong document");
     return;
   }
 
   if (mCleanedUp) {
     NS_ASSERTION(!aNode, "Trying to focus cleaned up window!");
@@ -4516,17 +4521,17 @@ nsGlobalWindowInner::ShouldShowFocusRing
   }
 
   nsCOMPtr<nsPIWindowRoot> root = GetTopWindowRoot();
   return root ? root->ShowFocusRings() : false;
 }
 
 void
 nsGlobalWindowInner::SetKeyboardIndicators(UIStateChangeType aShowAccelerators,
-                                      UIStateChangeType aShowFocusRings)
+                                           UIStateChangeType aShowFocusRings)
 {
   MOZ_CRASH("Virtual outer window only function");
 }
 
 bool
 nsGlobalWindowInner::TakeFocus(bool aFocus, uint32_t aFocusMethod)
 {
   if (mCleanedUp) {
@@ -4637,17 +4642,17 @@ nsGlobalWindowInner::DispatchAsyncHashch
 
   nsCOMPtr<nsIRunnable> callback =
     new HashchangeCallback(oldWideSpec, newWideSpec, this);
   return Dispatch(TaskCategory::Other, callback.forget());
 }
 
 nsresult
 nsGlobalWindowInner::FireHashchange(const nsAString &aOldURL,
-                               const nsAString &aNewURL)
+                                    const nsAString &aNewURL)
 {
   MOZ_ASSERT(IsInnerWindow());
 
   // Don't do anything if the window is frozen.
   if (IsFrozen()) {
     return NS_OK;
   }
 
@@ -4726,17 +4731,18 @@ nsGlobalWindowInner::DispatchSyncPopStat
   event->SetTarget(this);
 
   bool dummy; // default action
   return DispatchEvent(event, &dummy);
 }
 
 // Find an nsICanvasFrame under aFrame.  Only search the principal
 // child lists.  aFrame must be non-null.
-static nsCanvasFrame* FindCanvasFrame(nsIFrame* aFrame)
+static nsCanvasFrame*
+FindCanvasFrame(nsIFrame* aFrame)
 {
     nsCanvasFrame* canvasFrame = do_QueryFrame(aFrame);
     if (canvasFrame) {
         return canvasFrame;
     }
 
     for (nsIFrame* kid : aFrame->PrincipalChildList()) {
         canvasFrame = FindCanvasFrame(kid);
@@ -4791,36 +4797,36 @@ nsGlobalWindowInner::UpdateCanvasFocus(b
               canvasFrame->SetHasFocus(false);
           }
       }
   }
 }
 
 already_AddRefed<nsICSSDeclaration>
 nsGlobalWindowInner::GetComputedStyle(Element& aElt, const nsAString& aPseudoElt,
-                                 ErrorResult& aError)
+                                      ErrorResult& aError)
 {
   MOZ_ASSERT(IsInnerWindow());
   return GetComputedStyleHelper(aElt, aPseudoElt, false, aError);
 }
 
 already_AddRefed<nsICSSDeclaration>
 nsGlobalWindowInner::GetDefaultComputedStyle(Element& aElt,
-                                        const nsAString& aPseudoElt,
-                                        ErrorResult& aError)
+                                             const nsAString& aPseudoElt,
+                                             ErrorResult& aError)
 {
   MOZ_ASSERT(IsInnerWindow());
   return GetComputedStyleHelper(aElt, aPseudoElt, true, aError);
 }
 
 nsresult
 nsGlobalWindowInner::GetComputedStyleHelper(nsIDOMElement* aElt,
-                                       const nsAString& aPseudoElt,
-                                       bool aDefaultStylesOnly,
-                                       nsIDOMCSSStyleDeclaration** aReturn)
+                                            const nsAString& aPseudoElt,
+                                            bool aDefaultStylesOnly,
+                                            nsIDOMCSSStyleDeclaration** aReturn)
 {
   MOZ_ASSERT(IsInnerWindow());
 
   NS_ENSURE_ARG_POINTER(aReturn);
   *aReturn = nullptr;
 
   nsCOMPtr<dom::Element> element = do_QueryInterface(aElt);
   if (!element) {
@@ -4832,19 +4838,19 @@ nsGlobalWindowInner::GetComputedStyleHel
     GetComputedStyleHelper(*element, aPseudoElt, aDefaultStylesOnly, rv);
   declaration.forget(aReturn);
 
   return rv.StealNSResult();
 }
 
 already_AddRefed<nsICSSDeclaration>
 nsGlobalWindowInner::GetComputedStyleHelper(Element& aElt,
-                                       const nsAString& aPseudoElt,
-                                       bool aDefaultStylesOnly,
-                                       ErrorResult& aError)
+                                            const nsAString& aPseudoElt,
+                                            bool aDefaultStylesOnly,
+                                            ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(GetComputedStyleHelperOuter,
                             (aElt, aPseudoElt, aDefaultStylesOnly),
                             aError, nullptr);
 }
 
 Storage*
 nsGlobalWindowInner::GetSessionStorage(ErrorResult& aError)
@@ -5059,18 +5065,18 @@ nsGlobalWindowInner::GetInterface(const 
     return QueryInterface(aIID, aSink);
   }
 
   return *aSink ? NS_OK : NS_ERROR_NO_INTERFACE;
 }
 
 void
 nsGlobalWindowInner::GetInterface(JSContext* aCx, nsIJSID* aIID,
-                             JS::MutableHandle<JS::Value> aRetval,
-                             ErrorResult& aError)
+                                  JS::MutableHandle<JS::Value> aRetval,
+                                  ErrorResult& aError)
 {
   MOZ_ASSERT(IsInnerWindow());
   dom::GetInterface(aCx, this, aIID, aRetval, aError);
 }
 
 already_AddRefed<CacheStorage>
 nsGlobalWindowInner::GetCaches(ErrorResult& aRv)
 {
@@ -5181,17 +5187,17 @@ private:
   RefPtr<nsGlobalWindowInner> mIdleWindow;
 
   // If false then call on active
   bool mCallOnidle;
 };
 
 void
 nsGlobalWindowInner::NotifyIdleObserver(IdleObserverHolder* aIdleObserverHolder,
-                                   bool aCallOnidle)
+                                        bool aCallOnidle)
 {
   MOZ_ASSERT(IsInnerWindow());
   MOZ_ASSERT(aIdleObserverHolder);
   aIdleObserverHolder->mPrevNotificationIdle = aCallOnidle;
 
   nsCOMPtr<nsIRunnable> caller =
     new NotifyIdleObserverRunnable(aIdleObserverHolder->mIdleObserver,
                                    aIdleObserverHolder->mTimeInS,
@@ -5681,17 +5687,17 @@ nsGlobalWindowInner::RegisterIdleObserve
     rv = ScheduleNextIdleObserverCallback();
     NS_ENSURE_SUCCESS(rv, rv);
   }
   return NS_OK;
 }
 
 nsresult
 nsGlobalWindowInner::FindIndexOfElementToRemove(nsIIdleObserver* aIdleObserver,
-                                           int32_t* aRemoveElementIndex)
+                                                int32_t* aRemoveElementIndex)
 {
   MOZ_ASSERT(IsInnerWindow(), "Must be an inner window!");
   MOZ_ASSERT(aIdleObserver, "Idle observer not instantiated.");
 
   *aRemoveElementIndex = 0;
   if (mIdleObservers.IsEmpty()) {
     return NS_ERROR_FAILURE;
   }
@@ -5767,17 +5773,17 @@ nsGlobalWindowInner::UnregisterIdleObser
   rv = ScheduleNextIdleObserverCallback();
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
 nsresult
 nsGlobalWindowInner::Observe(nsISupports* aSubject, const char* aTopic,
-                        const char16_t* aData)
+                             const char16_t* aData)
 {
   if (!nsCRT::strcmp(aTopic, NS_IOSERVICE_OFFLINE_STATUS_TOPIC)) {
     if (!IsFrozen()) {
         // Fires an offline status event if the offline status has changed
         FireOfflineStatusEventIfChanged();
     }
     return NS_OK;
   }
@@ -5858,18 +5864,18 @@ nsGlobalWindowInner::Observe(nsISupports
   }
 
   NS_WARNING("unrecognized topic in nsGlobalWindowInner::Observe");
   return NS_ERROR_FAILURE;
 }
 
 void
 nsGlobalWindowInner::ObserveStorageNotification(StorageEvent* aEvent,
-                                           const char16_t* aStorageType,
-                                           bool aPrivateBrowsing)
+                                                const char16_t* aStorageType,
+                                                bool aPrivateBrowsing)
 {
   MOZ_ASSERT(aEvent);
 
   // The private browsing check must be done here again because this window
   // could have changed its state before the notification check and now. This
   // happens in case this window did have a docShell at that time.
   if (aPrivateBrowsing != IsPrivateBrowsing()) {
     return;
@@ -5953,18 +5959,18 @@ nsGlobalWindowInner::ObserveStorageNotif
   }
 
   bool defaultActionEnabled;
   DispatchEvent(clonedEvent, &defaultActionEnabled);
 }
 
 already_AddRefed<StorageEvent>
 nsGlobalWindowInner::CloneStorageEvent(const nsAString& aType,
-                                  const RefPtr<StorageEvent>& aEvent,
-                                  ErrorResult& aRv)
+                                       const RefPtr<StorageEvent>& aEvent,
+                                       ErrorResult& aRv)
 {
   MOZ_ASSERT(IsInnerWindow());
 
   StorageEventInit dict;
 
   dict.mBubbles = aEvent->Bubbles();
   dict.mCancelable = aEvent->Cancelable();
   aEvent->GetKey(dict.mKey);
@@ -6347,61 +6353,61 @@ nsGlobalWindowInner::InnerForSetTimeoutO
   // If forwardTo is not the window with an active document then we want the
   // call to setTimeout/Interval to be a noop, so return null but don't set an
   // error.
   return HasActiveDocument() ? currentInner : nullptr;
 }
 
 int32_t
 nsGlobalWindowInner::SetTimeout(JSContext* aCx, Function& aFunction,
-                           int32_t aTimeout,
-                           const Sequence<JS::Value>& aArguments,
-                           ErrorResult& aError)
+                                int32_t aTimeout,
+                                const Sequence<JS::Value>& aArguments,
+                                ErrorResult& aError)
 {
   return SetTimeoutOrInterval(aCx, aFunction, aTimeout, aArguments, false,
                               aError);
 }
 
 int32_t
 nsGlobalWindowInner::SetTimeout(JSContext* aCx, const nsAString& aHandler,
-                           int32_t aTimeout,
-                           const Sequence<JS::Value>& /* unused */,
-                           ErrorResult& aError)
+                                int32_t aTimeout,
+                                const Sequence<JS::Value>& /* unused */,
+                                ErrorResult& aError)
 {
   return SetTimeoutOrInterval(aCx, aHandler, aTimeout, false, aError);
 }
 
 int32_t
 nsGlobalWindowInner::SetInterval(JSContext* aCx, Function& aFunction,
-                            const Optional<int32_t>& aTimeout,
-                            const Sequence<JS::Value>& aArguments,
-                            ErrorResult& aError)
+                                 const Optional<int32_t>& aTimeout,
+                                 const Sequence<JS::Value>& aArguments,
+                                 ErrorResult& aError)
 {
   int32_t timeout;
   bool isInterval = IsInterval(aTimeout, timeout);
   return SetTimeoutOrInterval(aCx, aFunction, timeout, aArguments, isInterval,
                               aError);
 }
 
 int32_t
 nsGlobalWindowInner::SetInterval(JSContext* aCx, const nsAString& aHandler,
-                            const Optional<int32_t>& aTimeout,
-                            const Sequence<JS::Value>& /* unused */,
-                            ErrorResult& aError)
+                                 const Optional<int32_t>& aTimeout,
+                                 const Sequence<JS::Value>& /* unused */,
+                                 ErrorResult& aError)
 {
   int32_t timeout;
   bool isInterval = IsInterval(aTimeout, timeout);
   return SetTimeoutOrInterval(aCx, aHandler, timeout, isInterval, aError);
 }
 
 int32_t
 nsGlobalWindowInner::SetTimeoutOrInterval(JSContext *aCx, Function& aFunction,
-                                     int32_t aTimeout,
-                                     const Sequence<JS::Value>& aArguments,
-                                     bool aIsInterval, ErrorResult& aError)
+                                          int32_t aTimeout,
+                                          const Sequence<JS::Value>& aArguments,
+                                          bool aIsInterval, ErrorResult& aError)
 {
   nsGlobalWindowInner* inner = InnerForSetTimeoutOrInterval(aError);
   if (!inner) {
     return -1;
   }
 
   if (inner != this) {
     return inner->SetTimeoutOrInterval(aCx, aFunction, aTimeout, aArguments,
@@ -6418,18 +6424,18 @@ nsGlobalWindowInner::SetTimeoutOrInterva
   aError = mTimeoutManager->SetTimeout(handler, aTimeout, aIsInterval,
                                       Timeout::Reason::eTimeoutOrInterval,
                                       &result);
   return result;
 }
 
 int32_t
 nsGlobalWindowInner::SetTimeoutOrInterval(JSContext* aCx, const nsAString& aHandler,
-                                     int32_t aTimeout, bool aIsInterval,
-                                     ErrorResult& aError)
+                                          int32_t aTimeout, bool aIsInterval,
+                                          ErrorResult& aError)
 {
   nsGlobalWindowInner* inner = InnerForSetTimeoutOrInterval(aError);
   if (!inner) {
     return -1;
   }
 
   if (inner != this) {
     return inner->SetTimeoutOrInterval(aCx, aHandler, aTimeout, aIsInterval,
@@ -6446,17 +6452,17 @@ nsGlobalWindowInner::SetTimeoutOrInterva
   aError = mTimeoutManager->SetTimeout(handler, aTimeout, aIsInterval,
                                       Timeout::Reason::eTimeoutOrInterval,
                                       &result);
   return result;
 }
 
 bool
 nsGlobalWindowInner::RunTimeoutHandler(Timeout* aTimeout,
-                                  nsIScriptContext* aScx)
+                                       nsIScriptContext* aScx)
 {
   MOZ_ASSERT(IsInnerWindow());
 
   // Hold on to the timeout in case mExpr or mFunObj releases its
   // doc.
   RefPtr<Timeout> timeout = aTimeout;
   Timeout* last_running_timeout = mTimeoutManager->BeginRunningTimeout(timeout);
   timeout->mRunning = true;
@@ -6975,17 +6981,17 @@ nsGlobalWindowInner::NotifyActiveVRDispl
 
   if (mNavigator) {
     mNavigator->NotifyActiveVRDisplaysChanged();
   }
 }
 
 void
 nsGlobalWindowInner::DispatchVRDisplayActivate(uint32_t aDisplayID,
-                                          mozilla::dom::VRDisplayEventReason aReason)
+                                               mozilla::dom::VRDisplayEventReason aReason)
 {
   // Search for the display identified with aDisplayID and fire the
   // event if found.
   for (const auto& display : mVRDisplays) {
     if (display->DisplayId() == aDisplayID) {
       if (aReason != VRDisplayEventReason::Navigation &&
           display->IsAnyPresenting(gfx::kVRGroupContent)) {
         // We only want to trigger this event if nobody is presenting to the
@@ -7019,17 +7025,17 @@ nsGlobalWindowInner::DispatchVRDisplayAc
       // listener can do anything, including closing windows.
       return;
     }
   }
 }
 
 void
 nsGlobalWindowInner::DispatchVRDisplayDeactivate(uint32_t aDisplayID,
-                                            mozilla::dom::VRDisplayEventReason aReason)
+                                                 mozilla::dom::VRDisplayEventReason aReason)
 {
   // Search for the display identified with aDisplayID and fire the
   // event if found.
   for (const auto& display : mVRDisplays) {
     if (display->DisplayId() == aDisplayID && display->IsPresenting()) {
       // We only want to trigger this event to content that is presenting to
       // the display already.
 
@@ -7218,30 +7224,30 @@ void
 nsGlobalWindowInner::GetAttention(ErrorResult& aResult)
 {
   MOZ_ASSERT(IsInnerWindow());
   return GetAttentionWithCycleCount(-1, aResult);
 }
 
 void
 nsGlobalWindowInner::GetAttentionWithCycleCount(int32_t aCycleCount,
-                                           ErrorResult& aError)
+                                                ErrorResult& aError)
 {
   MOZ_ASSERT(IsInnerWindow());
 
   nsCOMPtr<nsIWidget> widget = GetMainWidget();
 
   if (widget) {
     aError = widget->GetAttention(aCycleCount);
   }
 }
 
 void
 nsGlobalWindowInner::BeginWindowMove(Event& aMouseDownEvent, Element* aPanel,
-                                ErrorResult& aError)
+                                     ErrorResult& aError)
 {
   MOZ_ASSERT(IsInnerWindow());
 
   nsCOMPtr<nsIWidget> widget;
 
   // if a panel was supplied, use its widget instead.
 #ifdef MOZ_XUL
   if (aPanel) {
@@ -7305,17 +7311,17 @@ void
 nsGlobalWindowInner::SetBrowserDOMWindow(nsIBrowserDOMWindow* aBrowserWindow,
                                     ErrorResult& aError)
 {
   FORWARD_TO_OUTER_OR_THROW(SetBrowserDOMWindowOuter, (aBrowserWindow), aError, );
 }
 
 void
 nsGlobalWindowInner::NotifyDefaultButtonLoaded(Element& aDefaultButton,
-                                          ErrorResult& aError)
+                                               ErrorResult& aError)
 {
   MOZ_ASSERT(IsInnerWindow());
 #ifdef MOZ_XUL
   // Don't snap to a disabled button.
   nsCOMPtr<nsIDOMXULControlElement> xulControl =
                                       do_QueryInterface(&aDefaultButton);
   if (!xulControl) {
     aError.Throw(NS_ERROR_FAILURE);
@@ -7378,27 +7384,27 @@ nsGlobalWindowInner::GetMessageManager(E
                                 static_cast<nsFrameMessageManager*>(globalMM.get()),
                                 MM_CHROME | MM_BROADCASTER);
   }
   return mChromeFields.mMessageManager;
 }
 
 NS_IMETHODIMP
 nsGlobalWindowInner::GetGroupMessageManager(const nsAString& aGroup,
-                                       nsIMessageBroadcaster** aManager)
+                                            nsIMessageBroadcaster** aManager)
 {
   MOZ_RELEASE_ASSERT(IsChromeWindow());
   ErrorResult rv;
   NS_IF_ADDREF(*aManager = GetGroupMessageManager(aGroup, rv));
   return rv.StealNSResult();
 }
 
 nsIMessageBroadcaster*
 nsGlobalWindowInner::GetGroupMessageManager(const nsAString& aGroup,
-                                       ErrorResult& aError)
+                                            ErrorResult& aError)
 {
   MOZ_ASSERT(IsChromeWindow());
   MOZ_RELEASE_ASSERT(IsInnerWindow());
 
   nsCOMPtr<nsIMessageBroadcaster> messageManager =
     mChromeFields.mGroupMessageManagers.LookupForAdd(aGroup).OrInsert(
       [this, &aError] () {
         nsFrameMessageManager* parent =
@@ -7490,17 +7496,17 @@ nsGlobalWindowInner::GetExternal(ErrorRe
 #else
   aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
   return nullptr;
 #endif
 }
 
 void
 nsGlobalWindowInner::GetSidebar(OwningExternalOrWindowProxy& aResult,
-                           ErrorResult& aRv)
+                                ErrorResult& aRv)
 {
   MOZ_RELEASE_ASSERT(IsInnerWindow());
 
 #ifdef HAVE_SIDEBAR
   // First check for a named frame named "sidebar"
   nsCOMPtr<nsPIDOMWindowOuter> domWindow = GetChildWindow(NS_LITERAL_STRING("sidebar"));
   if (domWindow) {
     aResult.SetAsWindowProxy() = domWindow.forget();
@@ -7526,68 +7532,68 @@ nsGlobalWindowInner::ClearDocumentDepend
       !WindowBinding::ClearCachedPerformanceValue(aCx, this)) {
     MOZ_CRASH("Unhandlable OOM while clearing document dependent slots.");
   }
 }
 
 /* static */
 JSObject*
 nsGlobalWindowInner::CreateNamedPropertiesObject(JSContext *aCx,
-                                            JS::Handle<JSObject*> aProto)
+                                                 JS::Handle<JSObject*> aProto)
 {
   return WindowNamedPropertiesHandler::Create(aCx, aProto);
 }
 
 bool
 nsGlobalWindowInner::GetIsPrerendered()
 {
   nsIDocShell* docShell = GetDocShell();
   return docShell && docShell->GetIsPrerendered();
 }
 
 void
 nsGlobalWindowInner::RedefineProperty(JSContext* aCx, const char* aPropName,
-                                 JS::Handle<JS::Value> aValue,
-                                 ErrorResult& aError)
+                                      JS::Handle<JS::Value> aValue,
+                                      ErrorResult& aError)
 {
   JS::Rooted<JSObject*> thisObj(aCx, GetWrapperPreserveColor());
   if (!thisObj) {
     aError.Throw(NS_ERROR_UNEXPECTED);
     return;
   }
 
   if (!JS_WrapObject(aCx, &thisObj) ||
       !JS_DefineProperty(aCx, thisObj, aPropName, aValue, JSPROP_ENUMERATE)) {
     aError.Throw(NS_ERROR_FAILURE);
   }
 }
 
 void
 nsGlobalWindowInner::GetReplaceableWindowCoord(JSContext* aCx,
-                                          nsGlobalWindowInner::WindowCoordGetter aGetter,
-                                          JS::MutableHandle<JS::Value> aRetval,
-                                          CallerType aCallerType,
-                                          ErrorResult& aError)
+                                               nsGlobalWindowInner::WindowCoordGetter aGetter,
+                                               JS::MutableHandle<JS::Value> aRetval,
+                                               CallerType aCallerType,
+                                               ErrorResult& aError)
 {
   MOZ_ASSERT(IsInnerWindow());
 
   int32_t coord = (this->*aGetter)(aCallerType, aError);
   if (!aError.Failed() &&
       !ToJSValue(aCx, coord, aRetval)) {
     aError.Throw(NS_ERROR_FAILURE);
   }
 }
 
 void
 nsGlobalWindowInner::SetReplaceableWindowCoord(JSContext* aCx,
-                                          nsGlobalWindowInner::WindowCoordSetter aSetter,
-                                          JS::Handle<JS::Value> aValue,
-                                          const char* aPropName,
-                                          CallerType aCallerType,
-                                          ErrorResult& aError)
+                                               nsGlobalWindowInner::WindowCoordSetter aSetter,
+                                               JS::Handle<JS::Value> aValue,
+                                               const char* aPropName,
+                                               CallerType aCallerType,
+                                               ErrorResult& aError)
 {
   MOZ_ASSERT(IsInnerWindow());
 
   /*
    * If caller is not chrome and the user has not explicitly exempted the site,
    * just treat this the way we would an IDL replaceable property.
    */
   nsGlobalWindowOuter* outer = GetOuterWindowInternal();
@@ -7715,48 +7721,48 @@ nsGlobalWindowInner::FireOnNewGlobalObje
 }
 
 #ifdef _WINDOWS_
 #error "Never include windows.h in this file!"
 #endif
 
 already_AddRefed<Promise>
 nsGlobalWindowInner::CreateImageBitmap(JSContext* aCx,
-                                  const ImageBitmapSource& aImage,
-                                  ErrorResult& aRv)
+                                       const ImageBitmapSource& aImage,
+                                       ErrorResult& aRv)
 {
   if (aImage.IsArrayBuffer() || aImage.IsArrayBufferView()) {
     aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     return nullptr;
   }
 
   return ImageBitmap::Create(this, aImage, Nothing(), aRv);
 }
 
 already_AddRefed<Promise>
 nsGlobalWindowInner::CreateImageBitmap(JSContext* aCx,
-                                  const ImageBitmapSource& aImage,
-                                  int32_t aSx, int32_t aSy, int32_t aSw, int32_t aSh,
-                                  ErrorResult& aRv)
+                                       const ImageBitmapSource& aImage,
+                                       int32_t aSx, int32_t aSy, int32_t aSw, int32_t aSh,
+                                       ErrorResult& aRv)
 {
   if (aImage.IsArrayBuffer() || aImage.IsArrayBufferView()) {
     aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     return nullptr;
   }
 
   return ImageBitmap::Create(this, aImage, Some(gfx::IntRect(aSx, aSy, aSw, aSh)), aRv);
 }
 
 already_AddRefed<mozilla::dom::Promise>
 nsGlobalWindowInner::CreateImageBitmap(JSContext* aCx,
-                                  const ImageBitmapSource& aImage,
-                                  int32_t aOffset, int32_t aLength,
-                                  ImageBitmapFormat aFormat,
-                                  const Sequence<ChannelPixelLayout>& aLayout,
-                                  ErrorResult& aRv)
+                                       const ImageBitmapSource& aImage,
+                                       int32_t aOffset, int32_t aLength,
+                                       ImageBitmapFormat aFormat,
+                                       const Sequence<ChannelPixelLayout>& aLayout,
+                                       ErrorResult& aRv)
 {
   if (!ImageBitmap::ExtensionsEnabled(aCx)) {
     aRv.Throw(NS_ERROR_TYPE_ERR);
     return nullptr;
   }
   if (aImage.IsArrayBuffer() || aImage.IsArrayBufferView()) {
     return ImageBitmap::Create(this, aImage, aOffset, aLength, aFormat, aLayout,
                                aRv);
@@ -7809,17 +7815,17 @@ nsGlobalWindowInner::TabGroupInner()
   MOZ_ASSERT_IF(outer, outer->TabGroup() == mTabGroup);
 #endif
 
   return mTabGroup;
 }
 
 nsresult
 nsGlobalWindowInner::Dispatch(TaskCategory aCategory,
-                         already_AddRefed<nsIRunnable>&& aRunnable)
+                              already_AddRefed<nsIRunnable>&& aRunnable)
 {
   MOZ_RELEASE_ASSERT(NS_IsMainThread());
   if (GetDocGroup()) {
     return GetDocGroup()->Dispatch(aCategory, Move(aRunnable));
   }
   return DispatcherTrait::Dispatch(aCategory, Move(aRunnable));
 }
 
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -90,18 +90,18 @@ nsGlobalWindowOuter::RemoveIdleCallback(
   }
 
   aRequest->removeFrom(mIdleRequestCallbacks);
   aRequest->Release();
 }
 
 nsresult
 nsGlobalWindowOuter::RunIdleRequest(IdleRequest* aRequest,
-                               DOMHighResTimeStamp aDeadline,
-                               bool aDidTimeout)
+                                    DOMHighResTimeStamp aDeadline,
+                                    bool aDidTimeout)
 {
   AssertIsOnMainThread();
   RefPtr<IdleRequest> request(aRequest);
   RemoveIdleCallback(request);
   return request->IdleRun(AsInner(), aDeadline, aDidTimeout);
 }
 
 bool
@@ -1456,17 +1456,17 @@ nsGlobalWindowOuter::SetInitialPrincipal
     // layout happening.
     nsRect r = shell->GetPresContext()->GetVisibleArea();
     shell->Initialize(r.Width(), r.Height());
   }
 }
 
 PopupControlState
 nsGlobalWindowOuter::PushPopupControlState(PopupControlState aState,
-                                      bool aForce) const
+                                           bool aForce) const
 {
   return ::PushPopupControlState(aState, aForce);
 }
 
 void
 nsGlobalWindowOuter::PopPopupControlState(PopupControlState aState) const
 {
   ::PopPopupControlState(aState);
@@ -1617,18 +1617,18 @@ nsGlobalWindowOuter::ComputeIsSecureCont
     }
   }
 
   return false;
 }
 
 nsresult
 nsGlobalWindowOuter::SetNewDocument(nsIDocument* aDocument,
-                               nsISupports* aState,
-                               bool aForceReuseInnerWindow)
+                                    nsISupports* aState,
+                                    bool aForceReuseInnerWindow)
 {
   NS_PRECONDITION(mDocumentPrincipal == nullptr,
                   "mDocumentPrincipal prematurely set!");
   MOZ_ASSERT(aDocument);
 
   NS_PRECONDITION(IsOuterWindow(), "Must only be called on outer windows");
 
   // Bail out early if we're in process of closing down the window.
@@ -2212,17 +2212,17 @@ nsGlobalWindowOuter::DetachFromDocShell(
   }
 
   MaybeForgiveSpamCount();
   CleanUp();
 }
 
 void
 nsGlobalWindowOuter::SetOpenerWindow(nsPIDOMWindowOuter* aOpener,
-                                bool aOriginalOpener)
+                                     bool aOriginalOpener)
 {
   nsWeakPtr opener = do_GetWeakReference(aOpener);
   if (opener == mOpener) {
     return;
   }
 
   NS_ASSERTION(!aOriginalOpener || !mSetOpenerWindowCalled,
                "aOriginalOpener is true, but not first call to "
@@ -2836,19 +2836,19 @@ nsGlobalWindowOuter::GetTop()
   MOZ_ASSERT(IsOuterWindow());
   nsCOMPtr<nsPIDOMWindowOuter> window;
   GetTopImpl(this, getter_AddRefs(window), /* aScriptable = */ false);
   return window.forget();
 }
 
 void
 nsGlobalWindowOuter::GetContentOuter(JSContext* aCx,
-                                JS::MutableHandle<JSObject*> aRetval,
-                                CallerType aCallerType,
-                                ErrorResult& aError)
+                                     JS::MutableHandle<JSObject*> aRetval,
+                                     CallerType aCallerType,
+                                     ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   nsCOMPtr<nsPIDOMWindowOuter> content =
     GetContentInternal(aError, aCallerType);
   if (aError.Failed()) {
     return;
   }
@@ -3260,18 +3260,18 @@ nsGlobalWindowOuter::GetInnerWidthOuter(
 nsresult
 nsGlobalWindowOuter::GetInnerWidth(int32_t* aInnerWidth)
 {
   FORWARD_TO_INNER(GetInnerWidth, (aInnerWidth), NS_ERROR_UNEXPECTED);
 }
 
 void
 nsGlobalWindowOuter::SetInnerWidthOuter(int32_t aInnerWidth,
-                                   CallerType aCallerType,
-                                   ErrorResult& aError)
+                                        CallerType aCallerType,
+                                        ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   if (!mDocShell) {
     aError.Throw(NS_ERROR_UNEXPECTED);
     return;
   }
 
@@ -3314,18 +3314,18 @@ nsGlobalWindowOuter::GetInnerHeightOuter
 nsresult
 nsGlobalWindowOuter::GetInnerHeight(int32_t* aInnerHeight)
 {
   FORWARD_TO_INNER(GetInnerHeight, (aInnerHeight), NS_ERROR_UNEXPECTED);
 }
 
 void
 nsGlobalWindowOuter::SetInnerHeightOuter(int32_t aInnerHeight,
-                                    CallerType aCallerType,
-                                    ErrorResult& aError)
+                                         CallerType aCallerType,
+                                         ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   if (!mDocShell) {
     aError.Throw(NS_ERROR_UNEXPECTED);
     return;
   }
 
@@ -3391,17 +3391,17 @@ int32_t
 nsGlobalWindowOuter::GetOuterHeightOuter(CallerType aCallerType, ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
   return GetOuterSize(aCallerType, aError).height;
 }
 
 void
 nsGlobalWindowOuter::SetOuterSize(int32_t aLengthCSSPixels, bool aIsWidth,
-                             CallerType aCallerType, ErrorResult& aError)
+                                  CallerType aCallerType, ErrorResult& aError)
 {
   MOZ_ASSERT(IsOuterWindow());
 
   nsCOMPtr<nsIBaseWindow> treeOwnerAsWin = GetTreeOwnerWindow();
   if (!treeOwnerAsWin) {
     aError.Throw(NS_ERROR_FAILURE);
     return;
   }
@@ -3424,28 +3424,28 @@ nsGlobalWindowOuter::SetOuterSize(int32_
   }
   aError = treeOwnerAsWin->SetSize(width, height, true);
 
   CheckForDPIChange();
 }
 
 void
 nsGlobalWindowOuter::SetOuterWidthOuter(int32_t aOuterWidth,
-                                   CallerType aCallerType,
-                                   ErrorResult& aError)
+                                        CallerType aCallerType,
+                                        ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   SetOuterSize(aOuterWidth, true, aCallerType, aError);
 }
 
 void
 nsGlobalWindowOuter::SetOuterHeightOuter(int32_t aOuterHeight,
-                                    CallerType aCallerType,
-                                    ErrorResult& aError)
+                                         CallerType aCallerType,
+                                         ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   SetOuterSize(aOuterHeight, false, aCallerType, aError);
 }
 
 CSSIntPoint
 nsGlobalWindowOuter::GetScreenXY(CallerType aCallerType, ErrorResult& aError)
@@ -3603,31 +3603,31 @@ nsGlobalWindowOuter::GetMozPaintCountOut
   }
 
   nsCOMPtr<nsIPresShell> presShell = mDocShell->GetPresShell();
   return presShell ? presShell->GetPaintCount() : 0;
 }
 
 already_AddRefed<MediaQueryList>
 nsGlobalWindowOuter::MatchMediaOuter(const nsAString& aMediaQueryList,
-                                CallerType aCallerType)
+                                     CallerType aCallerType)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   if (!mDoc) {
     return nullptr;
   }
 
   return mDoc->MatchMedia(aMediaQueryList, aCallerType);
 }
 
 void
 nsGlobalWindowOuter::SetScreenXOuter(int32_t aScreenX,
-                                CallerType aCallerType,
-                                ErrorResult& aError)
+                                     CallerType aCallerType,
+                                     ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   nsCOMPtr<nsIBaseWindow> treeOwnerAsWin = GetTreeOwnerWindow();
   if (!treeOwnerAsWin) {
     aError.Throw(NS_ERROR_FAILURE);
     return;
   }
@@ -3652,18 +3652,18 @@ nsGlobalWindowOuter::GetScreenYOuter(Cal
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   return GetScreenXY(aCallerType, aError).y;
 }
 
 
 void
 nsGlobalWindowOuter::SetScreenYOuter(int32_t aScreenY,
-                                CallerType aCallerType,
-                                ErrorResult& aError)
+                                     CallerType aCallerType,
+                                     ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   nsCOMPtr<nsIBaseWindow> treeOwnerAsWin = GetTreeOwnerWindow();
   if (!treeOwnerAsWin) {
     aError.Throw(NS_ERROR_FAILURE);
     return;
   }
@@ -3681,17 +3681,17 @@ nsGlobalWindowOuter::SetScreenYOuter(int
 
   CheckForDPIChange();
 }
 
 // NOTE: Arguments to this function should have values scaled to
 // CSS pixels, not device pixels.
 void
 nsGlobalWindowOuter::CheckSecurityWidthAndHeight(int32_t* aWidth, int32_t* aHeight,
-                                            CallerType aCallerType)
+                                                 CallerType aCallerType)
 {
   MOZ_ASSERT(IsOuterWindow());
 
 #ifdef MOZ_XUL
   if (aCallerType != CallerType::System) {
     // if attempting to resize the window, hide any open popups
     nsContentUtils::HidePopupsInDocument(mDoc);
   }
@@ -3746,17 +3746,17 @@ nsGlobalWindowOuter::SetCSSViewportWidth
 
   presContext->SetVisibleArea(shellArea);
 }
 
 // NOTE: Arguments to this function should have values scaled to
 // CSS pixels, not device pixels.
 void
 nsGlobalWindowOuter::CheckSecurityLeftAndTop(int32_t* aLeft, int32_t* aTop,
-                                        CallerType aCallerType)
+                                             CallerType aCallerType)
 {
   MOZ_ASSERT(IsOuterWindow());
 
   // This one is harder. We have to get the screen size and window dimensions.
 
   // Check security state for use in determing window dimensions
 
   if (aCallerType != CallerType::System) {
@@ -3979,18 +3979,18 @@ GetCallerDocShellTreeItem()
   nsCOMPtr<nsIWebNavigation> callerWebNav = do_GetInterface(GetEntryGlobal());
   nsCOMPtr<nsIDocShellTreeItem> callerItem = do_QueryInterface(callerWebNav);
 
   return callerItem.forget();
 }
 
 bool
 nsGlobalWindowOuter::WindowExists(const nsAString& aName,
-                             bool aForceNoOpener,
-                             bool aLookForCallerOnJSStack)
+                                  bool aForceNoOpener,
+                                  bool aLookForCallerOnJSStack)
 {
   NS_PRECONDITION(IsOuterWindow(), "Must be outer window");
   NS_PRECONDITION(mDocShell, "Must have docshell");
 
   if (aForceNoOpener) {
     return aName.LowerCaseEqualsLiteral("_self") ||
            aName.LowerCaseEqualsLiteral("_top") ||
            aName.LowerCaseEqualsLiteral("_parent");
@@ -4325,17 +4325,17 @@ MakeWidgetFullscreen(nsGlobalWindowOuter
     new FullscreenTransitionTask(duration, aWindow, aFullscreen,
                                  widget, nullptr, transitionData);
   task->Run();
   return true;
 }
 
 nsresult
 nsGlobalWindowOuter::SetFullscreenInternal(FullscreenReason aReason,
-                                      bool aFullScreen)
+                                           bool aFullScreen)
 {
   MOZ_ASSERT(IsOuterWindow());
   MOZ_ASSERT(nsContentUtils::IsSafeToRunScript(),
              "Requires safe to run script as it "
              "may call FinishDOMFullscreenChange");
 
   NS_ENSURE_TRUE(mDocShell, NS_ERROR_FAILURE);
 
@@ -4419,17 +4419,17 @@ nsGlobalWindowOuter::SetFullscreenIntern
   }
 
   FinishFullscreenChange(aFullScreen);
   return NS_OK;
 }
 
 bool
 nsGlobalWindowOuter::SetWidgetFullscreen(FullscreenReason aReason, bool aIsFullscreen,
-                                    nsIWidget* aWidget, nsIScreen* aScreen)
+                                         nsIWidget* aWidget, nsIScreen* aScreen)
 {
   MOZ_ASSERT(IsOuterWindow());
   MOZ_ASSERT(this == GetTopInternal(), "Only topmost window should call this");
   MOZ_ASSERT(!GetFrameElementInternal(), "Content window should not call this");
   MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
 
   if (!NS_WARN_IF(!IsChromeWindow())) {
     if (!NS_WARN_IF(mChromeFields.mFullscreenPresShell)) {
@@ -4589,17 +4589,17 @@ nsGlobalWindowOuter::EnsureReflowFlushAn
 
   // Unsuppress painting.
   presShell->UnsuppressPainting();
 }
 
 // static
 void
 nsGlobalWindowOuter::MakeScriptDialogTitle(nsAString& aOutTitle,
-                                      nsIPrincipal* aSubjectPrincipal)
+                                           nsIPrincipal* aSubjectPrincipal)
 {
   MOZ_ASSERT(aSubjectPrincipal);
 
   aOutTitle.Truncate();
 
   // Try to get a host from the running principal -- this will do the
   // right thing for javascript: and data: documents.
 
@@ -4705,19 +4705,19 @@ nsGlobalWindowOuter::CanMoveResizeWindow
       ds->Suppress();
     }
   }
   return true;
 }
 
 bool
 nsGlobalWindowOuter::AlertOrConfirm(bool aAlert,
-                               const nsAString& aMessage,
-                               nsIPrincipal& aSubjectPrincipal,
-                               ErrorResult& aError)
+                                    const nsAString& aMessage,
+                                    nsIPrincipal& aSubjectPrincipal,
+                                    ErrorResult& aError)
 {
   // XXX This method is very similar to nsGlobalWindowOuter::Prompt, make
   // sure any modifications here don't need to happen over there!
   MOZ_ASSERT(IsOuterWindow());
 
   if (!AreDialogsEnabled()) {
     // Just silently return.  In the case of alert(), the return value is
     // ignored.  In the case of confirm(), returning false is the same thing as
@@ -4784,40 +4784,40 @@ nsGlobalWindowOuter::AlertOrConfirm(bool
                prompt->Confirm(title.get(), final.get(), &result);
   }
 
   return result;
 }
 
 void
 nsGlobalWindowOuter::AlertOuter(const nsAString& aMessage,
-                           nsIPrincipal& aSubjectPrincipal,
-                           ErrorResult& aError)
+                                nsIPrincipal& aSubjectPrincipal,
+                                ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
   AlertOrConfirm(/* aAlert = */ true, aMessage, aSubjectPrincipal, aError);
 }
 
 bool
 nsGlobalWindowOuter::ConfirmOuter(const nsAString& aMessage,
-                             nsIPrincipal& aSubjectPrincipal,
-                             ErrorResult& aError)
+                                  nsIPrincipal& aSubjectPrincipal,
+                                  ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   return AlertOrConfirm(/* aAlert = */ false, aMessage, aSubjectPrincipal,
                         aError);
 }
 
 void
 nsGlobalWindowOuter::PromptOuter(const nsAString& aMessage,
-                            const nsAString& aInitial,
-                            nsAString& aReturn,
-                            nsIPrincipal& aSubjectPrincipal,
-                            ErrorResult& aError)
+                                 const nsAString& aInitial,
+                                 nsAString& aReturn,
+                                 nsIPrincipal& aSubjectPrincipal,
+                                 ErrorResult& aError)
 {
   // XXX This method is very similar to nsGlobalWindowOuter::AlertOrConfirm, make
   // sure any modifications here don't need to happen over there!
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   SetDOMStringToNull(aReturn);
 
   if (!AreDialogsEnabled()) {
@@ -5219,17 +5219,17 @@ nsGlobalWindowOuter::PrintOuter(ErrorRes
       webBrowserPrint->Print(printSettings, nullptr);
     }
   }
 #endif //NS_PRINTING
 }
 
 void
 nsGlobalWindowOuter::MoveToOuter(int32_t aXPos, int32_t aYPos,
-                            CallerType aCallerType, ErrorResult& aError)
+                                 CallerType aCallerType, ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
   /*
    * If caller is not chrome and the user has not explicitly exempted the site,
    * prevent window.moveTo() by exiting early
    */
 
   if (!CanMoveResizeWindows(aCallerType) || IsFrame()) {
@@ -5278,17 +5278,17 @@ nsGlobalWindowOuter::MoveToOuter(int32_t
     aError = treeOwnerAsWin->SetPosition(devPos.x, devPos.y);
   }
 
   CheckForDPIChange();
 }
 
 void
 nsGlobalWindowOuter::MoveByOuter(int32_t aXDif, int32_t aYDif,
-                            CallerType aCallerType, ErrorResult& aError)
+                                 CallerType aCallerType, ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   /*
    * If caller is not chrome and the user has not explicitly exempted the site,
    * prevent window.moveBy() by exiting early
    */
 
@@ -5333,18 +5333,18 @@ nsGlobalWindowOuter::MoveBy(int32_t aXDi
   ErrorResult rv;
   MoveByOuter(aXDif, aYDif, CallerType::System, rv);
 
   return rv.StealNSResult();
 }
 
 void
 nsGlobalWindowOuter::ResizeToOuter(int32_t aWidth, int32_t aHeight,
-                              CallerType aCallerType,
-                              ErrorResult& aError)
+                                   CallerType aCallerType,
+                                   ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   /*
    * If caller is a browser-element then dispatch a resize event to
    * the embedder.
    */
   if (mDocShell && mDocShell->GetIsMozBrowser()) {
@@ -5378,17 +5378,17 @@ nsGlobalWindowOuter::ResizeToOuter(int32
 
   aError = treeOwnerAsWin->SetSize(devSz.width, devSz.height, true);
 
   CheckForDPIChange();
 }
 
 void
 nsGlobalWindowOuter::ResizeByOuter(int32_t aWidthDif, int32_t aHeightDif,
-                              CallerType aCallerType, ErrorResult& aError)
+                                   CallerType aCallerType, ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   /*
    * If caller is a browser-element then dispatch a resize event to
    * parent.
    */
   if (mDocShell && mDocShell->GetIsMozBrowser()) {
@@ -5524,19 +5524,19 @@ bool IsPopupBlocked(nsIDocument* aDoc)
 
   uint32_t permission = nsIPopupWindowManager::ALLOW_POPUP;
   pm->TestPermission(aDoc->NodePrincipal(), &permission);
   return permission == nsIPopupWindowManager::DENY_POPUP;
 }
 
 void
 nsGlobalWindowOuter::FirePopupBlockedEvent(nsIDocument* aDoc,
-                                      nsIURI* aPopupURI,
-                                      const nsAString& aPopupWindowName,
-                                      const nsAString& aPopupWindowFeatures)
+                                           nsIURI* aPopupURI,
+                                           const nsAString& aPopupWindowName,
+                                           const nsAString& aPopupWindowFeatures)
 {
   MOZ_ASSERT(IsOuterWindow(), "All callers seem to assume we're an outer window?");
   MOZ_ASSERT(aDoc);
 
   // Fire a "DOMPopupBlocked" event so that the UI can hear about
   // blocked popups.
   PopupBlockedEventInit init;
   init.mBubbles = true;
@@ -5633,18 +5633,18 @@ nsGlobalWindowOuter::RevisePopupAbuseLev
   }
 
   return abuse;
 }
 
 /* If a window open is blocked, fire the appropriate DOM events. */
 void
 nsGlobalWindowOuter::FireAbuseEvents(const nsAString &aPopupURL,
-                                const nsAString &aPopupWindowName,
-                                const nsAString &aPopupWindowFeatures)
+                                     const nsAString &aPopupWindowName,
+                                     const nsAString &aPopupWindowFeatures)
 {
   MOZ_ASSERT(IsOuterWindow());
   // fetch the URI of the window requesting the opened window
 
   nsCOMPtr<nsPIDOMWindowOuter> window = GetTop();
   if (!window) {
     return;
   }
@@ -5671,44 +5671,44 @@ nsGlobalWindowOuter::FireAbuseEvents(con
 
   // fire an event chock full of informative URIs
   FirePopupBlockedEvent(topDoc, popupURI, aPopupWindowName,
                         aPopupWindowFeatures);
 }
 
 already_AddRefed<nsPIDOMWindowOuter>
 nsGlobalWindowOuter::OpenOuter(const nsAString& aUrl, const nsAString& aName,
-                          const nsAString& aOptions, ErrorResult& aError)
+                               const nsAString& aOptions, ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
   nsCOMPtr<nsPIDOMWindowOuter> window;
   aError = OpenJS(aUrl, aName, aOptions, getter_AddRefs(window));
   return window.forget();
 }
 
 nsresult
 nsGlobalWindowOuter::Open(const nsAString& aUrl, const nsAString& aName,
-                     const nsAString& aOptions, nsIDocShellLoadInfo* aLoadInfo,
-                     bool aForceNoOpener, nsPIDOMWindowOuter **_retval)
+                          const nsAString& aOptions, nsIDocShellLoadInfo* aLoadInfo,
+                          bool aForceNoOpener, nsPIDOMWindowOuter **_retval)
 {
   return OpenInternal(aUrl, aName, aOptions,
                       false,          // aDialog
                       false,          // aContentModal
                       true,           // aCalledNoScript
                       false,          // aDoJSFixups
                       true,           // aNavigate
                       nullptr, nullptr,  // No args
                       aLoadInfo,
                       aForceNoOpener,
                       _retval);
 }
 
 nsresult
 nsGlobalWindowOuter::OpenJS(const nsAString& aUrl, const nsAString& aName,
-                       const nsAString& aOptions, nsPIDOMWindowOuter **_retval)
+                            const nsAString& aOptions, nsPIDOMWindowOuter **_retval)
 {
   MOZ_ASSERT(IsOuterWindow());
   return OpenInternal(aUrl, aName, aOptions,
                       false,          // aDialog
                       false,          // aContentModal
                       false,          // aCalledNoScript
                       true,           // aDoJSFixups
                       true,           // aNavigate
@@ -5717,19 +5717,19 @@ nsGlobalWindowOuter::OpenJS(const nsAStr
                       false,          // aForceNoOpener
                       _retval);
 }
 
 // like Open, but attaches to the new window any extra parameters past
 // [features] as a JS property named "arguments"
 nsresult
 nsGlobalWindowOuter::OpenDialog(const nsAString& aUrl, const nsAString& aName,
-                           const nsAString& aOptions,
-                           nsISupports* aExtraArgument,
-                           nsPIDOMWindowOuter** _retval)
+                                const nsAString& aOptions,
+                                nsISupports* aExtraArgument,
+                                nsPIDOMWindowOuter** _retval)
 {
   MOZ_ASSERT(IsOuterWindow());
   return OpenInternal(aUrl, aName, aOptions,
                       true,                    // aDialog
                       false,                   // aContentModal
                       true,                    // aCalledNoScript
                       false,                   // aDoJSFixups
                       true,                    // aNavigate
@@ -5737,19 +5737,19 @@ nsGlobalWindowOuter::OpenDialog(const ns
                       nullptr,                 // aLoadInfo
                       false,                   // aForceNoOpener
                       _retval);
 }
 
 // Like Open, but passes aNavigate=false.
 /* virtual */ nsresult
 nsGlobalWindowOuter::OpenNoNavigate(const nsAString& aUrl,
-                               const nsAString& aName,
-                               const nsAString& aOptions,
-                               nsPIDOMWindowOuter **_retval)
+                                    const nsAString& aName,
+                                    const nsAString& aOptions,
+                                    nsPIDOMWindowOuter **_retval)
 {
   MOZ_ASSERT(IsOuterWindow());
   return OpenInternal(aUrl, aName, aOptions,
                       false,          // aDialog
                       false,          // aContentModal
                       true,           // aCalledNoScript
                       false,          // aDoJSFixups
                       false,          // aNavigate
@@ -5757,19 +5757,19 @@ nsGlobalWindowOuter::OpenNoNavigate(cons
                       nullptr,        // aLoadInfo
                       false,          // aForceNoOpener
                       _retval);
 
 }
 
 already_AddRefed<nsPIDOMWindowOuter>
 nsGlobalWindowOuter::OpenDialogOuter(JSContext* aCx, const nsAString& aUrl,
-                                const nsAString& aName, const nsAString& aOptions,
-                                const Sequence<JS::Value>& aExtraArgument,
-                                ErrorResult& aError)
+                                     const nsAString& aName, const nsAString& aOptions,
+                                     const Sequence<JS::Value>& aExtraArgument,
+                                     ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   nsCOMPtr<nsIJSArgArray> argvArray;
   aError = NS_CreateJSArgv(aCx, aExtraArgument.Length(),
                            aExtraArgument.Elements(),
                            getter_AddRefs(argvArray));
   if (aError.Failed()) {
@@ -5830,20 +5830,20 @@ nsGlobalWindowOuter::CallerInnerWindow()
   // The calling window must be holding a reference, so we can return a weak
   // pointer.
   nsCOMPtr<nsPIDOMWindowInner> win = do_QueryInterface(global);
   return nsGlobalWindowInner::Cast(win);
 }
 
 void
 nsGlobalWindowOuter::PostMessageMozOuter(JSContext* aCx, JS::Handle<JS::Value> aMessage,
-                                    const nsAString& aTargetOrigin,
-                                    JS::Handle<JS::Value> aTransfer,
-                                    nsIPrincipal& aSubjectPrincipal,
-                                    ErrorResult& aError)
+                                         const nsAString& aTargetOrigin,
+                                         JS::Handle<JS::Value> aTransfer,
+                                         nsIPrincipal& aSubjectPrincipal,
+                                         ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   //
   // Window.postMessage is an intentional subversion of the same-origin policy.
   // As such, this code must be particularly careful in the information it
   // exposes to calling code.
   //
@@ -6402,17 +6402,17 @@ nsGlobalWindowOuter::GetCachedXBLPrototy
   if (mCachedXBLPrototypeHandlers) {
     mCachedXBLPrototypeHandlers->Get(aKey, handler.address());
   }
   return handler;
 }
 
 void
 nsGlobalWindowOuter::CacheXBLPrototypeHandler(nsXBLPrototypeHandler* aKey,
-                                         JS::Handle<JSObject*> aHandler)
+                                              JS::Handle<JSObject*> aHandler)
 {
   if (!mCachedXBLPrototypeHandlers) {
     mCachedXBLPrototypeHandlers = MakeUnique<XBLPrototypeHandlerTable>();
     PreserveWrapper(ToSupports(this));
   }
 
   mCachedXBLPrototypeHandlers->Put(aKey, aHandler);
 }
@@ -6529,19 +6529,19 @@ already_AddRefed<nsISelection>
 nsGlobalWindowOuter::GetSelection()
 {
   nsCOMPtr<nsISelection> selection = GetSelectionOuter();
   return selection.forget();
 }
 
 bool
 nsGlobalWindowOuter::FindOuter(const nsAString& aString, bool aCaseSensitive,
-                          bool aBackwards, bool aWrapAround, bool aWholeWord,
-                          bool aSearchInFrames, bool aShowDialog,
-                          ErrorResult& aError)
+                               bool aBackwards, bool aWrapAround, bool aWholeWord,
+                               bool aSearchInFrames, bool aShowDialog,
+                               ErrorResult& aError)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   Unused << aShowDialog;
 
   if (Preferences::GetBool("dom.disable_window_find", false)) {
     aError.Throw(NS_ERROR_NOT_AVAILABLE);
     return false;
@@ -6591,18 +6591,18 @@ nsGlobalWindowOuter::FindOuter(const nsA
 nsPIDOMWindowOuter*
 nsGlobalWindowOuter::GetOwnerGlobalForBindings()
 {
   return this;
 }
 
 NS_IMETHODIMP
 nsGlobalWindowOuter::RemoveEventListener(const nsAString& aType,
-                                    nsIDOMEventListener* aListener,
-                                    bool aUseCapture)
+                                         nsIDOMEventListener* aListener,
+                                         bool aUseCapture)
 {
   if (RefPtr<EventListenerManager> elm = GetExistingListenerManager()) {
     elm->RemoveEventListener(aType, aListener, aUseCapture);
   }
   return NS_OK;
 }
 
 NS_IMPL_REMOVE_SYSTEM_EVENT_LISTENER(nsGlobalWindowOuter)
@@ -6610,19 +6610,19 @@ NS_IMPL_REMOVE_SYSTEM_EVENT_LISTENER(nsG
 NS_IMETHODIMP
 nsGlobalWindowOuter::DispatchEvent(nsIDOMEvent* aEvent, bool* aRetVal)
 {
   FORWARD_TO_INNER(DispatchEvent, (aEvent, aRetVal), NS_OK);
 }
 
 NS_IMETHODIMP
 nsGlobalWindowOuter::AddEventListener(const nsAString& aType,
-                                 nsIDOMEventListener *aListener,
-                                 bool aUseCapture, bool aWantsUntrusted,
-                                 uint8_t aOptionalArgc)
+                                      nsIDOMEventListener *aListener,
+                                      bool aUseCapture, bool aWantsUntrusted,
+                                      uint8_t aOptionalArgc)
 {
   NS_ASSERTION(!aWantsUntrusted || aOptionalArgc > 1,
                "Won't check if this is chrome, you want to set "
                "aWantsUntrusted to false or make the aWantsUntrusted "
                "explicit by making optional_argc non-zero.");
 
   if (!aWantsUntrusted &&
       (aOptionalArgc < 2 && !nsContentUtils::IsChromeDoc(mDoc))) {
@@ -6632,20 +6632,20 @@ nsGlobalWindowOuter::AddEventListener(co
   EventListenerManager* manager = GetOrCreateListenerManager();
   NS_ENSURE_STATE(manager);
   manager->AddEventListener(aType, aListener, aUseCapture, aWantsUntrusted);
   return NS_OK;
 }
 
 void
 nsGlobalWindowOuter::AddEventListener(const nsAString& aType,
-                                 EventListener* aListener,
-                                 const AddEventListenerOptionsOrBoolean& aOptions,
-                                 const Nullable<bool>& aWantsUntrusted,
-                                 ErrorResult& aRv)
+                                      EventListener* aListener,
+                                      const AddEventListenerOptionsOrBoolean& aOptions,
+                                      const Nullable<bool>& aWantsUntrusted,
+                                      ErrorResult& aRv)
 {
   if (mInnerWindow && !nsContentUtils::CanCallerAccess(mInnerWindow)) {
     aRv.Throw(NS_ERROR_DOM_SECURITY_ERR);
     return;
   }
 
   bool wantsUntrusted;
   if (aWantsUntrusted.IsNull()) {
@@ -6660,20 +6660,20 @@ nsGlobalWindowOuter::AddEventListener(co
     return;
   }
 
   manager->AddEventListener(aType, aListener, aOptions, wantsUntrusted);
 }
 
 NS_IMETHODIMP
 nsGlobalWindowOuter::AddSystemEventListener(const nsAString& aType,
-                                       nsIDOMEventListener *aListener,
-                                       bool aUseCapture,
-                                       bool aWantsUntrusted,
-                                       uint8_t aOptionalArgc)
+                                            nsIDOMEventListener *aListener,
+                                            bool aUseCapture,
+                                            bool aWantsUntrusted,
+                                            uint8_t aOptionalArgc)
 {
   NS_ASSERTION(!aWantsUntrusted || aOptionalArgc > 1,
                "Won't check if this is chrome, you want to set "
                "aWantsUntrusted to false or make the aWantsUntrusted "
                "explicit by making optional_argc non-zero.");
 
   if (mInnerWindow &&
       !nsContentUtils::LegacyIsCallerNativeCode() &&
@@ -6919,18 +6919,18 @@ nsGlobalWindowOuter::SetChromeEventHandl
     NS_ASSERTION(!inner->mOuterWindow || inner->mOuterWindow == this,
                  "bad outer window pointer");
     inner->SetChromeEventHandlerInternal(aChromeEventHandler);
   }
 }
 
 void
 nsGlobalWindowOuter::SetFocusedNode(nsIContent* aNode,
-                               uint32_t aFocusMethod,
-                               bool aNeedsFocus)
+                                    uint32_t aFocusMethod,
+                                    bool aNeedsFocus)
 {
   FORWARD_TO_INNER_VOID(SetFocusedNode, (aNode, aFocusMethod, aNeedsFocus));
 }
 
 uint32_t
 nsGlobalWindowOuter::GetFocusMethod()
 {
   FORWARD_TO_INNER(GetFocusMethod, (), 0);
@@ -6939,17 +6939,17 @@ nsGlobalWindowOuter::GetFocusMethod()
 bool
 nsGlobalWindowOuter::ShouldShowFocusRing()
 {
   FORWARD_TO_INNER(ShouldShowFocusRing, (), false);
 }
 
 void
 nsGlobalWindowOuter::SetKeyboardIndicators(UIStateChangeType aShowAccelerators,
-                                      UIStateChangeType aShowFocusRings)
+                                           UIStateChangeType aShowFocusRings)
 {
   MOZ_ASSERT(IsOuterWindow());
 
   nsPIDOMWindowOuter* piWin = GetPrivateRoot();
   if (!piWin) {
     return;
   }
 
@@ -7014,25 +7014,25 @@ nsGlobalWindowOuter::DispatchAsyncHashch
 nsresult
 nsGlobalWindowOuter::DispatchSyncPopState()
 {
   MOZ_CRASH("Virtual inner window only function");
 }
 
 already_AddRefed<nsICSSDeclaration>
 nsGlobalWindowOuter::GetComputedStyle(Element& aElt, const nsAString& aPseudoElt,
-                                 ErrorResult& aError)
+                                      ErrorResult& aError)
 {
   MOZ_CRASH("Virtual inner window only function");
 }
 
 already_AddRefed<nsICSSDeclaration>
 nsGlobalWindowOuter::GetComputedStyleHelperOuter(Element& aElt,
-                                            const nsAString& aPseudoElt,
-                                            bool aDefaultStylesOnly)
+                                                 const nsAString& aPseudoElt,
+                                                 bool aDefaultStylesOnly)
 {
   MOZ_RELEASE_ASSERT(IsOuterWindow());
 
   if (!mDocShell) {
     return nullptr;
   }
 
   nsCOMPtr<nsIPresShell> presShell = mDocShell->GetPresShell();
@@ -7218,24 +7218,24 @@ public:
     nsCOMPtr<nsIRunnable> caller = NewRunnableMethod(
       "AutoUnblockScriptClosing::~AutoUnblockScriptClosing", mWin, run);
     mWin->Dispatch(TaskCategory::Other, caller.forget());
   }
 };
 
 nsresult
 nsGlobalWindowOuter::OpenInternal(const nsAString& aUrl, const nsAString& aName,
-                             const nsAString& aOptions, bool aDialog,
-                             bool aContentModal, bool aCalledNoScript,
-                             bool aDoJSFixups, bool aNavigate,
-                             nsIArray *argv,
-                             nsISupports *aExtraArgument,
-                             nsIDocShellLoadInfo* aLoadInfo,
-                             bool aForceNoOpener,
-                             nsPIDOMWindowOuter **aReturn)
+                                  const nsAString& aOptions, bool aDialog,
+                                  bool aContentModal, bool aCalledNoScript,
+                                  bool aDoJSFixups, bool aNavigate,
+                                  nsIArray *argv,
+                                  nsISupports *aExtraArgument,
+                                  nsIDocShellLoadInfo* aLoadInfo,
+                                  bool aForceNoOpener,
+                                  nsPIDOMWindowOuter **aReturn)
 {
   MOZ_ASSERT(IsOuterWindow());
 
 #ifdef DEBUG
   uint32_t argc = 0;
   if (argv)
       argv->GetLength(&argc);
 #endif
@@ -7815,17 +7815,17 @@ nsGlobalWindowOuter::SetBrowserDOMWindow
 NS_IMETHODIMP
 nsGlobalWindowOuter::GetMessageManager(nsIMessageBroadcaster** aManager)
 {
   FORWARD_TO_INNER(GetMessageManager, (aManager), NS_ERROR_UNEXPECTED);
 }
 
 NS_IMETHODIMP
 nsGlobalWindowOuter::GetGroupMessageManager(const nsAString& aGroup,
-                                       nsIMessageBroadcaster** aManager)
+                                            nsIMessageBroadcaster** aManager)
 {
   MOZ_RELEASE_ASSERT(IsChromeWindow());
   FORWARD_TO_INNER(GetGroupMessageManager, (aGroup, aManager), NS_ERROR_UNEXPECTED);
 }
 
 nsresult
 nsGlobalWindowOuter::SetOpenerForInitialContentBrowser(mozIDOMWindowProxy* aOpenerWindow)
 {
@@ -8023,17 +8023,17 @@ nsGlobalWindowOuter::TabGroupOuter()
   }
 #endif
 
   return mTabGroup;
 }
 
 nsresult
 nsGlobalWindowOuter::Dispatch(TaskCategory aCategory,
-                         already_AddRefed<nsIRunnable>&& aRunnable)
+                              already_AddRefed<nsIRunnable>&& aRunnable)
 {
   MOZ_RELEASE_ASSERT(NS_IsMainThread());
   if (GetDocGroup()) {
     return GetDocGroup()->Dispatch(aCategory, Move(aRunnable));
   }
   return DispatcherTrait::Dispatch(aCategory, Move(aRunnable));
 }