зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1291110 Part 2 - Rename availableSpaceHeight to availableSpaceBSize. r=dbaron
Rename to make the variable name consistent with the writing-mode terminology used in PlaceLine(). MozReview-Commit-ID: AvhwHyHz7hV --HG-- extra : rebase_source : bcec67d9959c1b881b4d287dbbab47dd0d6e0de9
This commit is contained in:
Родитель
bb1491fb5a
Коммит
76dba9d5d5
|
@ -3765,7 +3765,7 @@ nsBlockFrame::ReflowInlineFrames(BlockReflowInput& aState,
|
|||
|
||||
LineReflowStatus lineReflowStatus;
|
||||
do {
|
||||
nscoord availableSpaceHeight = 0;
|
||||
nscoord availableSpaceBSize = 0;
|
||||
do {
|
||||
bool allowPullUp = true;
|
||||
nsIFrame* forceBreakInFrame = nullptr;
|
||||
|
@ -3790,7 +3790,7 @@ nsBlockFrame::ReflowInlineFrames(BlockReflowInput& aState,
|
|||
lineLayout.ForceBreakAtPosition(forceBreakInFrame, forceBreakOffset);
|
||||
}
|
||||
DoReflowInlineFrames(aState, lineLayout, aLine,
|
||||
floatAvailableSpace, availableSpaceHeight,
|
||||
floatAvailableSpace, availableSpaceBSize,
|
||||
&floatManagerState, aKeepReflowGoing,
|
||||
&lineReflowStatus, allowPullUp);
|
||||
lineLayout.EndLineReflow();
|
||||
|
@ -3837,7 +3837,7 @@ nsBlockFrame::DoReflowInlineFrames(BlockReflowInput& aState,
|
|||
nsLineLayout& aLineLayout,
|
||||
LineIterator aLine,
|
||||
nsFlowAreaRect& aFloatAvailableSpace,
|
||||
nscoord& aAvailableSpaceHeight,
|
||||
nscoord& aAvailableSpaceBSize,
|
||||
nsFloatManager::SavedState*
|
||||
aFloatStateBeforeLine,
|
||||
bool* aKeepReflowGoing,
|
||||
|
@ -4044,7 +4044,7 @@ nsBlockFrame::DoReflowInlineFrames(BlockReflowInput& aState,
|
|||
// no point in placing the line.
|
||||
if (!NS_INLINE_IS_BREAK_BEFORE(aState.mReflowStatus)) {
|
||||
if (!PlaceLine(aState, aLineLayout, aLine, aFloatStateBeforeLine,
|
||||
aFloatAvailableSpace.mRect, aAvailableSpaceHeight,
|
||||
aFloatAvailableSpace.mRect, aAvailableSpaceBSize,
|
||||
aKeepReflowGoing)) {
|
||||
lineReflowStatus = LineReflowStatus::RedoMoreFloats;
|
||||
// PlaceLine already called GetAvailableSpaceForBSize for us.
|
||||
|
@ -4432,12 +4432,12 @@ nsBlockFrame::IsLastLine(BlockReflowInput& aState,
|
|||
|
||||
bool
|
||||
nsBlockFrame::PlaceLine(BlockReflowInput& aState,
|
||||
nsLineLayout& aLineLayout,
|
||||
LineIterator aLine,
|
||||
nsLineLayout& aLineLayout,
|
||||
LineIterator aLine,
|
||||
nsFloatManager::SavedState *aFloatStateBeforeLine,
|
||||
LogicalRect& aFloatAvailableSpace,
|
||||
nscoord& aAvailableSpaceHeight,
|
||||
bool* aKeepReflowGoing)
|
||||
LogicalRect& aFloatAvailableSpace,
|
||||
nscoord& aAvailableSpaceBSize,
|
||||
bool* aKeepReflowGoing)
|
||||
{
|
||||
// Trim extra white-space from the line before placing the frames
|
||||
aLineLayout.TrimTrailingWhiteSpace();
|
||||
|
@ -4470,25 +4470,25 @@ nsBlockFrame::PlaceLine(BlockReflowInput& aState,
|
|||
aLineLayout.VerticalAlignLine();
|
||||
|
||||
// We want to compare to the available space that we would have had in
|
||||
// the line's height *before* we placed any floats in the line itself.
|
||||
// the line's BSize *before* we placed any floats in the line itself.
|
||||
// Floats that are in the line are handled during line reflow (and may
|
||||
// result in floats being pushed to below the line or (I HOPE???) in a
|
||||
// reflow with a forced break position).
|
||||
LogicalRect oldFloatAvailableSpace(aFloatAvailableSpace);
|
||||
// As we redo for floats, we can't reduce the amount of height we're
|
||||
// As we redo for floats, we can't reduce the amount of BSize we're
|
||||
// checking.
|
||||
aAvailableSpaceHeight = std::max(aAvailableSpaceHeight, aLine->BSize());
|
||||
aAvailableSpaceBSize = std::max(aAvailableSpaceBSize, aLine->BSize());
|
||||
aFloatAvailableSpace =
|
||||
aState.GetFloatAvailableSpaceForBSize(aLine->BStart(),
|
||||
aAvailableSpaceHeight,
|
||||
aAvailableSpaceBSize,
|
||||
aFloatStateBeforeLine).mRect;
|
||||
NS_ASSERTION(aFloatAvailableSpace.BStart(wm) ==
|
||||
oldFloatAvailableSpace.BStart(wm), "yikes");
|
||||
// Restore the height to the position of the next band.
|
||||
// Restore the BSize to the position of the next band.
|
||||
aFloatAvailableSpace.BSize(wm) = oldFloatAvailableSpace.BSize(wm);
|
||||
// If the available space between the floats is smaller now that we
|
||||
// know the height, return false (and cause another pass with
|
||||
// LineReflowStatus::RedoMoreFloats). We ensure aAvailableSpaceHeight
|
||||
// know the BSize, return false (and cause another pass with
|
||||
// LineReflowStatus::RedoMoreFloats). We ensure aAvailableSpaceBSize
|
||||
// never decreases, which means that we can't reduce the set of floats
|
||||
// we intersect, which means that the available space cannot grow.
|
||||
if (AvailableSpaceShrunk(wm, oldFloatAvailableSpace, aFloatAvailableSpace,
|
||||
|
|
|
@ -659,7 +659,7 @@ protected:
|
|||
LineIterator aLine,
|
||||
nsFloatManager::SavedState* aFloatStateBeforeLine,
|
||||
mozilla::LogicalRect& aFloatAvailableSpace, //in-out
|
||||
nscoord& aAvailableSpaceHeight, // in-out
|
||||
nscoord& aAvailableSpaceBSize, // in-out
|
||||
bool* aKeepReflowGoing);
|
||||
|
||||
/**
|
||||
|
@ -705,9 +705,8 @@ protected:
|
|||
nsLineLayout& aLineLayout,
|
||||
LineIterator aLine,
|
||||
nsFlowAreaRect& aFloatAvailableSpace,
|
||||
nscoord& aAvailableSpaceHeight,
|
||||
nsFloatManager::SavedState*
|
||||
aFloatStateBeforeLine,
|
||||
nscoord& aAvailableSpaceBSize,
|
||||
nsFloatManager::SavedState* aFloatStateBeforeLine,
|
||||
bool* aKeepReflowGoing,
|
||||
LineReflowStatus* aLineReflowStatus,
|
||||
bool aAllowPullUp);
|
||||
|
|
Загрузка…
Ссылка в новой задаче