From 237917724507a7b77f6814dbf4b5562a048507d9 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Mon, 27 Sep 1999 20:53:05 +0000 Subject: [PATCH] Fix for bug #14959. Made sure that lines with floaters are also marked dirty git-svn-id: svn://10.0.0.236/trunk@49146 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockFrame.cpp | 7 +++++-- mozilla/layout/generic/nsBlockReflowState.cpp | 7 +++++-- mozilla/layout/generic/nsBlockReflowState.h | 7 +++++-- mozilla/layout/html/base/src/nsBlockFrame.cpp | 7 +++++-- mozilla/layout/html/base/src/nsBlockReflowState.cpp | 7 +++++-- mozilla/layout/html/base/src/nsBlockReflowState.h | 7 +++++-- 6 files changed, 30 insertions(+), 12 deletions(-) diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index c96a38c38d7..b842e84a744 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -1907,9 +1907,12 @@ nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState) // - it's inline (not a block) // - it's either the last line in the block -or- it ended with a // break after + // - there are no floaters associated with the line (reflowing the + // placeholder frame causes the floater to be reflowed) if (line->IsBlock() || - (line->mNext && (line->mBreakType != NS_STYLE_CLEAR_NONE)) || - (line->mCombinedArea.XMost() > newAvailWidth)) { + (line->mNext && (line->mBreakType == NS_STYLE_CLEAR_NONE)) || + line->mFloaters.NotEmpty() || + (line->mBounds.XMost() > newAvailWidth)) { // We have to mark the line dirty line->MarkDirty(); diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index c96a38c38d7..b842e84a744 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -1907,9 +1907,12 @@ nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState) // - it's inline (not a block) // - it's either the last line in the block -or- it ended with a // break after + // - there are no floaters associated with the line (reflowing the + // placeholder frame causes the floater to be reflowed) if (line->IsBlock() || - (line->mNext && (line->mBreakType != NS_STYLE_CLEAR_NONE)) || - (line->mCombinedArea.XMost() > newAvailWidth)) { + (line->mNext && (line->mBreakType == NS_STYLE_CLEAR_NONE)) || + line->mFloaters.NotEmpty() || + (line->mBounds.XMost() > newAvailWidth)) { // We have to mark the line dirty line->MarkDirty(); diff --git a/mozilla/layout/generic/nsBlockReflowState.h b/mozilla/layout/generic/nsBlockReflowState.h index c96a38c38d7..b842e84a744 100644 --- a/mozilla/layout/generic/nsBlockReflowState.h +++ b/mozilla/layout/generic/nsBlockReflowState.h @@ -1907,9 +1907,12 @@ nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState) // - it's inline (not a block) // - it's either the last line in the block -or- it ended with a // break after + // - there are no floaters associated with the line (reflowing the + // placeholder frame causes the floater to be reflowed) if (line->IsBlock() || - (line->mNext && (line->mBreakType != NS_STYLE_CLEAR_NONE)) || - (line->mCombinedArea.XMost() > newAvailWidth)) { + (line->mNext && (line->mBreakType == NS_STYLE_CLEAR_NONE)) || + line->mFloaters.NotEmpty() || + (line->mBounds.XMost() > newAvailWidth)) { // We have to mark the line dirty line->MarkDirty(); diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index c96a38c38d7..b842e84a744 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -1907,9 +1907,12 @@ nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState) // - it's inline (not a block) // - it's either the last line in the block -or- it ended with a // break after + // - there are no floaters associated with the line (reflowing the + // placeholder frame causes the floater to be reflowed) if (line->IsBlock() || - (line->mNext && (line->mBreakType != NS_STYLE_CLEAR_NONE)) || - (line->mCombinedArea.XMost() > newAvailWidth)) { + (line->mNext && (line->mBreakType == NS_STYLE_CLEAR_NONE)) || + line->mFloaters.NotEmpty() || + (line->mBounds.XMost() > newAvailWidth)) { // We have to mark the line dirty line->MarkDirty(); diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.cpp b/mozilla/layout/html/base/src/nsBlockReflowState.cpp index c96a38c38d7..b842e84a744 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowState.cpp @@ -1907,9 +1907,12 @@ nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState) // - it's inline (not a block) // - it's either the last line in the block -or- it ended with a // break after + // - there are no floaters associated with the line (reflowing the + // placeholder frame causes the floater to be reflowed) if (line->IsBlock() || - (line->mNext && (line->mBreakType != NS_STYLE_CLEAR_NONE)) || - (line->mCombinedArea.XMost() > newAvailWidth)) { + (line->mNext && (line->mBreakType == NS_STYLE_CLEAR_NONE)) || + line->mFloaters.NotEmpty() || + (line->mBounds.XMost() > newAvailWidth)) { // We have to mark the line dirty line->MarkDirty(); diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.h b/mozilla/layout/html/base/src/nsBlockReflowState.h index c96a38c38d7..b842e84a744 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.h +++ b/mozilla/layout/html/base/src/nsBlockReflowState.h @@ -1907,9 +1907,12 @@ nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState) // - it's inline (not a block) // - it's either the last line in the block -or- it ended with a // break after + // - there are no floaters associated with the line (reflowing the + // placeholder frame causes the floater to be reflowed) if (line->IsBlock() || - (line->mNext && (line->mBreakType != NS_STYLE_CLEAR_NONE)) || - (line->mCombinedArea.XMost() > newAvailWidth)) { + (line->mNext && (line->mBreakType == NS_STYLE_CLEAR_NONE)) || + line->mFloaters.NotEmpty() || + (line->mBounds.XMost() > newAvailWidth)) { // We have to mark the line dirty line->MarkDirty();