Bug 1260031 followup - Remove unused parameter of BlockReflowInput::ComputeBlockAvailSpace. r=dbaron
MozReview-Commit-ID: 7ZZ0xw9l4YZ
--- a/layout/generic/BlockReflowInput.cpp
+++ b/layout/generic/BlockReflowInput.cpp
@@ -217,20 +217,19 @@ GetBEndMarginClone(nsIFrame* aFrame,
return 0;
}
// Compute the amount of available space for reflowing a block frame
// at the current Y coordinate. This method assumes that
// GetAvailableSpace has already been called.
void
BlockReflowInput::ComputeBlockAvailSpace(nsIFrame* aFrame,
- const nsStyleDisplay* aDisplay,
- const nsFlowAreaRect& aFloatAvailableSpace,
- bool aBlockAvoidsFloats,
- LogicalRect& aResult)
+ const nsFlowAreaRect& aFloatAvailableSpace,
+ bool aBlockAvoidsFloats,
+ LogicalRect& aResult)
{
#ifdef REALLY_NOISY_REFLOW
printf("CBAS frame=%p has floats %d\n",
aFrame, aFloatAvailableSpace.mHasFloats);
#endif
WritingMode wm = mReflowInput.GetWritingMode();
aResult.BStart(wm) = mBCoord;
aResult.BSize(wm) = mFlags.mHasUnconstrainedBSize
--- a/layout/generic/BlockReflowInput.h
+++ b/layout/generic/BlockReflowInput.h
@@ -202,17 +202,16 @@ public:
// (which need not be the current mBCoord).
void ComputeReplacedBlockOffsetsForFloats(nsIFrame* aFrame,
const mozilla::LogicalRect& aFloatAvailableSpace,
nscoord& aIStartResult,
nscoord& aIEndResult) const;
// Caller must have called GetAvailableSpace for the current mBCoord
void ComputeBlockAvailSpace(nsIFrame* aFrame,
- const nsStyleDisplay* aDisplay,
const nsFlowAreaRect& aFloatAvailableSpace,
bool aBlockAvoidsFloats,
mozilla::LogicalRect& aResult);
void RecoverStateFrom(nsLineList::iterator aLine, nscoord aDeltaBCoord);
void AdvanceToNextLine() {
if (mFlags.mIsLineLayoutEmpty) {
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -3119,21 +3119,20 @@ nsBlockFrame::ReflowBlockFrame(BlockRefl
nsIFrame* frame = aLine->mFirstChild;
if (!frame) {
NS_ASSERTION(false, "program error - unexpected empty line");
return;
}
// Prepare the block reflow engine
- const nsStyleDisplay* display = frame->StyleDisplay();
nsBlockReflowContext brc(aState.mPresContext, aState.mReflowInput);
- uint8_t breakType =
- display->PhysicalBreakType(aState.mReflowInput.GetWritingMode());
+ uint8_t breakType = frame->StyleDisplay()->
+ PhysicalBreakType(aState.mReflowInput.GetWritingMode());
if (NS_STYLE_CLEAR_NONE != aState.mFloatBreakType) {
breakType = nsLayoutUtils::CombineBreakType(breakType,
aState.mFloatBreakType);
aState.mFloatBreakType = NS_STYLE_CLEAR_NONE;
}
// Clear past floats before the block if the clear style is not none
aLine->SetBreakTypeBefore(breakType);
@@ -3304,17 +3303,17 @@ nsBlockFrame::ReflowBlockFrame(BlockRefl
aLine->SetLineIsImpactedByFloat(false);
// Here aState.mBCoord is the block-start border-edge of the block.
// Compute the available space for the block
nsFlowAreaRect floatAvailableSpace = aState.GetFloatAvailableSpace();
WritingMode wm = aState.mReflowInput.GetWritingMode();
LogicalRect availSpace(wm);
- aState.ComputeBlockAvailSpace(frame, display, floatAvailableSpace,
+ aState.ComputeBlockAvailSpace(frame, floatAvailableSpace,
replacedBlock != nullptr, availSpace);
// The check for
// (!aState.mReflowInput.mFlags.mIsTopOfPage || clearedFloats)
// is to some degree out of paranoia: if we reliably eat up block-start
// margins at the top of the page as we ought to, it wouldn't be
// needed.
if ((!aState.mReflowInput.mFlags.mIsTopOfPage || clearedFloats) &&
@@ -3437,17 +3436,17 @@ nsBlockFrame::ReflowBlockFrame(BlockRefl
aState.ClearFloats(newBCoord, NS_STYLE_CLEAR_NONE, replacedBlock);
// Start over with a new available space rect at the new height.
floatAvailableSpace =
aState.GetFloatAvailableSpaceWithState(aState.mBCoord,
&floatManagerState);
}
LogicalRect oldAvailSpace(availSpace);
- aState.ComputeBlockAvailSpace(frame, display, floatAvailableSpace,
+ aState.ComputeBlockAvailSpace(frame, floatAvailableSpace,
replacedBlock != nullptr, availSpace);
if (!advanced && availSpace.IsEqualEdges(oldAvailSpace)) {
break;
}
// We need another reflow.
aState.mFloatManager->PopState(&floatManagerState);