Bug 1277129 Part 4a - Move ScrollReflowState into mozilla namespace. r=dbaron
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 21 Jul 2016 18:36:36 +0800
changeset 331134 5264e630fc3f0839182ec4e56d318750cec011e2
parent 331133 63e083e58002523052fb230dfe974ed8689cc73d
child 331135 14c11d5cdfcff24670516bd45d2d14b7f6a3f526
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1277129
milestone50.0a1
Bug 1277129 Part 4a - Move ScrollReflowState into mozilla namespace. r=dbaron MozReview-Commit-ID: C8drnMacxO
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsGfxScrollFrame.h
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -200,16 +200,18 @@ nsHTMLScrollFrame::GetType() const
 }
 
 /**
  HTML scrolling implementation
 
  All other things being equal, we prefer layouts with fewer scrollbars showing.
 */
 
+namespace mozilla {
+
 struct MOZ_STACK_CLASS ScrollReflowState {
   const ReflowInput& mReflowState;
   nsBoxLayoutState mBoxState;
   ScrollbarStyles mStyles;
   nsMargin mComputedBorder;
 
   // === Filled in by ReflowScrolledFrame ===
   nsOverflowAreas mContentsOverflowAreas;
@@ -229,16 +231,18 @@ struct MOZ_STACK_CLASS ScrollReflowState
     mReflowState(aState),
     // mBoxState is just used for scrollbars so we don't need to
     // worry about the reflow depth here
     mBoxState(aState.frame->PresContext(), aState.rendContext, 0),
     mStyles(aFrame->GetScrollbarStyles()) {
   }
 };
 
+} // namespace mozilla
+
 // XXXldb Can this go away?
 static nsSize ComputeInsideBorderSize(ScrollReflowState* aState,
                                       const nsSize& aDesiredInsideBorderSize)
 {
   // aDesiredInsideBorderSize is the frame size; i.e., it includes
   // borders and padding (but the scrolled child doesn't have
   // borders). The scrolled child has the same padding as us.
   nscoord contentWidth = aState->mReflowState.ComputedWidth();
--- a/layout/generic/nsGfxScrollFrame.h
+++ b/layout/generic/nsGfxScrollFrame.h
@@ -25,19 +25,19 @@
 #include "ScrollVelocityQueue.h"
 
 class nsPresContext;
 class nsIPresShell;
 class nsIContent;
 class nsIAtom;
 class nsPresState;
 class nsIScrollPositionListener;
-struct ScrollReflowState;
 
 namespace mozilla {
+struct ScrollReflowState;
 namespace layers {
 class Layer;
 } // namespace layers
 namespace layout {
 class ScrollbarActivity;
 } // namespace layout
 
 class ScrollFrameHelper : public nsIReflowCallback {
@@ -647,16 +647,17 @@ protected:
  */
 class nsHTMLScrollFrame : public nsContainerFrame,
                           public nsIScrollableFrame,
                           public nsIAnonymousContentCreator,
                           public nsIStatefulFrame {
 public:
   typedef mozilla::ScrollFrameHelper ScrollFrameHelper;
   typedef mozilla::CSSIntPoint CSSIntPoint;
+  typedef mozilla::ScrollReflowState ScrollReflowState;
   friend nsHTMLScrollFrame* NS_NewHTMLScrollFrame(nsIPresShell* aPresShell,
                                                   nsStyleContext* aContext,
                                                   bool aIsRoot);
 
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   virtual mozilla::WritingMode GetWritingMode() const override