Fix for bug 159363: Text overlaps image (ESPN.com)

- Place right floaters at the unconstrained right edge during an unconstrained reflow. This ensures that the floater will be repositioned when the constrained reflow comes around.

- Fixed |if| expression that was used to detect whether or not we were trying to do an unconstrained reflow.

r=karnaze@netscape.com  sr=dbaron@fas.harvard.edu
This commit is contained in:
kin%netscape.com 2002-09-20 13:19:54 +00:00
Родитель e4c3b0a9d5
Коммит 896f57be9f
2 изменённых файлов: 4 добавлений и 4 удалений

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

@ -994,7 +994,7 @@ nsBlockReflowState::FlowAndPlaceFloater(nsFloaterCache* aFloaterCache,
} }
else { else {
isLeftFloater = PR_FALSE; isLeftFloater = PR_FALSE;
if (NS_UNCONSTRAINEDSIZE != mAvailSpaceRect.XMost()) { if (NS_UNCONSTRAINEDSIZE != mAvailSpaceRect.width) {
nsIFrame* prevInFlow; nsIFrame* prevInFlow;
floater->GetPrevInFlow(&prevInFlow); floater->GetPrevInFlow(&prevInFlow);
if (prevInFlow) { if (prevInFlow) {
@ -1011,7 +1011,7 @@ nsBlockReflowState::FlowAndPlaceFloater(nsFloaterCache* aFloaterCache,
} }
else { else {
okToAddRectRegion = PR_FALSE; okToAddRectRegion = PR_FALSE;
region.x = mAvailSpaceRect.x; region.x = NS_UNCONSTRAINEDSIZE - region.width;
} }
} }
*aIsLeftFloater = isLeftFloater; *aIsLeftFloater = isLeftFloater;

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

@ -994,7 +994,7 @@ nsBlockReflowState::FlowAndPlaceFloater(nsFloaterCache* aFloaterCache,
} }
else { else {
isLeftFloater = PR_FALSE; isLeftFloater = PR_FALSE;
if (NS_UNCONSTRAINEDSIZE != mAvailSpaceRect.XMost()) { if (NS_UNCONSTRAINEDSIZE != mAvailSpaceRect.width) {
nsIFrame* prevInFlow; nsIFrame* prevInFlow;
floater->GetPrevInFlow(&prevInFlow); floater->GetPrevInFlow(&prevInFlow);
if (prevInFlow) { if (prevInFlow) {
@ -1011,7 +1011,7 @@ nsBlockReflowState::FlowAndPlaceFloater(nsFloaterCache* aFloaterCache,
} }
else { else {
okToAddRectRegion = PR_FALSE; okToAddRectRegion = PR_FALSE;
region.x = mAvailSpaceRect.x; region.x = NS_UNCONSTRAINEDSIZE - region.width;
} }
} }
*aIsLeftFloater = isLeftFloater; *aIsLeftFloater = isLeftFloater;