From 0bab51abbe08a1004b420940eb591c572de6155c Mon Sep 17 00:00:00 2001 From: "alexsavulov%netscape.com" Date: Tue, 27 Aug 2002 22:31:24 +0000 Subject: [PATCH] Fix for bug 78820 - right aligned floater in nowrap blocks are not positioned correctly. r= alexsavulov sr= kin --- layout/generic/nsBlockFrame.cpp | 4 +++- layout/html/base/src/nsBlockFrame.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 3acc5e066cb2..9306a9a2aac5 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -1948,12 +1948,14 @@ nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState) // // For inline lines with no-wrap, the only way things // could change is if there is a percentage-sized child. + // However, right floaters within such lines might need to be + // repositioned, so we check for floaters as well. if (line->IsBlock() || line->HasPercentageChild() || + line->HasFloaters() || (wrapping && ((line != mLines.back() && !line->HasBreak()) || line->ResizeReflowOptimizationDisabled() || - line->HasFloaters() || line->IsImpactedByFloater() || (line->mBounds.XMost() > newAvailWidth)))) { line->MarkDirty(); diff --git a/layout/html/base/src/nsBlockFrame.cpp b/layout/html/base/src/nsBlockFrame.cpp index 3acc5e066cb2..9306a9a2aac5 100644 --- a/layout/html/base/src/nsBlockFrame.cpp +++ b/layout/html/base/src/nsBlockFrame.cpp @@ -1948,12 +1948,14 @@ nsBlockFrame::PrepareResizeReflow(nsBlockReflowState& aState) // // For inline lines with no-wrap, the only way things // could change is if there is a percentage-sized child. + // However, right floaters within such lines might need to be + // repositioned, so we check for floaters as well. if (line->IsBlock() || line->HasPercentageChild() || + line->HasFloaters() || (wrapping && ((line != mLines.back() && !line->HasBreak()) || line->ResizeReflowOptimizationDisabled() || - line->HasFloaters() || line->IsImpactedByFloater() || (line->mBounds.XMost() > newAvailWidth)))) { line->MarkDirty();