Bug 1468582: Remove using namespace statements from layout headers. r=mats
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 13 Jun 2018 12:13:07 -0700
changeset 476768 cb09f382ff47a7c6d7421e60dce7838d48af66b2
parent 476767 25ff84f2bac337a8beba23d3e93c55e1cdc2dec9
child 476769 671e4d24c51171391552ed243a0e4d4de12953aa
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs1468582
milestone62.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 1468582: Remove using namespace statements from layout headers. r=mats MozReview-Commit-ID: WF23cUiHFH
layout/svg/nsSVGImageFrame.h
layout/tables/nsTableFrame.h
layout/xul/nsListItemFrame.cpp
layout/xul/nsListItemFrame.h
--- a/layout/svg/nsSVGImageFrame.h
+++ b/layout/svg/nsSVGImageFrame.h
@@ -21,21 +21,16 @@
 #include "SVGContentUtils.h"
 #include "SVGGeometryFrame.h"
 #include "SVGImageContext.h"
 #include "mozilla/dom/SVGImageElement.h"
 #include "nsContentUtils.h"
 #include "nsIReflowCallback.h"
 #include "mozilla/Unused.h"
 
-using namespace mozilla;
-using namespace mozilla::dom;
-using namespace mozilla::gfx;
-using namespace mozilla::image;
-
 class nsSVGImageFrame;
 
 class nsSVGImageListener final : public imgINotificationObserver
 {
 public:
   explicit nsSVGImageListener(nsSVGImageFrame *aFrame);
 
   NS_DECL_ISUPPORTS
@@ -45,17 +40,17 @@ public:
 
 private:
   ~nsSVGImageListener() {}
 
   nsSVGImageFrame *mFrame;
 };
 
 class nsSVGImageFrame final
-  : public SVGGeometryFrame
+  : public mozilla::SVGGeometryFrame
   , public nsIReflowCallback
 {
   friend nsIFrame*
   NS_NewSVGImageFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle);
 
 protected:
   explicit nsSVGImageFrame(ComputedStyle* aStyle)
     : SVGGeometryFrame(aStyle, kClassID)
@@ -105,19 +100,19 @@ public:
   // nsIReflowCallback
   virtual bool ReflowFinished() override;
   virtual void ReflowCallbackCanceled() override;
 
   /// Always sync decode our image when painting if @aForce is true.
   void SetForceSyncDecoding(bool aForce) { mForceSyncDecoding = aForce; }
 
 private:
-  gfx::Matrix GetRasterImageTransform(int32_t aNativeWidth,
-                                      int32_t aNativeHeight);
-  gfx::Matrix GetVectorImageTransform();
+  mozilla::gfx::Matrix GetRasterImageTransform(int32_t aNativeWidth,
+                                               int32_t aNativeHeight);
+  mozilla::gfx::Matrix GetVectorImageTransform();
   bool TransformContextForPainting(gfxContext* aGfxContext,
                                    const gfxMatrix& aTransform);
 
   nsCOMPtr<imgINotificationObserver> mListener;
 
   nsCOMPtr<imgIContainer> mImageContainer;
 
   bool mReflowCallbackPosted;
--- a/layout/tables/nsTableFrame.h
+++ b/layout/tables/nsTableFrame.h
@@ -29,18 +29,16 @@ namespace mozilla {
 class WritingMode;
 class LogicalMargin;
 struct TableReflowInput;
 namespace layers {
 class StackingContextHelper;
 }
 } // namespace mozilla
 
-using namespace mozilla;
-
 struct BCPropertyData;
 
 static inline bool
 IS_TABLE_CELL(mozilla::LayoutFrameType frameType)
 {
   return frameType == mozilla::LayoutFrameType::TableCell ||
          frameType == mozilla::LayoutFrameType::BCTableCell;
 }
--- a/layout/xul/nsListItemFrame.cpp
+++ b/layout/xul/nsListItemFrame.cpp
@@ -10,16 +10,18 @@
 
 #include "nsCOMPtr.h"
 #include "nsNameSpaceManager.h"
 #include "nsGkAtoms.h"
 #include "nsDisplayList.h"
 #include "nsBoxLayout.h"
 #include "nsIContent.h"
 
+using namespace mozilla;
+
 nsListItemFrame::nsListItemFrame(ComputedStyle* aStyle,
                                  bool aIsRoot,
                                  nsBoxLayout* aLayoutManager)
   : nsGridRowLeafFrame(aStyle, aIsRoot, aLayoutManager, kClassID)
 {
 }
 
 nsListItemFrame::~nsListItemFrame()
--- a/layout/xul/nsListItemFrame.h
+++ b/layout/xul/nsListItemFrame.h
@@ -2,20 +2,18 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/Attributes.h"
 #include "nsGridRowLeafFrame.h"
 
-using namespace mozilla;
-
 nsIFrame* NS_NewListItemFrame(nsIPresShell* aPresShell,
-                              ComputedStyle* aStyle);
+                              mozilla::ComputedStyle* aStyle);
 
 class nsListItemFrame final : public nsGridRowLeafFrame
 {
 public:
   NS_DECL_FRAMEARENA_HELPERS(nsListItemFrame)
 
   friend nsIFrame* NS_NewListItemFrame(nsIPresShell* aPresShell,
                                        ComputedStyle* aStyle);