diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index c96a38c38d74..b842e84a7445 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/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/layout/generic/nsBlockReflowState.cpp b/layout/generic/nsBlockReflowState.cpp index c96a38c38d74..b842e84a7445 100644 --- a/layout/generic/nsBlockReflowState.cpp +++ b/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/layout/generic/nsBlockReflowState.h b/layout/generic/nsBlockReflowState.h index c96a38c38d74..b842e84a7445 100644 --- a/layout/generic/nsBlockReflowState.h +++ b/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/layout/html/base/src/nsBlockFrame.cpp b/layout/html/base/src/nsBlockFrame.cpp index c96a38c38d74..b842e84a7445 100644 --- a/layout/html/base/src/nsBlockFrame.cpp +++ b/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/layout/html/base/src/nsBlockReflowState.cpp b/layout/html/base/src/nsBlockReflowState.cpp index c96a38c38d74..b842e84a7445 100644 --- a/layout/html/base/src/nsBlockReflowState.cpp +++ b/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/layout/html/base/src/nsBlockReflowState.h b/layout/html/base/src/nsBlockReflowState.h index c96a38c38d74..b842e84a7445 100644 --- a/layout/html/base/src/nsBlockReflowState.h +++ b/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();