Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions

nsHTMLReflowState Struct Reference

State passed to a frame during reflow or intrinsic size calculation. More...

#include <nsHTMLReflowState.h>

Inheritance diagram for nsHTMLReflowState:
Collaboration diagram for nsHTMLReflowState:

List of all members.

Classes

struct  ReflowStateFlags

Public Member Functions

 nsHTMLReflowState (nsPresContext *aPresContext, nsIFrame *aFrame, nsIRenderingContext *aRenderingContext, const nsSize &aAvailableSpace)
 nsHTMLReflowState (nsPresContext *aPresContext, const nsHTMLReflowState &aParentReflowState, nsIFrame *aFrame, const nsSize &aAvailableSpace, nscoord aContainingBlockWidth=-1, nscoord aContainingBlockHeight=-1, PRBool aInit=1)
void Init (nsPresContext *aPresContext, nscoord aContainingBlockWidth=-1, nscoord aContainingBlockHeight=-1, const nsMargin *aBorder=0, const nsMargin *aPadding=0)
nscoord CalcLineHeight () const
 Calculate the used line-height property.
void ComputeContainingBlockRectangle (nsPresContext *aPresContext, const nsHTMLReflowState *aContainingBlockRS, nscoord &aContainingBlockWidth, nscoord &aContainingBlockHeight)
void ApplyMinMaxConstraints (nscoord *aContentWidth, nscoord *aContentHeight) const
 Apply the mComputed(Min/Max)(Width/Height) values to the content size computed so far.
PRBool ShouldReflowAllKids () const
nscoord ComputedWidth () const
void SetComputedWidth (nscoord aComputedWidth)
nscoord ComputedHeight () const
void SetComputedHeight (nscoord aComputedHeight)
void SetComputedHeightWithoutResettingResizeFlags (nscoord aComputedHeight)
void SetTruncated (const nsHTMLReflowMetrics &aMetrics, nsReflowStatus *aStatus) const
PRBool WillReflowAgainForClearance () const

Static Public Member Functions

static nscoord GetContainingBlockContentWidth (const nsHTMLReflowState *aReflowState)
 Find the content width of the containing block of aReflowState.
static nsIFrame * GetContainingBlockFor (const nsIFrame *aFrame)
 Find the containing block of aFrame.
static nscoord CalcLineHeight (nsStyleContext *aStyleContext, nscoord aBlockHeight)
 Same as CalcLineHeight() above, but doesn't need a reflow state.

Public Attributes

const nsHTMLReflowStateparentReflowState
nsFloatManager * mFloatManager
nsLineLayout * mLineLayout
const nsHTMLReflowStatemCBReflowState
nscoord availableWidth
nscoord availableHeight
nsCSSFrameType mFrameType
nscoord mBlockDelta
nsMargin mComputedOffsets
nscoord mComputedMinWidth
nscoord mComputedMaxWidth
nscoord mComputedMinHeight
nscoord mComputedMaxHeight
const nsStyleDisplaymStyleDisplay
const nsStyleVisibilitymStyleVisibility
const nsStylePositionmStylePosition
const nsStyleBordermStyleBorder
const nsStyleMarginmStyleMargin
const nsStylePaddingmStylePadding
const nsStyleTextmStyleText
nsIPercentHeightObserver * mPercentHeightObserver
nsIFrame ** mDiscoveredClearance
PRInt16 mReflowDepth
struct
nsHTMLReflowState::ReflowStateFlags 
mFlags

Protected Member Functions

void InitFrameType ()
void InitCBReflowState ()
void InitResizeFlags (nsPresContext *aPresContext)
void InitConstraints (nsPresContext *aPresContext, nscoord aContainingBlockWidth, nscoord aContainingBlockHeight, const nsMargin *aBorder, const nsMargin *aPadding)
nsIFrame * GetHypotheticalBoxContainer (nsIFrame *aFrame, nscoord &aCBLeftEdge, nscoord &aCBWidth)
void CalculateHypotheticalBox (nsPresContext *aPresContext, nsIFrame *aPlaceholderFrame, nsIFrame *aContainingBlock, nscoord aBlockLeftContentEdge, nscoord aBlockContentWidth, const nsHTMLReflowState *cbrs, nsHypotheticalBox &aHypotheticalBox)
void InitAbsoluteConstraints (nsPresContext *aPresContext, const nsHTMLReflowState *cbrs, nscoord aContainingBlockWidth, nscoord aContainingBlockHeight)
void ComputeRelativeOffsets (const nsHTMLReflowState *cbrs, nscoord aContainingBlockWidth, nscoord aContainingBlockHeight, nsPresContext *aPresContext)
void ComputeMinMaxValues (nscoord aContainingBlockWidth, nscoord aContainingBlockHeight, const nsHTMLReflowState *aContainingBlockRS)
void CalculateHorizBorderPaddingMargin (nscoord aContainingBlockWidth, nscoord *aInsideBoxSizing, nscoord *aOutsideBoxSizing)
void CalculateBlockSideMargins (nscoord aAvailWidth, nscoord aComputedWidth)

Detailed Description

State passed to a frame during reflow or intrinsic size calculation.

XXX Refactor so only a base class (nsSizingState?) is used for intrinsic size calculation.

See also:
nsIFrame::Reflow()

Constructor & Destructor Documentation

nsHTMLReflowState::nsHTMLReflowState ( nsPresContext aPresContext,
nsIFrame *  aFrame,
nsIRenderingContext *  aRenderingContext,
const nsSize aAvailableSpace 
)
nsHTMLReflowState::nsHTMLReflowState ( nsPresContext aPresContext,
const nsHTMLReflowState aParentReflowState,
nsIFrame *  aFrame,
const nsSize aAvailableSpace,
nscoord  aContainingBlockWidth = -1,
nscoord  aContainingBlockHeight = -1,
PRBool  aInit = 1 
)

Member Function Documentation

void nsHTMLReflowState::ApplyMinMaxConstraints ( nscoord aContentWidth,
nscoord aContentHeight 
) const

Apply the mComputed(Min/Max)(Width/Height) values to the content size computed so far.

If a passed-in pointer is null, we skip adjusting that dimension.

static nscoord nsHTMLReflowState::CalcLineHeight ( nsStyleContext aStyleContext,
nscoord  aBlockHeight 
) [static]

Same as CalcLineHeight() above, but doesn't need a reflow state.

Parameters:
aBlockHeight The computed height of the content rect of the block that the line should fill. Only used with line-height:-moz-block-height. NS_AUTOHEIGHT results in a normal line-height for line-height:-moz-block-height.
nscoord nsHTMLReflowState::CalcLineHeight (  )  const

Calculate the used line-height property.

The return value will be >= 0.

void nsHTMLReflowState::CalculateBlockSideMargins ( nscoord  aAvailWidth,
nscoord  aComputedWidth 
) [protected]
void nsHTMLReflowState::CalculateHorizBorderPaddingMargin ( nscoord  aContainingBlockWidth,
nscoord aInsideBoxSizing,
nscoord aOutsideBoxSizing 
) [protected]
void nsHTMLReflowState::CalculateHypotheticalBox ( nsPresContext aPresContext,
nsIFrame *  aPlaceholderFrame,
nsIFrame *  aContainingBlock,
nscoord  aBlockLeftContentEdge,
nscoord  aBlockContentWidth,
const nsHTMLReflowState cbrs,
nsHypotheticalBox &  aHypotheticalBox 
) [protected]
void nsHTMLReflowState::ComputeContainingBlockRectangle ( nsPresContext aPresContext,
const nsHTMLReflowState aContainingBlockRS,
nscoord aContainingBlockWidth,
nscoord aContainingBlockHeight 
)
nscoord nsHTMLReflowState::ComputedHeight (  )  const [inline]
nscoord nsHTMLReflowState::ComputedWidth (  )  const [inline]
void nsHTMLReflowState::ComputeMinMaxValues ( nscoord  aContainingBlockWidth,
nscoord  aContainingBlockHeight,
const nsHTMLReflowState aContainingBlockRS 
) [protected]
void nsHTMLReflowState::ComputeRelativeOffsets ( const nsHTMLReflowState cbrs,
nscoord  aContainingBlockWidth,
nscoord  aContainingBlockHeight,
nsPresContext aPresContext 
) [protected]
static nscoord nsHTMLReflowState::GetContainingBlockContentWidth ( const nsHTMLReflowState aReflowState  )  [static]

Find the content width of the containing block of aReflowState.

static nsIFrame* nsHTMLReflowState::GetContainingBlockFor ( const nsIFrame *  aFrame  )  [static]

Find the containing block of aFrame.

This may return null if there isn't one (but that should really only happen for root frames).

nsIFrame* nsHTMLReflowState::GetHypotheticalBoxContainer ( nsIFrame *  aFrame,
nscoord aCBLeftEdge,
nscoord aCBWidth 
) [protected]
void nsHTMLReflowState::Init ( nsPresContext aPresContext,
nscoord  aContainingBlockWidth = -1,
nscoord  aContainingBlockHeight = -1,
const nsMargin aBorder = 0,
const nsMargin aPadding = 0 
)
void nsHTMLReflowState::InitAbsoluteConstraints ( nsPresContext aPresContext,
const nsHTMLReflowState cbrs,
nscoord  aContainingBlockWidth,
nscoord  aContainingBlockHeight 
) [protected]
void nsHTMLReflowState::InitCBReflowState (  )  [protected]
void nsHTMLReflowState::InitConstraints ( nsPresContext aPresContext,
nscoord  aContainingBlockWidth,
nscoord  aContainingBlockHeight,
const nsMargin aBorder,
const nsMargin aPadding 
) [protected]
void nsHTMLReflowState::InitFrameType (  )  [protected]
void nsHTMLReflowState::InitResizeFlags ( nsPresContext aPresContext  )  [protected]
void nsHTMLReflowState::SetComputedHeight ( nscoord  aComputedHeight  ) 
void nsHTMLReflowState::SetComputedHeightWithoutResettingResizeFlags ( nscoord  aComputedHeight  )  [inline]
void nsHTMLReflowState::SetComputedWidth ( nscoord  aComputedWidth  ) 
void nsHTMLReflowState::SetTruncated ( const nsHTMLReflowMetrics aMetrics,
nsReflowStatus *  aStatus 
) const
PRBool nsHTMLReflowState::ShouldReflowAllKids (  )  const [inline]
PRBool nsHTMLReflowState::WillReflowAgainForClearance (  )  const [inline]

Member Data Documentation

nsIPercentHeightObserver* nsHTMLReflowState::mPercentHeightObserver

The documentation for this struct was generated from the following file: