Bug 1523969 part 5 - Move method definition inline comments to new line in 'docshell/'. r=qdot
authorRyan Hunt <rhunt@eqrion.net>
Mon, 25 Feb 2019 16:04:59 -0600
changeset 519768 4c547a6435fd72456a25543522ff6fc2e77cda4a
parent 519767 24f4ed60ba7fe10e2a99400ad89b36b2463687f5
child 519769 f41cee9bf14931b453838d1bbcbda528e3b064e8
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1523969
milestone67.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 1523969 part 5 - Move method definition inline comments to new line in 'docshell/'. r=qdot Differential Revision: https://phabricator.services.mozilla.com/D21105
docshell/base/BrowsingContext.cpp
docshell/base/CanonicalBrowsingContext.cpp
docshell/base/nsDocShell.cpp
docshell/base/nsPingListener.cpp
--- a/docshell/base/BrowsingContext.cpp
+++ b/docshell/base/BrowsingContext.cpp
@@ -74,46 +74,47 @@ static void Sync(BrowsingContext* aBrows
 BrowsingContext* BrowsingContext::TopLevelBrowsingContext() {
   BrowsingContext* bc = this;
   while (bc->mParent) {
     bc = bc->mParent;
   }
   return bc;
 }
 
-/* static */ void BrowsingContext::Init() {
+/* static */
+void BrowsingContext::Init() {
   if (!sBrowsingContexts) {
     sBrowsingContexts = new BrowsingContextMap<WeakPtr>();
     ClearOnShutdown(&sBrowsingContexts);
   }
 
   if (!sCachedBrowsingContexts) {
     sCachedBrowsingContexts = new BrowsingContextMap<RefPtr>();
     ClearOnShutdown(&sCachedBrowsingContexts);
   }
 }
 
-/* static */ LogModule* BrowsingContext::GetLog() {
-  return gBrowsingContextLog;
-}
+/* static */
+LogModule* BrowsingContext::GetLog() { return gBrowsingContextLog; }
 
-/* static */ already_AddRefed<BrowsingContext> BrowsingContext::Get(
-    uint64_t aId) {
+/* static */
+already_AddRefed<BrowsingContext> BrowsingContext::Get(uint64_t aId) {
   if (BrowsingContextMap<WeakPtr>::Ptr abc = sBrowsingContexts->lookup(aId)) {
     return do_AddRef(abc->value().get());
   }
 
   return nullptr;
 }
 
 CanonicalBrowsingContext* BrowsingContext::Canonical() {
   return CanonicalBrowsingContext::Cast(this);
 }
 
-/* static */ already_AddRefed<BrowsingContext> BrowsingContext::Create(
+/* static */
+already_AddRefed<BrowsingContext> BrowsingContext::Create(
     BrowsingContext* aParent, BrowsingContext* aOpener, const nsAString& aName,
     Type aType) {
   MOZ_DIAGNOSTIC_ASSERT(!aParent || aParent->mType == aType);
 
   uint64_t id = nsContentUtils::GenerateBrowsingContextId();
 
   MOZ_LOG(GetLog(), LogLevel::Debug,
           ("Creating 0x%08" PRIx64 " in %s", id,
@@ -130,17 +131,18 @@ CanonicalBrowsingContext* BrowsingContex
   Register(context);
 
   // Attach the browsing context to the tree.
   context->Attach();
 
   return context.forget();
 }
 
-/* static */ already_AddRefed<BrowsingContext> BrowsingContext::CreateFromIPC(
+/* static */
+already_AddRefed<BrowsingContext> BrowsingContext::CreateFromIPC(
     BrowsingContext* aParent, BrowsingContext* aOpener, const nsAString& aName,
     uint64_t aId, ContentParent* aOriginProcess) {
   MOZ_DIAGNOSTIC_ASSERT(aOriginProcess || XRE_IsContentProcess(),
                         "Parent Process IPC contexts need a Content Process.");
   MOZ_DIAGNOSTIC_ASSERT(!aParent || aParent->IsContent());
 
   MOZ_LOG(GetLog(), LogLevel::Debug,
           ("Creating 0x%08" PRIx64 " from IPC (origin=0x%08" PRIx64 ")", aId,
--- a/docshell/base/CanonicalBrowsingContext.cpp
+++ b/docshell/base/CanonicalBrowsingContext.cpp
@@ -25,23 +25,25 @@ CanonicalBrowsingContext::CanonicalBrows
                                                    BrowsingContext::Type aType)
     : BrowsingContext(aParent, aOpener, aName, aBrowsingContextId, aType),
       mProcessId(aProcessId) {
   // You are only ever allowed to create CanonicalBrowsingContexts in the
   // parent process.
   MOZ_RELEASE_ASSERT(XRE_IsParentProcess());
 }
 
-/* static */ already_AddRefed<CanonicalBrowsingContext>
-CanonicalBrowsingContext::Get(uint64_t aId) {
+/* static */
+already_AddRefed<CanonicalBrowsingContext> CanonicalBrowsingContext::Get(
+    uint64_t aId) {
   MOZ_RELEASE_ASSERT(XRE_IsParentProcess());
   return BrowsingContext::Get(aId).downcast<CanonicalBrowsingContext>();
 }
 
-/* static */ CanonicalBrowsingContext* CanonicalBrowsingContext::Cast(
+/* static */
+CanonicalBrowsingContext* CanonicalBrowsingContext::Cast(
     BrowsingContext* aContext) {
   MOZ_RELEASE_ASSERT(XRE_IsParentProcess());
   return static_cast<CanonicalBrowsingContext*>(aContext);
 }
 
 /* static */ const CanonicalBrowsingContext* CanonicalBrowsingContext::Cast(
     const BrowsingContext* aContext) {
   MOZ_RELEASE_ASSERT(XRE_IsParentProcess());
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -444,17 +444,18 @@ nsDocShell::~nsDocShell() {
   if (!PR_GetEnv("MOZ_QUIET")) {
     printf_stderr("--DOCSHELL %p == %ld [pid = %d] [id = %s]\n", (void*)this,
                   gNumberOfDocShells, getpid(),
                   nsIDToCString(mHistoryID).get());
   }
 #endif
 }
 
-/* static */ already_AddRefed<nsDocShell> nsDocShell::Create(
+/* static */
+already_AddRefed<nsDocShell> nsDocShell::Create(
     BrowsingContext* aBrowsingContext) {
   MOZ_ASSERT(aBrowsingContext, "DocShell without a BrowsingContext!");
 
   nsresult rv;
   RefPtr<nsDocShell> ds = new nsDocShell(aBrowsingContext);
 
   // Initialize the underlying nsDocLoader.
   rv = ds->nsDocLoader::Init();
@@ -1015,19 +1016,19 @@ nsDOMNavigationTiming* nsDocShell::GetNa
 // Bug 13871: Prevent frameset spoofing
 //
 // This routine answers: 'Is origin's document from same domain as
 // target's document?'
 //
 // file: uris are considered the same domain for the purpose of
 // frame navigation regardless of script accessibility (bug 420425)
 //
-/* static */ bool nsDocShell::ValidateOrigin(
-    nsIDocShellTreeItem* aOriginTreeItem,
-    nsIDocShellTreeItem* aTargetTreeItem) {
+/* static */
+bool nsDocShell::ValidateOrigin(nsIDocShellTreeItem* aOriginTreeItem,
+                                nsIDocShellTreeItem* aTargetTreeItem) {
   // We want to bypass this check for chrome callers, but only if there's
   // JS on the stack. System callers still need to do it.
   if (nsContentUtils::GetCurrentJSContext() &&
       nsContentUtils::IsCallerChrome()) {
     return true;
   }
 
   MOZ_ASSERT(aOriginTreeItem && aTargetTreeItem, "need two docshells");
@@ -2352,17 +2353,18 @@ nsDocShell::SetMetaViewportOverride(
   nsCOMPtr<nsIPresShell> presShell = GetPresShell();
   if (presShell) {
     presShell->UpdateViewportOverridden(true);
   }
 
   return NS_OK;
 }
 
-/* virtual */ int32_t nsDocShell::ItemType() { return mItemType; }
+/* virtual */
+int32_t nsDocShell::ItemType() { return mItemType; }
 
 NS_IMETHODIMP
 nsDocShell::GetItemType(int32_t* aItemType) {
   NS_ENSURE_ARG_POINTER(aItemType);
 
   MOZ_DIAGNOSTIC_ASSERT(
       (mBrowsingContext->IsContent() ? typeContent : typeChrome) == mItemType);
   *aItemType = mItemType;
@@ -12850,30 +12852,30 @@ unsigned long nsDocShell::gNumberOfDocSh
 #endif
 
 NS_IMETHODIMP
 nsDocShell::GetCanExecuteScripts(bool* aResult) {
   *aResult = mCanExecuteScripts;
   return NS_OK;
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::SetFrameType(
-    FrameType aFrameType) {
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::SetFrameType(FrameType aFrameType) {
   mFrameType = aFrameType;
   return NS_OK;
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::GetFrameType(
-    FrameType* aFrameType) {
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::GetFrameType(FrameType* aFrameType) {
   *aFrameType = mFrameType;
   return NS_OK;
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::GetIsMozBrowser(
-    bool* aIsMozBrowser) {
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::GetIsMozBrowser(bool* aIsMozBrowser) {
   *aIsMozBrowser = (mFrameType == FRAME_TYPE_BROWSER);
   return NS_OK;
 }
 
 uint32_t nsDocShell::GetInheritedFrameType() {
   if (mFrameType != FRAME_TYPE_REGULAR) {
     return mFrameType;
   }
@@ -12884,42 +12886,45 @@ uint32_t nsDocShell::GetInheritedFrameTy
   nsCOMPtr<nsIDocShell> parent = do_QueryInterface(parentAsItem);
   if (!parent) {
     return FRAME_TYPE_REGULAR;
   }
 
   return static_cast<nsDocShell*>(parent.get())->GetInheritedFrameType();
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::GetIsIsolatedMozBrowserElement(
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::GetIsIsolatedMozBrowserElement(
     bool* aIsIsolatedMozBrowserElement) {
   bool result = mFrameType == FRAME_TYPE_BROWSER &&
                 mOriginAttributes.mInIsolatedMozBrowser;
   *aIsIsolatedMozBrowserElement = result;
   return NS_OK;
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::GetIsInIsolatedMozBrowserElement(
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::GetIsInIsolatedMozBrowserElement(
     bool* aIsInIsolatedMozBrowserElement) {
   MOZ_ASSERT(!mOriginAttributes.mInIsolatedMozBrowser ||
                  (GetInheritedFrameType() == FRAME_TYPE_BROWSER),
              "Isolated mozbrowser should only be true inside browser frames");
   bool result = (GetInheritedFrameType() == FRAME_TYPE_BROWSER) &&
                 mOriginAttributes.mInIsolatedMozBrowser;
   *aIsInIsolatedMozBrowserElement = result;
   return NS_OK;
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::GetIsInMozBrowser(
-    bool* aIsInMozBrowser) {
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::GetIsInMozBrowser(bool* aIsInMozBrowser) {
   *aIsInMozBrowser = (GetInheritedFrameType() == FRAME_TYPE_BROWSER);
   return NS_OK;
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::GetIsTopLevelContentDocShell(
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::GetIsTopLevelContentDocShell(
     bool* aIsTopLevelContentDocShell) {
   *aIsTopLevelContentDocShell = false;
 
   if (mItemType == typeContent) {
     nsCOMPtr<nsIDocShellTreeItem> root;
     GetSameTypeRootTreeItem(getter_AddRefs(root));
     *aIsTopLevelContentDocShell =
         root.get() == static_cast<nsIDocShellTreeItem*>(this);
--- a/docshell/base/nsPingListener.cpp
+++ b/docshell/base/nsPingListener.cpp
@@ -283,21 +283,20 @@ static void ForEachPing(nsIContent* aCon
     // Explicitly not allow loading data: URIs
     if (!net::SchemeIsData(uri)) {
       aCallback(aClosure, aContent, uri, ios);
     }
   }
 }
 
 // Spec: http://whatwg.org/specs/web-apps/current-work/#ping
-/*static*/ void nsPingListener::DispatchPings(nsIDocShell* aDocShell,
-                                              nsIContent* aContent,
-                                              nsIURI* aTarget,
-                                              nsIURI* aReferrer,
-                                              uint32_t aReferrerPolicy) {
+/*static*/
+void nsPingListener::DispatchPings(nsIDocShell* aDocShell, nsIContent* aContent,
+                                   nsIURI* aTarget, nsIURI* aReferrer,
+                                   uint32_t aReferrerPolicy) {
   SendPingInfo info;
 
   if (!PingsEnabled(&info.maxPings, &info.requireSameHost)) {
     return;
   }
   if (info.maxPings == 0) {
     return;
   }