Remove BRS_NOWRAP. b=191699 r+sr=roc

This commit is contained in:
dbaron%dbaron.org 2003-11-11 19:24:01 +00:00
Родитель 7d644cad46
Коммит 1457f87876
6 изменённых файлов: 12 добавлений и 52 удалений

Просмотреть файл

@ -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 " : "",

Просмотреть файл

@ -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) {

Просмотреть файл

@ -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

Просмотреть файл

@ -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 " : "",

Просмотреть файл

@ -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) {

Просмотреть файл

@ -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