diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 56f832adb92d..463634e3532f 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -1782,26 +1782,19 @@ nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState) } #endif - PRBool wrapping = !aState.GetFlag(BRS_NOWRAP); for (line_iterator line = begin_lines(), line_end = end_lines(); line != line_end; ++line) { // We let child blocks make their own decisions the same // way we are here. - // - // For inline lines with no-wrap, the only way things - // could change is if there is a percentage-sized child. - // However, right floats within such lines might need to be - // repositioned, so we check for floats as well. if (line->IsBlock() || line->HasPercentageChild() || line->HasFloats() || - (wrapping && - ((line != mLines.back() && !line->HasBreak()) || - line->ResizeReflowOptimizationDisabled() || - line->IsImpactedByFloat() || - (line->mBounds.XMost() > newAvailWidth)))) { + (line != mLines.back() && !line->HasBreak()) || + line->ResizeReflowOptimizationDisabled() || + line->IsImpactedByFloat() || + (line->mBounds.XMost() > newAvailWidth)) { line->MarkDirty(); } @@ -1812,13 +1805,12 @@ nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState) } #endif #ifdef DEBUG - if (gNoisyReflow && !line->IsDirty() && wrapping) { + if (gNoisyReflow && !line->IsDirty()) { IndentBy(stdout, gNoiseIndent + 1); - printf("skipped: line=%p next=%p %s %s %s%s%s breakType=%d xmost=%d\n", + printf("skipped: line=%p next=%p %s %s%s%s breakType=%d xmost=%d\n", NS_STATIC_CAST(void*, line.get()), NS_STATIC_CAST(void*, (line.next() != end_lines() ? line.next().get() : nsnull)), line->IsBlock() ? "block" : "inline", - "wrapping", line->HasBreak() ? "has-break " : "", line->HasFloats() ? "has-floats " : "", line->IsImpactedByFloat() ? "impacted " : "", diff --git a/layout/generic/nsBlockReflowState.cpp b/layout/generic/nsBlockReflowState.cpp index 80d2611b28f1..86155d447ee4 100644 --- a/layout/generic/nsBlockReflowState.cpp +++ b/layout/generic/nsBlockReflowState.cpp @@ -150,17 +150,6 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState, mPrevChild = nsnull; mCurrentLine = aFrame->end_lines(); - const nsStyleText* styleText = mBlock->GetStyleText(); - switch (styleText->mWhiteSpace) { - case NS_STYLE_WHITESPACE_PRE: - case NS_STYLE_WHITESPACE_NOWRAP: - SetFlag(BRS_NOWRAP, PR_TRUE); - break; - default: - SetFlag(BRS_NOWRAP, PR_FALSE); - break; - } - SetFlag(BRS_COMPUTEMAXELEMENTWIDTH, aMetrics.mComputeMEW); #ifdef DEBUG if (nsBlockFrame::gNoisyMaxElementWidth) { diff --git a/layout/generic/nsBlockReflowState.h b/layout/generic/nsBlockReflowState.h index 92d89a3c9d5f..845848dc5e77 100644 --- a/layout/generic/nsBlockReflowState.h +++ b/layout/generic/nsBlockReflowState.h @@ -233,7 +233,6 @@ public: #define BRS_UNCONSTRAINEDHEIGHT 0x00000002 #define BRS_SHRINKWRAPWIDTH 0x00000004 #define BRS_NEEDRESIZEREFLOW 0x00000008 -#define BRS_NOWRAP 0x00000010 #define BRS_ISTOPMARGINROOT 0x00000020 // Is this frame a root for top/bottom margin collapsing? #define BRS_ISBOTTOMMARGINROOT 0x00000040 #define BRS_APPLYTOPMARGIN 0x00000080 // See ShouldApplyTopMargin diff --git a/layout/html/base/src/nsBlockFrame.cpp b/layout/html/base/src/nsBlockFrame.cpp index 56f832adb92d..463634e3532f 100644 --- a/layout/html/base/src/nsBlockFrame.cpp +++ b/layout/html/base/src/nsBlockFrame.cpp @@ -1782,26 +1782,19 @@ nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState) } #endif - PRBool wrapping = !aState.GetFlag(BRS_NOWRAP); for (line_iterator line = begin_lines(), line_end = end_lines(); line != line_end; ++line) { // We let child blocks make their own decisions the same // way we are here. - // - // For inline lines with no-wrap, the only way things - // could change is if there is a percentage-sized child. - // However, right floats within such lines might need to be - // repositioned, so we check for floats as well. if (line->IsBlock() || line->HasPercentageChild() || line->HasFloats() || - (wrapping && - ((line != mLines.back() && !line->HasBreak()) || - line->ResizeReflowOptimizationDisabled() || - line->IsImpactedByFloat() || - (line->mBounds.XMost() > newAvailWidth)))) { + (line != mLines.back() && !line->HasBreak()) || + line->ResizeReflowOptimizationDisabled() || + line->IsImpactedByFloat() || + (line->mBounds.XMost() > newAvailWidth)) { line->MarkDirty(); } @@ -1812,13 +1805,12 @@ nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState) } #endif #ifdef DEBUG - if (gNoisyReflow && !line->IsDirty() && wrapping) { + if (gNoisyReflow && !line->IsDirty()) { IndentBy(stdout, gNoiseIndent + 1); - printf("skipped: line=%p next=%p %s %s %s%s%s breakType=%d xmost=%d\n", + printf("skipped: line=%p next=%p %s %s%s%s breakType=%d xmost=%d\n", NS_STATIC_CAST(void*, line.get()), NS_STATIC_CAST(void*, (line.next() != end_lines() ? line.next().get() : nsnull)), line->IsBlock() ? "block" : "inline", - "wrapping", line->HasBreak() ? "has-break " : "", line->HasFloats() ? "has-floats " : "", line->IsImpactedByFloat() ? "impacted " : "", diff --git a/layout/html/base/src/nsBlockReflowState.cpp b/layout/html/base/src/nsBlockReflowState.cpp index 80d2611b28f1..86155d447ee4 100644 --- a/layout/html/base/src/nsBlockReflowState.cpp +++ b/layout/html/base/src/nsBlockReflowState.cpp @@ -150,17 +150,6 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState, mPrevChild = nsnull; mCurrentLine = aFrame->end_lines(); - const nsStyleText* styleText = mBlock->GetStyleText(); - switch (styleText->mWhiteSpace) { - case NS_STYLE_WHITESPACE_PRE: - case NS_STYLE_WHITESPACE_NOWRAP: - SetFlag(BRS_NOWRAP, PR_TRUE); - break; - default: - SetFlag(BRS_NOWRAP, PR_FALSE); - break; - } - SetFlag(BRS_COMPUTEMAXELEMENTWIDTH, aMetrics.mComputeMEW); #ifdef DEBUG if (nsBlockFrame::gNoisyMaxElementWidth) { diff --git a/layout/html/base/src/nsBlockReflowState.h b/layout/html/base/src/nsBlockReflowState.h index 92d89a3c9d5f..845848dc5e77 100644 --- a/layout/html/base/src/nsBlockReflowState.h +++ b/layout/html/base/src/nsBlockReflowState.h @@ -233,7 +233,6 @@ public: #define BRS_UNCONSTRAINEDHEIGHT 0x00000002 #define BRS_SHRINKWRAPWIDTH 0x00000004 #define BRS_NEEDRESIZEREFLOW 0x00000008 -#define BRS_NOWRAP 0x00000010 #define BRS_ISTOPMARGINROOT 0x00000020 // Is this frame a root for top/bottom margin collapsing? #define BRS_ISBOTTOMMARGINROOT 0x00000040 #define BRS_APPLYTOPMARGIN 0x00000080 // See ShouldApplyTopMargin