Bug 1321387 part 1: Wrap ReflowOutput impl in "namespace mozilla {}". r?TYLin draft
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 30 Nov 2016 14:47:45 -0800
changeset 446115 8e9e241c6e316b47455a32e3a439c44893ebc2e1
parent 446096 549da59b304f7f5a7aca4a27c4de7fcb53c93176
child 446116 526a03e76ce804a5f443896a1879f7aa0c7d1d62
push id37700
push userdholbert@mozilla.com
push dateWed, 30 Nov 2016 22:48:14 +0000
reviewersTYLin
bugs1321387
milestone53.0a1
Bug 1321387 part 1: Wrap ReflowOutput impl in "namespace mozilla {}". r?TYLin The class definition (in the header file) is already inside the namespace. But the method implementations are not (until now), and they've only been compiling successfully thanks to a "using namespace mozilla" that this file was picking up from another .cpp file, via unified builds. MozReview-Commit-ID: ImRBpAVA0en
layout/generic/ReflowOutput.cpp
--- a/layout/generic/ReflowOutput.cpp
+++ b/layout/generic/ReflowOutput.cpp
@@ -31,16 +31,18 @@ nsOverflowAreas::UnionAllWith(const nsRe
 void
 nsOverflowAreas::SetAllTo(const nsRect& aRect)
 {
   NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
     mRects[otype] = aRect;
   }
 }
 
+namespace mozilla {
+
 ReflowOutput::ReflowOutput(const ReflowInput& aState,
                                          uint32_t aFlags)
   : mISize(0)
   , mBSize(0)
   , mBlockStartAscent(ASK_FOR_BASELINE)
   , mFlags(aFlags)
   , mWritingMode(aState.GetWritingMode())
 {
@@ -60,8 +62,10 @@ ReflowOutput::UnionOverflowAreasWithDesi
   // FIXME: We should probably change scrollable overflow to use
   // UnionRectIncludeEmpty (but leave visual overflow using UnionRect).
   nsRect rect(0, 0, Width(), Height());
   NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
     nsRect& o = mOverflowAreas.Overflow(otype);
     o.UnionRect(o, rect);
   }
 }
+
+} // namespace mozilla