Bug 1304598 Part 7 - Move BRFrame to mozilla namespace, and rename nsBRFrame.cpp to BRFrame.cpp. draft
authorTing-Yu Lin <tlin@mozilla.com>
Wed, 30 Nov 2016 11:14:29 +0800
changeset 445684 8c3e6f0048e308e3fc5a290f4bf8cc880af5e117
parent 445683 2685fe536487711702180435464e638367f7905e
child 538587 b3c58a08874a1de1713676798b8f485312c3a98a
push id37582
push usertlin@mozilla.com
push dateWed, 30 Nov 2016 03:26:08 +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
@@ -17,21 +17,23 @@
 #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 +64,18 @@ public:
 
 protected:
   explicit BRFrame(nsStyleContext* aContext) : nsFrame(aContext) {}
   virtual ~BRFrame();
 
   nscoord mAscent;
 };
 
+} // 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',