Bug 1277129 Part 4a - Move ScrollReflowState into mozilla namespace. draft
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 21 Jul 2016 18:25:31 +0800
changeset 390568 61bf90b700ebbbd9201e394a9a6cb8f229850c16
parent 390567 7015e592e401c1598e700a68a3674d480ced4c44
child 390569 fc6a2b0b9ed5123d78ea05082e0a87b1c98c3957
push id23690
push usertlin@mozilla.com
push dateThu, 21 Jul 2016 10:26:03 +0000
bugs1277129
milestone50.0a1
Bug 1277129 Part 4a - Move ScrollReflowState into mozilla namespace. 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 {
@@ -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