Bug 1277129 Part 4a - Move ScrollReflowState into mozilla namespace. draft
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 21 Jul 2016 12:58:27 +0800
changeset 390450 bbb8eb05de0f7510af50f69a09c581ce9ff2541c
parent 390449 278172b32f0068542444a5dbadd34435fbb4c51f
child 390451 fa38d175eca21f753d727fa7691cb2c553a4299d
push id23670
push usertlin@mozilla.com
push dateThu, 21 Jul 2016 05:05:21 +0000
bugs1277129
milestone50.0a1
Bug 1277129 Part 4a - Move ScrollReflowState into mozilla namespace. MozReview-Commit-ID: Hq8iWyG606l
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 {
@@ -648,16 +648,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