зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1277129 Part 2c - Rename nsBlockReflowState to BlockReflowInput. r=dbaron
This patch is generated by the following script: function rename() { find .\ -type f\ ! -path "./obj*"\ ! -path "./.git"\ ! -path "./.hg"\ \( -name "*.cpp" -or\ -name "*.h" \)\ -exec sed -i -e "s/$1/$2/g" "{}" \; } rename "nsBlockReflowState" "BlockReflowInput" MozReview-Commit-ID: FtjqkQpGfcI --HG-- extra : rebase_source : c8f678bc47217b778df7f91f0f6cce6c44b04d90
This commit is contained in:
Родитель
371989a096
Коммит
6111a2de40
|
@ -28,7 +28,7 @@ using namespace mozilla::layout;
|
|||
static bool sFloatFragmentsInsideColumnEnabled;
|
||||
static bool sFloatFragmentsInsideColumnPrefCached;
|
||||
|
||||
nsBlockReflowState::nsBlockReflowState(const ReflowInput& aReflowState,
|
||||
BlockReflowInput::BlockReflowInput(const ReflowInput& aReflowState,
|
||||
nsPresContext* aPresContext,
|
||||
nsBlockFrame* aFrame,
|
||||
bool aBStartMarginRoot,
|
||||
|
@ -101,7 +101,7 @@ nsBlockReflowState::nsBlockReflowState(const ReflowInput& aReflowState,
|
|||
mFloatManager = aReflowState.mFloatManager;
|
||||
|
||||
NS_ASSERTION(mFloatManager,
|
||||
"FloatManager should be set in nsBlockReflowState" );
|
||||
"FloatManager should be set in BlockReflowInput" );
|
||||
if (mFloatManager) {
|
||||
// Save the coordinate system origin for later.
|
||||
mFloatManager->GetTranslation(mFloatManagerI, mFloatManagerB);
|
||||
|
@ -147,7 +147,7 @@ nsBlockReflowState::nsBlockReflowState(const ReflowInput& aReflowState,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsBlockReflowState::GetConsumedBSize()
|
||||
BlockReflowInput::GetConsumedBSize()
|
||||
{
|
||||
if (mConsumedBSize == NS_INTRINSICSIZE) {
|
||||
mConsumedBSize = mBlock->GetConsumedBSize();
|
||||
|
@ -157,7 +157,7 @@ nsBlockReflowState::GetConsumedBSize()
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockReflowState::ComputeReplacedBlockOffsetsForFloats(
|
||||
BlockReflowInput::ComputeReplacedBlockOffsetsForFloats(
|
||||
nsIFrame* aFrame,
|
||||
const LogicalRect& aFloatAvailableSpace,
|
||||
nscoord& aIStartResult,
|
||||
|
@ -222,7 +222,7 @@ GetBEndMarginClone(nsIFrame* aFrame,
|
|||
// at the current Y coordinate. This method assumes that
|
||||
// GetAvailableSpace has already been called.
|
||||
void
|
||||
nsBlockReflowState::ComputeBlockAvailSpace(nsIFrame* aFrame,
|
||||
BlockReflowInput::ComputeBlockAvailSpace(nsIFrame* aFrame,
|
||||
const nsStyleDisplay* aDisplay,
|
||||
const nsFlowAreaRect& aFloatAvailableSpace,
|
||||
bool aBlockAvoidsFloats,
|
||||
|
@ -303,7 +303,7 @@ nsBlockReflowState::ComputeBlockAvailSpace(nsIFrame* aFrame,
|
|||
}
|
||||
|
||||
bool
|
||||
nsBlockReflowState::ReplacedBlockFitsInAvailSpace(nsIFrame* aReplacedBlock,
|
||||
BlockReflowInput::ReplacedBlockFitsInAvailSpace(nsIFrame* aReplacedBlock,
|
||||
const nsFlowAreaRect& aFloatAvailableSpace) const
|
||||
{
|
||||
if (!aFloatAvailableSpace.mHasFloats) {
|
||||
|
@ -330,7 +330,7 @@ nsBlockReflowState::ReplacedBlockFitsInAvailSpace(nsIFrame* aReplacedBlock,
|
|||
}
|
||||
|
||||
nsFlowAreaRect
|
||||
nsBlockReflowState::GetFloatAvailableSpaceWithState(
|
||||
BlockReflowInput::GetFloatAvailableSpaceWithState(
|
||||
nscoord aBCoord,
|
||||
nsFloatManager::SavedState *aState) const
|
||||
{
|
||||
|
@ -367,7 +367,7 @@ nsBlockReflowState::GetFloatAvailableSpaceWithState(
|
|||
}
|
||||
|
||||
nsFlowAreaRect
|
||||
nsBlockReflowState::GetFloatAvailableSpaceForBSize(
|
||||
BlockReflowInput::GetFloatAvailableSpaceForBSize(
|
||||
nscoord aBCoord, nscoord aBSize,
|
||||
nsFloatManager::SavedState *aState) const
|
||||
{
|
||||
|
@ -413,7 +413,7 @@ nsBlockReflowState::GetFloatAvailableSpaceForBSize(
|
|||
* margins of blocks collapse).
|
||||
*/
|
||||
void
|
||||
nsBlockReflowState::ReconstructMarginBefore(nsLineList::iterator aLine)
|
||||
BlockReflowInput::ReconstructMarginBefore(nsLineList::iterator aLine)
|
||||
{
|
||||
mPrevBEndMargin.Zero();
|
||||
nsBlockFrame *block = mBlock;
|
||||
|
@ -440,7 +440,7 @@ nsBlockReflowState::ReconstructMarginBefore(nsLineList::iterator aLine)
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockReflowState::SetupPushedFloatList()
|
||||
BlockReflowInput::SetupPushedFloatList()
|
||||
{
|
||||
MOZ_ASSERT(!GetFlag(BRS_PROPTABLE_FLOATCLIST) == !mPushedFloats,
|
||||
"flag mismatch");
|
||||
|
@ -458,7 +458,7 @@ nsBlockReflowState::SetupPushedFloatList()
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockReflowState::AppendPushedFloatChain(nsIFrame* aFloatCont)
|
||||
BlockReflowInput::AppendPushedFloatChain(nsIFrame* aFloatCont)
|
||||
{
|
||||
SetupPushedFloatList();
|
||||
while (true) {
|
||||
|
@ -482,7 +482,7 @@ nsBlockReflowState::AppendPushedFloatChain(nsIFrame* aFloatCont)
|
|||
* around, attached to the frame tree.
|
||||
*/
|
||||
void
|
||||
nsBlockReflowState::RecoverFloats(nsLineList::iterator aLine,
|
||||
BlockReflowInput::RecoverFloats(nsLineList::iterator aLine,
|
||||
nscoord aDeltaBCoord)
|
||||
{
|
||||
WritingMode wm = mReflowState.GetWritingMode();
|
||||
|
@ -531,13 +531,13 @@ nsBlockReflowState::RecoverFloats(nsLineList::iterator aLine,
|
|||
*
|
||||
* When this function is called, |aLine| has just been slid by |aDeltaBCoord|
|
||||
* and the purpose of RecoverStateFrom is to ensure that the
|
||||
* nsBlockReflowState is in the same state that it would have been in
|
||||
* BlockReflowInput is in the same state that it would have been in
|
||||
* had the line just been reflowed.
|
||||
*
|
||||
* Most of the state recovery that we have to do involves floats.
|
||||
*/
|
||||
void
|
||||
nsBlockReflowState::RecoverStateFrom(nsLineList::iterator aLine,
|
||||
BlockReflowInput::RecoverStateFrom(nsLineList::iterator aLine,
|
||||
nscoord aDeltaBCoord)
|
||||
{
|
||||
// Make the line being recovered the current line
|
||||
|
@ -566,7 +566,7 @@ nsBlockReflowState::RecoverStateFrom(nsLineList::iterator aLine,
|
|||
// float as well unless it won't fit next to what we already have.
|
||||
// But nobody else implements it that way...
|
||||
bool
|
||||
nsBlockReflowState::AddFloat(nsLineLayout* aLineLayout,
|
||||
BlockReflowInput::AddFloat(nsLineLayout* aLineLayout,
|
||||
nsIFrame* aFloat,
|
||||
nscoord aAvailableISize)
|
||||
{
|
||||
|
@ -657,7 +657,7 @@ nsBlockReflowState::AddFloat(nsLineLayout* aLineLayout,
|
|||
}
|
||||
|
||||
bool
|
||||
nsBlockReflowState::CanPlaceFloat(nscoord aFloatISize,
|
||||
BlockReflowInput::CanPlaceFloat(nscoord aFloatISize,
|
||||
const nsFlowAreaRect& aFloatAvailableSpace)
|
||||
{
|
||||
// A float fits at a given block-dir position if there are no floats
|
||||
|
@ -710,7 +710,7 @@ FloatMarginISize(const ReflowInput& aCBReflowState,
|
|||
}
|
||||
|
||||
bool
|
||||
nsBlockReflowState::FlowAndPlaceFloat(nsIFrame* aFloat)
|
||||
BlockReflowInput::FlowAndPlaceFloat(nsIFrame* aFloat)
|
||||
{
|
||||
WritingMode wm = mReflowState.GetWritingMode();
|
||||
// Save away the Y coordinate before placing the float. We will
|
||||
|
@ -1029,7 +1029,7 @@ nsBlockReflowState::FlowAndPlaceFloat(nsIFrame* aFloat)
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockReflowState::PushFloatPastBreak(nsIFrame *aFloat)
|
||||
BlockReflowInput::PushFloatPastBreak(nsIFrame *aFloat)
|
||||
{
|
||||
// This ensures that we:
|
||||
// * don't try to place later but smaller floats (which CSS says
|
||||
|
@ -1057,7 +1057,7 @@ nsBlockReflowState::PushFloatPastBreak(nsIFrame *aFloat)
|
|||
* Place below-current-line floats.
|
||||
*/
|
||||
void
|
||||
nsBlockReflowState::PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aList,
|
||||
BlockReflowInput::PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aList,
|
||||
nsLineBox* aLine)
|
||||
{
|
||||
nsFloatCache* fc = aList.Head();
|
||||
|
@ -1083,7 +1083,7 @@ nsBlockReflowState::PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aList,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsBlockReflowState::ClearFloats(nscoord aBCoord, uint8_t aBreakType,
|
||||
BlockReflowInput::ClearFloats(nscoord aBCoord, uint8_t aBreakType,
|
||||
nsIFrame *aReplacedBlock,
|
||||
uint32_t aFlags)
|
||||
{
|
||||
|
@ -1095,7 +1095,7 @@ nsBlockReflowState::ClearFloats(nscoord aBCoord, uint8_t aBreakType,
|
|||
#endif
|
||||
|
||||
#ifdef NOISY_FLOAT_CLEARING
|
||||
printf("nsBlockReflowState::ClearFloats: aBCoord=%d breakType=%d\n",
|
||||
printf("BlockReflowInput::ClearFloats: aBCoord=%d breakType=%d\n",
|
||||
aBCoord, aBreakType);
|
||||
mFloatManager->List(stdout);
|
||||
#endif
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
/* state used in reflow of block frames */
|
||||
|
||||
#ifndef nsBlockReflowState_h
|
||||
#define nsBlockReflowState_h
|
||||
#ifndef BlockReflowInput_h
|
||||
#define BlockReflowInput_h
|
||||
|
||||
#include "nsFloatManager.h"
|
||||
#include "nsLineBox.h"
|
||||
|
@ -18,19 +18,19 @@ class nsOverflowContinuationTracker;
|
|||
|
||||
// Block reflow state flags.
|
||||
//
|
||||
// BRS_UNCONSTRAINEDBSIZE is set in the nsBlockReflowState constructor when the
|
||||
// BRS_UNCONSTRAINEDBSIZE is set in the BlockReflowInput constructor when the
|
||||
// frame being reflowed has been given NS_UNCONSTRAINEDSIZE as its available
|
||||
// BSize in the ReflowInput. If set, NS_UNCONSTRAINEDSIZE is passed to
|
||||
// nsLineLayout as the available BSize.
|
||||
#define BRS_UNCONSTRAINEDBSIZE 0x00000001
|
||||
// BRS_ISBSTARTMARGINROOT is set in the nsBlockReflowState constructor when
|
||||
// BRS_ISBSTARTMARGINROOT is set in the BlockReflowInput constructor when
|
||||
// reflowing a "block margin root" frame (i.e. a frame with the
|
||||
// NS_BLOCK_MARGIN_ROOT flag set, for which margins apply by default).
|
||||
//
|
||||
// The flag is also set when reflowing a frame whose computed BStart border
|
||||
// padding is non-zero.
|
||||
#define BRS_ISBSTARTMARGINROOT 0x00000002
|
||||
// BRS_ISBENDMARGINROOT is set in the nsBlockReflowState constructor when
|
||||
// BRS_ISBENDMARGINROOT is set in the BlockReflowInput constructor when
|
||||
// reflowing a "block margin root" frame (i.e. a frame with the
|
||||
// NS_BLOCK_MARGIN_ROOT flag set, for which margins apply by default).
|
||||
//
|
||||
|
@ -52,7 +52,7 @@ class nsOverflowContinuationTracker;
|
|||
// won't be set, so subsequent calls to ShouldApplyBStartMargin() will continue
|
||||
// crawl the line list.)
|
||||
//
|
||||
// This flag is also set in the nsBlockReflowState constructor if
|
||||
// This flag is also set in the BlockReflowInput constructor if
|
||||
// BRS_ISBSTARTMARGINROOT is set; that is, the frame being reflowed is a margin
|
||||
// root by default.
|
||||
#define BRS_APPLYBSTARTMARGIN 0x00000008
|
||||
|
@ -73,14 +73,14 @@ class nsOverflowContinuationTracker;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
// nsBlockReflowState contains additional reflow state information that the
|
||||
// BlockReflowInput contains additional reflow state information that the
|
||||
// block frame uses along with ReflowInput. Like ReflowInput, this
|
||||
// is read-only data that is passed down from a parent frame to its children.
|
||||
class nsBlockReflowState {
|
||||
class BlockReflowInput {
|
||||
using ReflowInput = mozilla::ReflowInput;
|
||||
|
||||
public:
|
||||
nsBlockReflowState(const ReflowInput& aReflowState,
|
||||
BlockReflowInput(const ReflowInput& aReflowState,
|
||||
nsPresContext* aPresContext,
|
||||
nsBlockFrame* aFrame,
|
||||
bool aBStartMarginRoot, bool aBEndMarginRoot,
|
||||
|
@ -382,4 +382,4 @@ private:
|
|||
|
||||
}; // namespace mozilla
|
||||
|
||||
#endif // nsBlockReflowState_h
|
||||
#endif // BlockReflowInput_h
|
||||
|
|
|
@ -1102,7 +1102,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
|||
|
||||
// Cache the consumed height in the block reflow state so that we don't have
|
||||
// to continually recompute it.
|
||||
nsBlockReflowState state(*reflowState, aPresContext, this,
|
||||
BlockReflowInput state(*reflowState, aPresContext, this,
|
||||
blockStartMarginRoot, blockEndMarginRoot,
|
||||
needFloatManager, consumedBSize);
|
||||
|
||||
|
@ -1273,7 +1273,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
|||
// lines that were placed relative to mContainerSize during reflow, as
|
||||
// we typically do not know the true container size until we've reflowed all
|
||||
// its children. So we use a dummy mContainerSize during reflow (see
|
||||
// nsBlockReflowState's constructor) and then fix up the positions of the
|
||||
// BlockReflowInput's constructor) and then fix up the positions of the
|
||||
// lines here, once the final block size is known.
|
||||
//
|
||||
// Note that writing-mode:vertical-rl is the only case where the block
|
||||
|
@ -1477,7 +1477,7 @@ nsBlockFrame::CheckForCollapsedBEndMarginFromClearanceLine()
|
|||
|
||||
void
|
||||
nsBlockFrame::ComputeFinalSize(const ReflowInput& aReflowState,
|
||||
nsBlockReflowState& aState,
|
||||
BlockReflowInput& aState,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
nscoord* aBEndEdgeOfChildren)
|
||||
{
|
||||
|
@ -1848,7 +1848,7 @@ IsAlignedLeft(uint8_t aAlignment,
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState)
|
||||
nsBlockFrame::PrepareResizeReflow(BlockReflowInput& aState)
|
||||
{
|
||||
// See if we can try and avoid marking all the lines as dirty
|
||||
bool tryAndSkipLines =
|
||||
|
@ -1951,7 +1951,7 @@ nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState)
|
|||
* doesn't get marked dirty and reflowed entirely).
|
||||
*/
|
||||
void
|
||||
nsBlockFrame::PropagateFloatDamage(nsBlockReflowState& aState,
|
||||
nsBlockFrame::PropagateFloatDamage(BlockReflowInput& aState,
|
||||
nsLineBox* aLine,
|
||||
nscoord aDeltaBCoord)
|
||||
{
|
||||
|
@ -2050,7 +2050,7 @@ nsBlockFrame::ReparentFloats(nsIFrame* aFirstFrame, nsBlockFrame* aOldParent,
|
|||
}
|
||||
}
|
||||
|
||||
static void DumpLine(const nsBlockReflowState& aState, nsLineBox* aLine,
|
||||
static void DumpLine(const BlockReflowInput& aState, nsLineBox* aLine,
|
||||
nscoord aDeltaBCoord, int32_t aDeltaIndent) {
|
||||
#ifdef DEBUG
|
||||
if (nsBlockFrame::gNoisyReflow) {
|
||||
|
@ -2070,7 +2070,7 @@ static void DumpLine(const nsBlockReflowState& aState, nsLineBox* aLine,
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
|
||||
nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState)
|
||||
{
|
||||
bool keepGoing = true;
|
||||
bool repositionViews = false; // should we really need this?
|
||||
|
@ -2709,7 +2709,7 @@ nsBlockFrame::MarkLineDirtyForInterrupt(nsLineBox* aLine)
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockFrame::DeleteLine(nsBlockReflowState& aState,
|
||||
nsBlockFrame::DeleteLine(BlockReflowInput& aState,
|
||||
nsLineList::iterator aLine,
|
||||
nsLineList::iterator aLineEnd)
|
||||
{
|
||||
|
@ -2734,7 +2734,7 @@ nsBlockFrame::DeleteLine(nsBlockReflowState& aState,
|
|||
* whether or not the caller should continue to reflow more lines.
|
||||
*/
|
||||
void
|
||||
nsBlockFrame::ReflowLine(nsBlockReflowState& aState,
|
||||
nsBlockFrame::ReflowLine(BlockReflowInput& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepReflowGoing)
|
||||
{
|
||||
|
@ -2756,7 +2756,7 @@ nsBlockFrame::ReflowLine(nsBlockReflowState& aState,
|
|||
}
|
||||
|
||||
nsIFrame*
|
||||
nsBlockFrame::PullFrame(nsBlockReflowState& aState,
|
||||
nsBlockFrame::PullFrame(BlockReflowInput& aState,
|
||||
line_iterator aLine)
|
||||
{
|
||||
// First check our remaining lines.
|
||||
|
@ -2853,7 +2853,7 @@ nsBlockFrame::PullFrameFrom(nsLineBox* aLine,
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockFrame::SlideLine(nsBlockReflowState& aState,
|
||||
nsBlockFrame::SlideLine(BlockReflowInput& aState,
|
||||
nsLineBox* aLine, nscoord aDeltaBCoord)
|
||||
{
|
||||
NS_PRECONDITION(aDeltaBCoord != 0, "why slide a line nowhere?");
|
||||
|
@ -3069,7 +3069,7 @@ nsBlockFrame::IsEmpty()
|
|||
}
|
||||
|
||||
bool
|
||||
nsBlockFrame::ShouldApplyBStartMargin(nsBlockReflowState& aState,
|
||||
nsBlockFrame::ShouldApplyBStartMargin(BlockReflowInput& aState,
|
||||
nsLineBox* aLine,
|
||||
nsIFrame* aChildFrame)
|
||||
{
|
||||
|
@ -3114,7 +3114,7 @@ nsBlockFrame::ShouldApplyBStartMargin(nsBlockReflowState& aState,
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
||||
nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepReflowGoing)
|
||||
{
|
||||
|
@ -3712,7 +3712,7 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockFrame::ReflowInlineFrames(nsBlockReflowState& aState,
|
||||
nsBlockFrame::ReflowInlineFrames(BlockReflowInput& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepReflowGoing)
|
||||
{
|
||||
|
@ -3787,7 +3787,7 @@ nsBlockFrame::ReflowInlineFrames(nsBlockReflowState& aState,
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockFrame::PushTruncatedLine(nsBlockReflowState& aState,
|
||||
nsBlockFrame::PushTruncatedLine(BlockReflowInput& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepReflowGoing)
|
||||
{
|
||||
|
@ -3805,7 +3805,7 @@ static const char* LineReflowStatusNames[] = {
|
|||
#endif
|
||||
|
||||
void
|
||||
nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState& aState,
|
||||
nsBlockFrame::DoReflowInlineFrames(BlockReflowInput& aState,
|
||||
nsLineLayout& aLineLayout,
|
||||
line_iterator aLine,
|
||||
nsFlowAreaRect& aFloatAvailableSpace,
|
||||
|
@ -3972,7 +3972,7 @@ nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState& aState,
|
|||
aFloatAvailableSpace.mRect.BSize(outerWM),
|
||||
"unconstrained block size on totally empty line");
|
||||
|
||||
// See the analogous code for blocks in nsBlockReflowState::ClearFloats.
|
||||
// See the analogous code for blocks in BlockReflowInput::ClearFloats.
|
||||
if (aFloatAvailableSpace.mRect.BSize(outerWM) > 0) {
|
||||
NS_ASSERTION(aFloatAvailableSpace.mHasFloats,
|
||||
"redo line on totally empty line with non-empty band...");
|
||||
|
@ -4061,7 +4061,7 @@ nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState& aState,
|
|||
* to something other than NS_STYLE_CLEAR_NONE.
|
||||
*/
|
||||
void
|
||||
nsBlockFrame::ReflowInlineFrame(nsBlockReflowState& aState,
|
||||
nsBlockFrame::ReflowInlineFrame(BlockReflowInput& aState,
|
||||
nsLineLayout& aLineLayout,
|
||||
line_iterator aLine,
|
||||
nsIFrame* aFrame,
|
||||
|
@ -4202,7 +4202,7 @@ nsBlockFrame::ReflowInlineFrame(nsBlockReflowState& aState,
|
|||
}
|
||||
|
||||
bool
|
||||
nsBlockFrame::CreateContinuationFor(nsBlockReflowState& aState,
|
||||
nsBlockFrame::CreateContinuationFor(BlockReflowInput& aState,
|
||||
nsLineBox* aLine,
|
||||
nsIFrame* aFrame)
|
||||
{
|
||||
|
@ -4225,7 +4225,7 @@ nsBlockFrame::CreateContinuationFor(nsBlockReflowState& aState,
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsBlockFrame::SplitFloat(nsBlockReflowState& aState,
|
||||
nsBlockFrame::SplitFloat(BlockReflowInput& aState,
|
||||
nsIFrame* aFloat,
|
||||
nsReflowStatus aFloatStatus)
|
||||
{
|
||||
|
@ -4296,7 +4296,7 @@ CheckPlaceholderInLine(nsIFrame* aBlock, nsLineBox* aLine, nsFloatCache* aFC)
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockFrame::SplitLine(nsBlockReflowState& aState,
|
||||
nsBlockFrame::SplitLine(BlockReflowInput& aState,
|
||||
nsLineLayout& aLineLayout,
|
||||
line_iterator aLine,
|
||||
nsIFrame* aFrame,
|
||||
|
@ -4370,7 +4370,7 @@ nsBlockFrame::SplitLine(nsBlockReflowState& aState,
|
|||
}
|
||||
|
||||
bool
|
||||
nsBlockFrame::IsLastLine(nsBlockReflowState& aState,
|
||||
nsBlockFrame::IsLastLine(BlockReflowInput& aState,
|
||||
line_iterator aLine)
|
||||
{
|
||||
while (++aLine != end_lines()) {
|
||||
|
@ -4403,7 +4403,7 @@ nsBlockFrame::IsLastLine(nsBlockReflowState& aState,
|
|||
}
|
||||
|
||||
bool
|
||||
nsBlockFrame::PlaceLine(nsBlockReflowState& aState,
|
||||
nsBlockFrame::PlaceLine(BlockReflowInput& aState,
|
||||
nsLineLayout& aLineLayout,
|
||||
line_iterator aLine,
|
||||
nsFloatManager::SavedState *aFloatStateBeforeLine,
|
||||
|
@ -4615,7 +4615,7 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState,
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockFrame::PushLines(nsBlockReflowState& aState,
|
||||
nsBlockFrame::PushLines(BlockReflowInput& aState,
|
||||
nsLineList::iterator aLineBefore)
|
||||
{
|
||||
// NOTE: aLineBefore is always a normal line, not an overflow line.
|
||||
|
@ -4809,7 +4809,7 @@ nsBlockFrame::DrainSelfOverflowList()
|
|||
* DrainPushedFloats sets up pushed floats the way we need them at the
|
||||
* start of reflow; they are then reflowed by ReflowPushedFloats (which
|
||||
* might push some of them on). Floats with placeholders in this block
|
||||
* are reflowed by (nsBlockReflowState/nsLineLayout)::AddFloat, which
|
||||
* are reflowed by (BlockReflowInput/nsLineLayout)::AddFloat, which
|
||||
* also maintains these invariants.
|
||||
*
|
||||
* DrainSelfPushedFloats moves any pushed floats from this block's own
|
||||
|
@ -5372,7 +5372,7 @@ nsBlockFrame::RemoveFloat(nsIFrame* aFloat)
|
|||
nsFrameList* list = GetPushedFloats();
|
||||
if (list && list->ContinueRemoveFrame(aFloat)) {
|
||||
#if 0
|
||||
// XXXmats not yet - need to investigate nsBlockReflowState::mPushedFloats
|
||||
// XXXmats not yet - need to investigate BlockReflowInput::mPushedFloats
|
||||
// first so we don't leave it pointing to a deleted list.
|
||||
if (list->IsEmpty()) {
|
||||
delete RemovePushedFloats();
|
||||
|
@ -6042,7 +6042,7 @@ nsBlockFrame::StyleTextForLineLayout()
|
|||
// Float support
|
||||
|
||||
LogicalRect
|
||||
nsBlockFrame::AdjustFloatAvailableSpace(nsBlockReflowState& aState,
|
||||
nsBlockFrame::AdjustFloatAvailableSpace(BlockReflowInput& aState,
|
||||
const LogicalRect& aFloatAvailableSpace,
|
||||
nsIFrame* aFloatFrame)
|
||||
{
|
||||
|
@ -6057,7 +6057,7 @@ nsBlockFrame::AdjustFloatAvailableSpace(nsBlockReflowState& aState,
|
|||
availISize = aState.ContentISize();
|
||||
}
|
||||
else {
|
||||
// This quirk matches the one in nsBlockReflowState::FlowAndPlaceFloat
|
||||
// This quirk matches the one in BlockReflowInput::FlowAndPlaceFloat
|
||||
// give tables only the available space
|
||||
// if they can shrink we may not be constrained to place
|
||||
// them in the next line
|
||||
|
@ -6083,7 +6083,7 @@ nsBlockFrame::AdjustFloatAvailableSpace(nsBlockReflowState& aState,
|
|||
}
|
||||
|
||||
nscoord
|
||||
nsBlockFrame::ComputeFloatISize(nsBlockReflowState& aState,
|
||||
nsBlockFrame::ComputeFloatISize(BlockReflowInput& aState,
|
||||
const LogicalRect& aFloatAvailableSpace,
|
||||
nsIFrame* aFloat)
|
||||
{
|
||||
|
@ -6104,7 +6104,7 @@ nsBlockFrame::ComputeFloatISize(nsBlockReflowState& aState,
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockFrame::ReflowFloat(nsBlockReflowState& aState,
|
||||
nsBlockFrame::ReflowFloat(BlockReflowInput& aState,
|
||||
const LogicalRect& aAdjustedAvailableSpace,
|
||||
nsIFrame* aFloat,
|
||||
LogicalMargin& aFloatMargin,
|
||||
|
@ -6209,7 +6209,7 @@ nsBlockFrame::ReflowFloat(nsBlockReflowState& aState,
|
|||
// Set the rect, make sure the view is properly sized and positioned,
|
||||
// and tell the frame we're done reflowing it
|
||||
// XXXldb This seems like the wrong place to be doing this -- shouldn't
|
||||
// we be doing this in nsBlockReflowState::FlowAndPlaceFloat after
|
||||
// we be doing this in BlockReflowInput::FlowAndPlaceFloat after
|
||||
// we've positioned the float, and shouldn't we be doing the equivalent
|
||||
// of |PlaceFrameView| here?
|
||||
WritingMode metricsWM = metrics.GetWritingMode();
|
||||
|
@ -6246,7 +6246,7 @@ nsBlockFrame::FindTrailingClear()
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockFrame::ReflowPushedFloats(nsBlockReflowState& aState,
|
||||
nsBlockFrame::ReflowPushedFloats(BlockReflowInput& aState,
|
||||
nsOverflowAreas& aOverflowAreas,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
|
@ -7172,7 +7172,7 @@ nsBlockFrame::RenumberListsFor(nsPresContext* aPresContext,
|
|||
|
||||
void
|
||||
nsBlockFrame::ReflowBullet(nsIFrame* aBulletFrame,
|
||||
nsBlockReflowState& aState,
|
||||
BlockReflowInput& aState,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
nscoord aLineTop)
|
||||
{
|
||||
|
@ -7277,7 +7277,7 @@ nsBlockFrame::DoCollectFloats(nsIFrame* aFrame, nsFrameList& aList,
|
|||
}
|
||||
|
||||
void
|
||||
nsBlockFrame::CheckFloats(nsBlockReflowState& aState)
|
||||
nsBlockFrame::CheckFloats(BlockReflowInput& aState)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
// If any line is still dirty, that must mean we're going to reflow this
|
||||
|
@ -7392,7 +7392,7 @@ nsBlockFrame::BlockCanIntersectFloats(nsIFrame* aFrame)
|
|||
// matter.
|
||||
/* static */
|
||||
nsBlockFrame::ReplacedElementISizeToClear
|
||||
nsBlockFrame::ISizeToClearPastFloats(const nsBlockReflowState& aState,
|
||||
nsBlockFrame::ISizeToClearPastFloats(const BlockReflowInput& aState,
|
||||
const LogicalRect& aFloatAvailableSpace,
|
||||
nsIFrame* aFrame)
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ enum LineReflowStatus {
|
|||
class nsBlockInFlowLineIterator;
|
||||
class nsBulletFrame;
|
||||
namespace mozilla {
|
||||
class nsBlockReflowState;
|
||||
class BlockReflowInput;
|
||||
} // namespace mozilla
|
||||
|
||||
/**
|
||||
|
@ -77,7 +77,7 @@ class nsBlockReflowState;
|
|||
*/
|
||||
class nsBlockFrame : public nsContainerFrame
|
||||
{
|
||||
using nsBlockReflowState = mozilla::nsBlockReflowState;
|
||||
using BlockReflowInput = mozilla::BlockReflowInput;
|
||||
|
||||
public:
|
||||
NS_DECL_QUERYFRAME_TARGET(nsBlockFrame)
|
||||
|
@ -297,7 +297,7 @@ public:
|
|||
*/
|
||||
bool CheckForCollapsedBEndMarginFromClearanceLine();
|
||||
|
||||
static nsresult GetCurrentLine(nsBlockReflowState *aState, nsLineBox **aOutCurrentLine);
|
||||
static nsresult GetCurrentLine(BlockReflowInput *aState, nsLineBox **aOutCurrentLine);
|
||||
|
||||
/**
|
||||
* Determine if this block is a margin root at the top/bottom edges.
|
||||
|
@ -325,7 +325,7 @@ public:
|
|||
nscoord marginIStart, borderBoxISize;
|
||||
};
|
||||
static ReplacedElementISizeToClear
|
||||
ISizeToClearPastFloats(const nsBlockReflowState& aState,
|
||||
ISizeToClearPastFloats(const BlockReflowInput& aState,
|
||||
const mozilla::LogicalRect& aFloatAvailableSpace,
|
||||
nsIFrame* aFrame);
|
||||
|
||||
|
@ -336,7 +336,7 @@ public:
|
|||
* aFloatStatus must be the float's true, unmodified reflow status.
|
||||
*
|
||||
*/
|
||||
nsresult SplitFloat(nsBlockReflowState& aState,
|
||||
nsresult SplitFloat(BlockReflowInput& aState,
|
||||
nsIFrame* aFloat,
|
||||
nsReflowStatus aFloatStatus);
|
||||
|
||||
|
@ -405,7 +405,7 @@ protected:
|
|||
/** move the frames contained by aLine by aDeltaBCoord
|
||||
* if aLine is a block, its child floats are added to the state manager
|
||||
*/
|
||||
void SlideLine(nsBlockReflowState& aState,
|
||||
void SlideLine(BlockReflowInput& aState,
|
||||
nsLineBox* aLine, nscoord aDeltaBCoord);
|
||||
|
||||
void UpdateLineContainerSize(nsLineBox* aLine,
|
||||
|
@ -415,7 +415,7 @@ protected:
|
|||
void MoveChildFramesOfLine(nsLineBox* aLine, nscoord aDeltaBCoord);
|
||||
|
||||
void ComputeFinalSize(const ReflowInput& aReflowState,
|
||||
nsBlockReflowState& aState,
|
||||
BlockReflowInput& aState,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
nscoord* aBottomEdgeOfChildren);
|
||||
|
||||
|
@ -566,7 +566,7 @@ protected:
|
|||
|
||||
/** Reflow pushed floats
|
||||
*/
|
||||
void ReflowPushedFloats(nsBlockReflowState& aState,
|
||||
void ReflowPushedFloats(BlockReflowInput& aState,
|
||||
nsOverflowAreas& aOverflowAreas,
|
||||
nsReflowStatus& aStatus);
|
||||
|
||||
|
@ -598,10 +598,10 @@ protected:
|
|||
/** set up the conditions necessary for an resize reflow
|
||||
* the primary task is to mark the minimumly sufficient lines dirty.
|
||||
*/
|
||||
void PrepareResizeReflow(nsBlockReflowState& aState);
|
||||
void PrepareResizeReflow(BlockReflowInput& aState);
|
||||
|
||||
/** reflow all lines that have been marked dirty */
|
||||
void ReflowDirtyLines(nsBlockReflowState& aState);
|
||||
void ReflowDirtyLines(BlockReflowInput& aState);
|
||||
|
||||
/** Mark a given line dirty due to reflow being interrupted on or before it */
|
||||
void MarkLineDirtyForInterrupt(nsLineBox* aLine);
|
||||
|
@ -615,14 +615,14 @@ protected:
|
|||
* or contain 1 or more inline frames.
|
||||
* @param aKeepReflowGoing [OUT] indicates whether the caller should continue to reflow more lines
|
||||
*/
|
||||
void ReflowLine(nsBlockReflowState& aState,
|
||||
void ReflowLine(BlockReflowInput& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepReflowGoing);
|
||||
|
||||
// Return false if it needs another reflow because of reduced space
|
||||
// between floats that are next to it (but not next to its top), and
|
||||
// return true otherwise.
|
||||
bool PlaceLine(nsBlockReflowState& aState,
|
||||
bool PlaceLine(BlockReflowInput& aState,
|
||||
nsLineLayout& aLineLayout,
|
||||
line_iterator aLine,
|
||||
nsFloatManager::SavedState* aFloatStateBeforeLine,
|
||||
|
@ -647,29 +647,29 @@ protected:
|
|||
void MarkLineDirty(line_iterator aLine, const nsLineList* aLineList);
|
||||
|
||||
// XXX where to go
|
||||
bool IsLastLine(nsBlockReflowState& aState,
|
||||
bool IsLastLine(BlockReflowInput& aState,
|
||||
line_iterator aLine);
|
||||
|
||||
void DeleteLine(nsBlockReflowState& aState,
|
||||
void DeleteLine(BlockReflowInput& aState,
|
||||
nsLineList::iterator aLine,
|
||||
nsLineList::iterator aLineEnd);
|
||||
|
||||
//----------------------------------------
|
||||
// Methods for individual frame reflow
|
||||
|
||||
bool ShouldApplyBStartMargin(nsBlockReflowState& aState,
|
||||
bool ShouldApplyBStartMargin(BlockReflowInput& aState,
|
||||
nsLineBox* aLine,
|
||||
nsIFrame* aChildFrame);
|
||||
|
||||
void ReflowBlockFrame(nsBlockReflowState& aState,
|
||||
void ReflowBlockFrame(BlockReflowInput& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepGoing);
|
||||
|
||||
void ReflowInlineFrames(nsBlockReflowState& aState,
|
||||
void ReflowInlineFrames(BlockReflowInput& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepLineGoing);
|
||||
|
||||
void DoReflowInlineFrames(nsBlockReflowState& aState,
|
||||
void DoReflowInlineFrames(BlockReflowInput& aState,
|
||||
nsLineLayout& aLineLayout,
|
||||
line_iterator aLine,
|
||||
nsFlowAreaRect& aFloatAvailableSpace,
|
||||
|
@ -680,7 +680,7 @@ protected:
|
|||
LineReflowStatus* aLineReflowStatus,
|
||||
bool aAllowPullUp);
|
||||
|
||||
void ReflowInlineFrame(nsBlockReflowState& aState,
|
||||
void ReflowInlineFrame(BlockReflowInput& aState,
|
||||
nsLineLayout& aLineLayout,
|
||||
line_iterator aLine,
|
||||
nsIFrame* aFrame,
|
||||
|
@ -688,18 +688,18 @@ protected:
|
|||
|
||||
// Compute the available inline size for a float.
|
||||
mozilla::LogicalRect AdjustFloatAvailableSpace(
|
||||
nsBlockReflowState& aState,
|
||||
BlockReflowInput& aState,
|
||||
const mozilla::LogicalRect& aFloatAvailableSpace,
|
||||
nsIFrame* aFloatFrame);
|
||||
// Computes the border-box inline size of the float
|
||||
nscoord ComputeFloatISize(nsBlockReflowState& aState,
|
||||
nscoord ComputeFloatISize(BlockReflowInput& aState,
|
||||
const mozilla::LogicalRect& aFloatAvailableSpace,
|
||||
nsIFrame* aFloat);
|
||||
// An incomplete aReflowStatus indicates the float should be split
|
||||
// but only if the available height is constrained.
|
||||
// aAdjustedAvailableSpace is the result of calling
|
||||
// nsBlockFrame::AdjustFloatAvailableSpace.
|
||||
void ReflowFloat(nsBlockReflowState& aState,
|
||||
void ReflowFloat(BlockReflowInput& aState,
|
||||
const mozilla::LogicalRect& aAdjustedAvailableSpace,
|
||||
nsIFrame* aFloat,
|
||||
mozilla::LogicalMargin& aFloatMargin,
|
||||
|
@ -721,7 +721,7 @@ protected:
|
|||
* @param aFrame the frame
|
||||
* @return true if a new frame was created, false if not
|
||||
*/
|
||||
bool CreateContinuationFor(nsBlockReflowState& aState,
|
||||
bool CreateContinuationFor(BlockReflowInput& aState,
|
||||
nsLineBox* aLine,
|
||||
nsIFrame* aFrame);
|
||||
|
||||
|
@ -730,11 +730,11 @@ protected:
|
|||
* page/column. Set aKeepReflowGoing to false and set
|
||||
* flag aState.mReflowStatus as incomplete.
|
||||
*/
|
||||
void PushTruncatedLine(nsBlockReflowState& aState,
|
||||
void PushTruncatedLine(BlockReflowInput& aState,
|
||||
line_iterator aLine,
|
||||
bool* aKeepReflowGoing);
|
||||
|
||||
void SplitLine(nsBlockReflowState& aState,
|
||||
void SplitLine(BlockReflowInput& aState,
|
||||
nsLineLayout& aLineLayout,
|
||||
line_iterator aLine,
|
||||
nsIFrame* aFrame,
|
||||
|
@ -745,7 +745,7 @@ protected:
|
|||
* one of our next-in-flows lines).
|
||||
* @return the pulled frame or nullptr
|
||||
*/
|
||||
nsIFrame* PullFrame(nsBlockReflowState& aState,
|
||||
nsIFrame* PullFrame(BlockReflowInput& aState,
|
||||
line_iterator aLine);
|
||||
|
||||
/**
|
||||
|
@ -769,14 +769,14 @@ protected:
|
|||
* @param aLineBefore a line in 'mLines' (or begin_lines() when
|
||||
* pushing the first line)
|
||||
*/
|
||||
void PushLines(nsBlockReflowState& aState,
|
||||
void PushLines(BlockReflowInput& aState,
|
||||
nsLineList::iterator aLineBefore);
|
||||
|
||||
void PropagateFloatDamage(nsBlockReflowState& aState,
|
||||
void PropagateFloatDamage(BlockReflowInput& aState,
|
||||
nsLineBox* aLine,
|
||||
nscoord aDeltaBCoord);
|
||||
|
||||
void CheckFloats(nsBlockReflowState& aState);
|
||||
void CheckFloats(BlockReflowInput& aState);
|
||||
|
||||
//----------------------------------------
|
||||
// List handling kludge
|
||||
|
@ -800,7 +800,7 @@ protected:
|
|||
static bool FrameStartsCounterScope(nsIFrame* aFrame);
|
||||
|
||||
void ReflowBullet(nsIFrame* aBulletFrame,
|
||||
nsBlockReflowState& aState,
|
||||
BlockReflowInput& aState,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
nscoord aLineTop);
|
||||
|
||||
|
@ -892,7 +892,7 @@ protected:
|
|||
// XXXmats blocks rarely have floats, make it a frame property
|
||||
nsFrameList mFloats;
|
||||
|
||||
friend class mozilla::nsBlockReflowState;
|
||||
friend class mozilla::BlockReflowInput;
|
||||
friend class nsBlockInFlowLineIterator;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -229,7 +229,7 @@ nsBlockReflowContext::ReflowBlock(const LogicalRect& aSpace,
|
|||
nsLineBox* aLine,
|
||||
ReflowInput& aFrameRS,
|
||||
nsReflowStatus& aFrameReflowStatus,
|
||||
nsBlockReflowState& aState)
|
||||
BlockReflowInput& aState)
|
||||
{
|
||||
mFrame = aFrameRS.frame;
|
||||
mWritingMode = aState.mReflowState.GetWritingMode();
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
class nsLineBox;
|
||||
class nsPresContext;
|
||||
namespace mozilla {
|
||||
class nsBlockReflowState;
|
||||
class BlockReflowInput;
|
||||
} // namespace mozilla
|
||||
|
||||
/**
|
||||
* An encapsulation of the state and algorithm for reflowing block frames.
|
||||
*/
|
||||
class nsBlockReflowContext {
|
||||
using nsBlockReflowState = mozilla::nsBlockReflowState;
|
||||
using BlockReflowInput = mozilla::BlockReflowInput;
|
||||
using ReflowInput = mozilla::ReflowInput;
|
||||
|
||||
public:
|
||||
|
@ -38,7 +38,7 @@ public:
|
|||
nsLineBox* aLine,
|
||||
ReflowInput& aReflowState,
|
||||
nsReflowStatus& aReflowStatus,
|
||||
nsBlockReflowState& aState);
|
||||
BlockReflowInput& aState);
|
||||
|
||||
bool PlaceBlock(const ReflowInput& aReflowState,
|
||||
bool aForceFit,
|
||||
|
|
|
@ -467,7 +467,7 @@ FRAME_STATE_BIT(Block, 21, NS_BLOCK_HAS_PUSHED_FLOATS)
|
|||
// nsBlockReflowContext::ComputeCollapsedBStartMargin() via
|
||||
// nsBlockFrame::IsMarginRoot().
|
||||
//
|
||||
// This causes the nsBlockReflowState's constructor to set the
|
||||
// This causes the BlockReflowInput's constructor to set the
|
||||
// BRS_ISBSTARTMARGINROOT and BRS_ISBENDMARGINROOT flags.
|
||||
FRAME_STATE_BIT(Block, 22, NS_BLOCK_MARGIN_ROOT)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class nsFloatManager;
|
|||
struct nsStyleText;
|
||||
|
||||
class nsLineLayout {
|
||||
using nsBlockReflowState = mozilla::nsBlockReflowState;
|
||||
using BlockReflowInput = mozilla::BlockReflowInput;
|
||||
using ReflowInput = mozilla::ReflowInput;
|
||||
|
||||
public:
|
||||
|
@ -43,7 +43,7 @@ public:
|
|||
nsLineLayout* aBaseLineLayout);
|
||||
~nsLineLayout();
|
||||
|
||||
void Init(nsBlockReflowState* aState, nscoord aMinLineBSize,
|
||||
void Init(BlockReflowInput* aState, nscoord aMinLineBSize,
|
||||
int32_t aLineNumber) {
|
||||
mBlockRS = aState;
|
||||
mMinLineBSize = aMinLineBSize;
|
||||
|
@ -411,7 +411,7 @@ protected:
|
|||
// member. It should not be a problem currently, since the only
|
||||
// code use it is handling float, which does not affect ruby.
|
||||
// See comment in nsLineLayout::AddFloat
|
||||
nsBlockReflowState* mBlockRS;/* XXX hack! */
|
||||
BlockReflowInput* mBlockRS;/* XXX hack! */
|
||||
|
||||
nsLineList::iterator mLineBox;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче