зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1277129 Part 1a - Move nsHTMLReflowState and nsCSSOffsetState into mozilla namespace. r=dbaron
MozReview-Commit-ID: DJfEQRCgNo3 --HG-- extra : rebase_source : add4c7a843f956114b2b9dfe20fba1048139ca5f
This commit is contained in:
Родитель
e171f59d13
Коммит
39dffbe21b
|
@ -8,7 +8,9 @@
|
|||
|
||||
#include "nsQueryFrame.h"
|
||||
|
||||
namespace mozilla {
|
||||
struct nsHTMLReflowState;
|
||||
} // namespace mozilla
|
||||
|
||||
/**
|
||||
* This interface is supported by frames that need to provide computed bsize
|
||||
|
@ -22,10 +24,10 @@ public:
|
|||
|
||||
// Notify the observer that aReflowState has no computed bsize,
|
||||
// but it has a percent bsize
|
||||
virtual void NotifyPercentBSize(const nsHTMLReflowState& aReflowState) = 0;
|
||||
virtual void NotifyPercentBSize(const mozilla::nsHTMLReflowState& aReflowState) = 0;
|
||||
|
||||
// Ask the observer if it should observe aReflowState.frame
|
||||
virtual bool NeedsToObserve(const nsHTMLReflowState& aReflowState) = 0;
|
||||
virtual bool NeedsToObserve(const mozilla::nsHTMLReflowState& aReflowState) = 0;
|
||||
};
|
||||
|
||||
#endif // nsIPercentBSizeObserver_h___
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "mozilla/TypedEnumBits.h"
|
||||
|
||||
class nsContainerFrame;
|
||||
struct nsHTMLReflowState;
|
||||
class nsPresContext;
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "nsHTMLReflowMetrics.h"
|
||||
|
||||
class nsBlockReflowState;
|
||||
struct nsHTMLReflowState;
|
||||
class nsLineBox;
|
||||
class nsPresContext;
|
||||
|
||||
|
@ -21,6 +20,8 @@ class nsPresContext;
|
|||
* An encapsulation of the state and algorithm for reflowing block frames.
|
||||
*/
|
||||
class nsBlockReflowContext {
|
||||
using nsHTMLReflowState = mozilla::nsHTMLReflowState;
|
||||
|
||||
public:
|
||||
nsBlockReflowContext(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aParentRS);
|
||||
|
|
|
@ -75,6 +75,8 @@ class nsOverflowContinuationTracker;
|
|||
// block frame uses along with nsHTMLReflowState. Like nsHTMLReflowState, this
|
||||
// is read-only data that is passed down from a parent frame to its children.
|
||||
class nsBlockReflowState {
|
||||
using nsHTMLReflowState = mozilla::nsHTMLReflowState;
|
||||
|
||||
public:
|
||||
nsBlockReflowState(const nsHTMLReflowState& aReflowState,
|
||||
nsPresContext* aPresContext,
|
||||
|
|
|
@ -18,8 +18,10 @@
|
|||
|
||||
class nsIPresShell;
|
||||
class nsIFrame;
|
||||
struct nsHTMLReflowState;
|
||||
class nsPresContext;
|
||||
namespace mozilla {
|
||||
struct nsHTMLReflowState;
|
||||
} // namespace mozilla
|
||||
|
||||
/**
|
||||
* The available space for content not occupied by floats is divided
|
||||
|
@ -371,6 +373,8 @@ private:
|
|||
* manager in the reflow state when the object goes out of scope.
|
||||
*/
|
||||
class nsAutoFloatManager {
|
||||
using nsHTMLReflowState = mozilla::nsHTMLReflowState;
|
||||
|
||||
public:
|
||||
explicit nsAutoFloatManager(nsHTMLReflowState& aReflowState)
|
||||
: mReflowState(aReflowState),
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
|
||||
#include "nsContainerFrame.h"
|
||||
|
||||
struct nsHTMLReflowState;
|
||||
|
||||
class nsFontInflationData
|
||||
{
|
||||
using nsHTMLReflowState = mozilla::nsHTMLReflowState;
|
||||
|
||||
public:
|
||||
|
||||
static nsFontInflationData* FindFontInflationDataFor(const nsIFrame *aFrame);
|
||||
|
|
|
@ -769,7 +769,7 @@ public:
|
|||
struct DR_cookie {
|
||||
DR_cookie(nsPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
const mozilla::nsHTMLReflowState& aReflowState,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
nsReflowStatus& aStatus);
|
||||
~DR_cookie();
|
||||
|
@ -777,7 +777,7 @@ public:
|
|||
|
||||
nsPresContext* mPresContext;
|
||||
nsIFrame* mFrame;
|
||||
const nsHTMLReflowState& mReflowState;
|
||||
const mozilla::nsHTMLReflowState& mReflowState;
|
||||
nsHTMLReflowMetrics& mMetrics;
|
||||
nsReflowStatus& mStatus;
|
||||
void* mValue;
|
||||
|
@ -814,35 +814,35 @@ public:
|
|||
};
|
||||
|
||||
struct DR_init_constraints_cookie {
|
||||
DR_init_constraints_cookie(nsIFrame* aFrame, nsHTMLReflowState* aState,
|
||||
DR_init_constraints_cookie(nsIFrame* aFrame, mozilla::nsHTMLReflowState* aState,
|
||||
nscoord aCBWidth, nscoord aCBHeight,
|
||||
const nsMargin* aBorder,
|
||||
const nsMargin* aPadding);
|
||||
~DR_init_constraints_cookie();
|
||||
|
||||
nsIFrame* mFrame;
|
||||
nsHTMLReflowState* mState;
|
||||
mozilla::nsHTMLReflowState* mState;
|
||||
void* mValue;
|
||||
};
|
||||
|
||||
struct DR_init_offsets_cookie {
|
||||
DR_init_offsets_cookie(nsIFrame* aFrame, nsCSSOffsetState* aState,
|
||||
DR_init_offsets_cookie(nsIFrame* aFrame, mozilla::nsCSSOffsetState* aState,
|
||||
const mozilla::LogicalSize& aPercentBasis,
|
||||
const nsMargin* aBorder,
|
||||
const nsMargin* aPadding);
|
||||
~DR_init_offsets_cookie();
|
||||
|
||||
nsIFrame* mFrame;
|
||||
nsCSSOffsetState* mState;
|
||||
mozilla::nsCSSOffsetState* mState;
|
||||
void* mValue;
|
||||
};
|
||||
|
||||
struct DR_init_type_cookie {
|
||||
DR_init_type_cookie(nsIFrame* aFrame, nsHTMLReflowState* aState);
|
||||
DR_init_type_cookie(nsIFrame* aFrame, mozilla::nsHTMLReflowState* aState);
|
||||
~DR_init_type_cookie();
|
||||
|
||||
nsIFrame* mFrame;
|
||||
nsHTMLReflowState* mState;
|
||||
mozilla::nsHTMLReflowState* mState;
|
||||
void* mValue;
|
||||
};
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
class nsIContent;
|
||||
class nsPresContext;
|
||||
struct nsRect;
|
||||
struct nsHTMLReflowState;
|
||||
struct nsSize;
|
||||
class nsIAtom;
|
||||
class nsHTMLFramesetBorderFrame;
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
namespace mozilla {
|
||||
struct nsHTMLReflowState;
|
||||
} // namespace mozilla
|
||||
|
||||
// Option flags
|
||||
#define NS_REFLOW_CALC_BOUNDING_METRICS 0x0001
|
||||
|
@ -197,6 +199,8 @@ struct nsCollapsingMargin {
|
|||
* @see #Reflow()
|
||||
*/
|
||||
class nsHTMLReflowMetrics {
|
||||
using nsHTMLReflowState = mozilla::nsHTMLReflowState;
|
||||
|
||||
public:
|
||||
// XXXldb Should |aFlags| generally be passed from parent to child?
|
||||
// Some places do it, and some don't. |aFlags| should perhaps go away
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
/* struct containing the input to nsIFrame::Reflow */
|
||||
|
||||
#ifndef nsHTMLReflowState_h___
|
||||
#define nsHTMLReflowState_h___
|
||||
#ifndef mozilla_nsHTMLReflowState_h
|
||||
#define mozilla_nsHTMLReflowState_h
|
||||
|
||||
#include "nsMargin.h"
|
||||
#include "nsStyleCoord.h"
|
||||
|
@ -94,6 +94,8 @@ typedef uint32_t nsCSSFrameType;
|
|||
((_ft) & ~(NS_CSS_FRAME_TYPE_REPLACED | \
|
||||
NS_CSS_FRAME_TYPE_REPLACED_CONTAINS_BLOCK))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
// A base class of nsHTMLReflowState that computes only the padding,
|
||||
// border, and margin, since those values are needed more often.
|
||||
struct nsCSSOffsetState {
|
||||
|
@ -970,5 +972,6 @@ protected:
|
|||
void CalculateBlockSideMargins(nsIAtom* aFrameType);
|
||||
};
|
||||
|
||||
#endif /* nsHTMLReflowState_h___ */
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_nsHTMLReflowState_h
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
* 5. the view system handles moving of widgets, i.e., it's not our problem
|
||||
*/
|
||||
|
||||
struct nsHTMLReflowState;
|
||||
class nsIAtom;
|
||||
class nsPresContext;
|
||||
class nsIPresShell;
|
||||
|
@ -94,6 +93,7 @@ namespace mozilla {
|
|||
|
||||
enum class CSSPseudoElementType : uint8_t;
|
||||
class EventStates;
|
||||
struct nsHTMLReflowState;
|
||||
|
||||
namespace layers {
|
||||
class Layer;
|
||||
|
@ -423,6 +423,7 @@ public:
|
|||
using OnNonvisible = mozilla::OnNonvisible;
|
||||
template<typename T=void>
|
||||
using PropertyDescriptor = const mozilla::FramePropertyDescriptor<T>*;
|
||||
using nsHTMLReflowState = mozilla::nsHTMLReflowState;
|
||||
using Visibility = mozilla::Visibility;
|
||||
using VisibilityCounter = mozilla::VisibilityCounter;
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ class nsFontMetrics;
|
|||
class nsImageMap;
|
||||
class nsIURI;
|
||||
class nsILoadGroup;
|
||||
struct nsHTMLReflowState;
|
||||
class nsHTMLReflowMetrics;
|
||||
class nsDisplayImage;
|
||||
class nsPresContext;
|
||||
|
|
|
@ -28,6 +28,8 @@ class nsFloatManager;
|
|||
struct nsStyleText;
|
||||
|
||||
class nsLineLayout {
|
||||
using nsHTMLReflowState = mozilla::nsHTMLReflowState;
|
||||
|
||||
public:
|
||||
/**
|
||||
* @param aBaseLineLayout the nsLineLayout for ruby base,
|
||||
|
|
|
@ -16,11 +16,15 @@
|
|||
#include "nsCoord.h"
|
||||
|
||||
class nsRenderingContext;
|
||||
namespace mozilla {
|
||||
struct nsHTMLReflowState;
|
||||
} // namespace mozilla
|
||||
|
||||
class nsITableLayoutStrategy
|
||||
{
|
||||
public:
|
||||
using nsHTMLReflowState = mozilla::nsHTMLReflowState;
|
||||
|
||||
virtual ~nsITableLayoutStrategy() {}
|
||||
|
||||
/** Implement nsIFrame::GetMinISize for the table */
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
class nsTableRowFrame;
|
||||
|
||||
struct nsRowGroupReflowState {
|
||||
using nsHTMLReflowState = mozilla::nsHTMLReflowState;
|
||||
|
||||
const nsHTMLReflowState& reflowState; // Our reflow state
|
||||
|
||||
nsTableFrame* tableFrame;
|
||||
|
|
|
@ -18,10 +18,15 @@
|
|||
#include "nsIPresShell.h"
|
||||
|
||||
class nsRenderingContext;
|
||||
namespace mozilla {
|
||||
struct nsHTMLReflowState;
|
||||
} // namespace mozilla
|
||||
|
||||
|
||||
class MOZ_STACK_CLASS nsBoxLayoutState
|
||||
{
|
||||
using nsHTMLReflowState = mozilla::nsHTMLReflowState;
|
||||
|
||||
public:
|
||||
explicit nsBoxLayoutState(nsPresContext* aPresContext,
|
||||
nsRenderingContext* aRenderingContext = nullptr,
|
||||
|
|
Загрузка…
Ссылка в новой задаче