Bug 1304598 Part 7 - Move BRFrame to mozilla namespace, and rename nsBRFrame.cpp to BRFrame.cpp. draft
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 28 Nov 2016 18:39:07 +0800
changeset 444631 5b84ceabe73ec3e8270afbb2d94016f52b34a4fb
parent 444630 2ec49f9a444ca5fd66cfff842abbdceda5adb77b
child 538336 a9d324a79600c4dff436718942f43df0df275cbe
push id37309
push usertlin@mozilla.com
push dateMon, 28 Nov 2016 10:39:42 +0000
bugs1304598
milestone53.0a1
Bug 1304598 Part 7 - Move BRFrame to mozilla namespace, and rename nsBRFrame.cpp to BRFrame.cpp. MozReview-Commit-ID: 8IfleSWm1Af
layout/generic/BRFrame.cpp
layout/generic/moz.build
layout/generic/nsBRFrame.cpp
rename from layout/generic/nsBRFrame.cpp
rename to layout/generic/BRFrame.cpp
--- a/layout/generic/nsBRFrame.cpp
+++ b/layout/generic/BRFrame.cpp
@@ -15,23 +15,23 @@
 #include "nsGkAtoms.h"
 #include "nsRenderingContext.h"
 #include "nsLayoutUtils.h"
 
 //FOR SELECTION
 #include "nsIContent.h"
 //END INCLUDES FOR SELECTION
 
-using namespace mozilla;
+namespace mozilla {
 
 class BRFrame : public nsFrame {
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
-  friend nsIFrame* NS_NewBRFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
+  friend nsIFrame* ::NS_NewBRFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
 
   virtual ContentOffsets CalcContentOffsetsFromFramePoint(nsPoint aPoint) override;
 
   virtual FrameSearchResult PeekOffsetNoAmount(bool aForward, int32_t* aOffset) override;
   virtual FrameSearchResult PeekOffsetCharacter(bool aForward, int32_t* aOffset,
                                      bool aRespectClusters = true) override;
   virtual FrameSearchResult PeekOffsetWord(bool aForward, bool aWordSelectEatSpace,
                               bool aIsKeyboardSelect, int32_t* aOffset,
@@ -62,16 +62,20 @@ public:
 
 protected:
   explicit BRFrame(nsStyleContext* aContext) : nsFrame(aContext) {}
   virtual ~BRFrame();
 
   nscoord mAscent;
 };
 
+} // namespace mozilla
+
+using namespace mozilla;
+
 nsIFrame*
 NS_NewBRFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
   return new (aPresShell) BRFrame(aContext);
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(BRFrame)
 
--- a/layout/generic/moz.build
+++ b/layout/generic/moz.build
@@ -14,17 +14,17 @@ with Files('Block*'):
 
 with Files('nsLine*'):
     # Parts of these files are really Layout: Floats
     BUG_COMPONENT = ('Core', 'Layout: Block and Inline')
 
 with Files('nsInlineFrame.*'):
     BUG_COMPONENT = ('Core', 'Layout: Block and Inline')
 
-with Files('nsBRFrame.*'):
+with Files('BRFrame.*'):
     BUG_COMPONENT = ('Core', 'Layout: Block and Inline')
 
 with Files('nsBulletFrame.*'):
     BUG_COMPONENT = ('Core', 'Layout: Block and Inline')
 
 with Files('nsFirstLetterFrame.*'):
     BUG_COMPONENT = ('Core', 'Layout: Block and Inline')
 
@@ -122,25 +122,25 @@ EXPORTS.mozilla.dom += [
 
 EXPORTS.mozilla.layout += [
     'FrameChildList.h',
 ]
 
 UNIFIED_SOURCES += [
     'AsyncScrollBase.cpp',
     'BlockReflowInput.cpp',
+    'BRFrame.cpp',
     'CSSAlignUtils.cpp',
     'DetailsFrame.cpp',
     'FrameChildList.cpp',
     'MathMLTextRunFactory.cpp',
     'nsAbsoluteContainingBlock.cpp',
     'nsBackdropFrame.cpp',
     'nsBlockFrame.cpp',
     'nsBlockReflowContext.cpp',
-    'nsBRFrame.cpp',
     'nsBulletFrame.cpp',
     'nsCanvasFrame.cpp',
     'nsColumnSetFrame.cpp',
     'nsContainerFrame.cpp',
     'nsFirstLetterFrame.cpp',
     'nsFlexContainerFrame.cpp',
     'nsFloatManager.cpp',
     'nsFontInflationData.cpp',