From ac7ee961235da3cd6015e2078b2ccf560bc9ceca Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Tue, 21 Jan 2014 17:05:07 -0800 Subject: [PATCH] Bug 962267: Move nsFlexContainerFrame.h's forward-decls into the class's scope. r=mats --- layout/generic/nsFlexContainerFrame.cpp | 9 ++++++--- layout/generic/nsFlexContainerFrame.h | 8 +++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/layout/generic/nsFlexContainerFrame.cpp b/layout/generic/nsFlexContainerFrame.cpp index 4804215e091..7a370432e30 100644 --- a/layout/generic/nsFlexContainerFrame.cpp +++ b/layout/generic/nsFlexContainerFrame.cpp @@ -24,6 +24,9 @@ using namespace mozilla::layout; // Convenience typedefs for helper classes that we forward-declare in .h file // (so that nsFlexContainerFrame methods can use them as parameters): +typedef nsFlexContainerFrame::FlexItem FlexItem; +typedef nsFlexContainerFrame::FlexLine FlexLine; +typedef nsFlexContainerFrame::FlexboxAxisTracker FlexboxAxisTracker; typedef nsFlexContainerFrame::StrutInfo StrutInfo; #ifdef PR_LOGGING @@ -202,7 +205,7 @@ MarginComponentForSide(nsMargin& aMargin, Side aSide) IsAxisHorizontal((axisTracker_).GetCrossAxis()) ? (width_) : (height_) // Encapsulates our flex container's main & cross axes. -class MOZ_STACK_CLASS FlexboxAxisTracker { +class MOZ_STACK_CLASS nsFlexContainerFrame::FlexboxAxisTracker { public: FlexboxAxisTracker(nsFlexContainerFrame* aFlexContainerFrame); @@ -277,7 +280,7 @@ private: // Represents a flex item. // Includes the various pieces of input that the Flexbox Layout Algorithm uses // to resolve a flexible width. -class FlexItem { +class nsFlexContainerFrame::FlexItem { public: // Normal constructor: FlexItem(nsIFrame* aChildFrame, @@ -561,7 +564,7 @@ protected: // Represents a single flex line in a flex container. // Manages an array of the FlexItems that are in the line. -class FlexLine { +class nsFlexContainerFrame::FlexLine { public: FlexLine() : mTotalInnerHypotheticalMainSize(0), diff --git a/layout/generic/nsFlexContainerFrame.h b/layout/generic/nsFlexContainerFrame.h index 3854826c586..813710dfc81 100644 --- a/layout/generic/nsFlexContainerFrame.h +++ b/layout/generic/nsFlexContainerFrame.h @@ -17,11 +17,6 @@ nsIFrame* NS_NewFlexContainerFrame(nsIPresShell* aPresShell, typedef nsContainerFrame nsFlexContainerFrameSuper; -class FlexItem; -class FlexLine; -class FlexboxAxisTracker; -class MainAxisPositionTracker; -class SingleLineCrossAxisPositionTracker; template class nsTArray; class nsFlexContainerFrame : public nsFlexContainerFrameSuper { @@ -35,6 +30,9 @@ class nsFlexContainerFrame : public nsFlexContainerFrameSuper { public: // Forward-decls of helper classes + class FlexItem; + class FlexLine; + class FlexboxAxisTracker; class StrutInfo; // nsIFrame overrides