Bug 1321387 part 2: Add missing "using namespace" declarations to a few .cpp files in layout/generic. r=TYLin
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 30 Nov 2016 14:47:45 -0800
changeset 324905 7fd228039333a922c879951a2e5793589b7b6005
parent 324904 5dc43b5e3673c0ffac1099fbd14a2b31f9263e10
child 324906 ba9d56ef7f5a3012572ef75abf4d33958dff7b3d
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersTYLin
bugs1321387
milestone53.0a1
Bug 1321387 part 2: Add missing "using namespace" declarations to a few .cpp files in layout/generic. r=TYLin This adds 2 "using namespace mozilla" (to provide various types), and 2 "using namespace mozilla::gfx" (to provide mozilla::gfx::DrawTarget). MozReview-Commit-ID: 2bXbMlr4Dbn
layout/generic/nsPageContentFrame.cpp
layout/generic/nsRubyBaseContainerFrame.cpp
layout/generic/nsTextFrameUtils.cpp
layout/generic/nsTextRunTransformations.cpp
--- a/layout/generic/nsPageContentFrame.cpp
+++ b/layout/generic/nsPageContentFrame.cpp
@@ -4,18 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "nsPageContentFrame.h"
 #include "nsCSSFrameConstructor.h"
 #include "nsPresContext.h"
 #include "nsGkAtoms.h"
 #include "nsIPresShell.h"
 #include "nsSimplePageSequenceFrame.h"
 
-using mozilla::LogicalSize;
-using mozilla::WritingMode;
+using namespace mozilla;
 
 nsPageContentFrame*
 NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
   return new (aPresShell) nsPageContentFrame(aContext);
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsPageContentFrame)
--- a/layout/generic/nsRubyBaseContainerFrame.cpp
+++ b/layout/generic/nsRubyBaseContainerFrame.cpp
@@ -17,16 +17,17 @@
 #include "nsLineLayout.h"
 #include "nsPresContext.h"
 #include "nsStyleContext.h"
 #include "nsStyleStructInlines.h"
 #include "nsTextFrame.h"
 #include "RubyUtils.h"
 
 using namespace mozilla;
+using namespace mozilla::gfx;
 
 //----------------------------------------------------------------------
 
 // Frame class boilerplate
 // =======================
 
 NS_QUERYFRAME_HEAD(nsRubyBaseContainerFrame)
   NS_QUERYFRAME_ENTRY(nsRubyBaseContainerFrame)
--- a/layout/generic/nsTextFrameUtils.cpp
+++ b/layout/generic/nsTextFrameUtils.cpp
@@ -8,16 +8,18 @@
 #include "nsBidiUtils.h"
 #include "nsCharTraits.h"
 #include "nsIContent.h"
 #include "nsStyleStruct.h"
 #include "nsTextFragment.h"
 #include "nsUnicharUtils.h"
 #include <algorithm>
 
+using namespace mozilla;
+
 static bool IsDiscardable(char16_t ch, uint32_t* aFlags)
 {
   // Unlike IS_DISCARDABLE, we don't discard \r. \r will be ignored by gfxTextRun
   // and discarding it would force us to copy text in many cases of preformatted
   // text containing \r\n.
   if (ch == CH_SHY) {
     *aFlags |= nsTextFrameUtils::TEXT_HAS_SHY;
     return true;
--- a/layout/generic/nsTextRunTransformations.cpp
+++ b/layout/generic/nsTextRunTransformations.cpp
@@ -15,16 +15,17 @@
 #include "nsSpecialCasingData.h"
 #include "mozilla/gfx/2D.h"
 #include "nsTextFrameUtils.h"
 #include "nsIPersistentProperties2.h"
 #include "GreekCasing.h"
 #include "IrishCasing.h"
 
 using namespace mozilla;
+using namespace mozilla::gfx;
 
 // Unicode characters needing special casing treatment in tr/az languages
 #define LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE  0x0130
 #define LATIN_SMALL_LETTER_DOTLESS_I           0x0131
 
 // Greek sigma needs custom handling for the lowercase transform; for details
 // see comments under "case NS_STYLE_TEXT_TRANSFORM_LOWERCASE" within
 // nsCaseTransformTextRunFactory::RebuildTextRun(), and bug 740120.