Use raw trapezoid data to solve issues of floaters with margins (bug #2024)

git-svn-id: svn://10.0.0.236/trunk@25180 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com
1999-03-26 01:59:13 +00:00
parent 8290fe1b98
commit 32e9a9f145
4 changed files with 30 additions and 0 deletions

View File

@@ -213,6 +213,10 @@ nsBlockBandData::ShouldClearFrame(nsIFrame* aFrame, PRUint8 aBreakType)
return result;
}
// XXX doesn't work because of margins around floaters and because of
// % margins we can't really re-compute them here (nor would we want
// too...)
#if 0
/**
* Get the frames YMost, in the space managers "root" coordinate
* system. Because the floating frame may have been placed in a
@@ -254,6 +258,7 @@ nsBlockBandData::GetFrameYMost(nsIFrame* aFrame)
return y + r.height;
}
#endif
// XXX optimization? use mFloaters to avoid doing anything
nscoord
@@ -280,13 +285,21 @@ nsBlockBandData::ClearFloaters(nscoord aY, PRUint8 aBreakType)
for (fn = 0; fn < numFrames; fn++) {
nsIFrame* frame = (nsIFrame*) trapezoid->frames->ElementAt(fn);
if (ShouldClearFrame(frame, aBreakType)) {
#if 0
nscoord ym = GetFrameYMost(frame);
#else
nscoord ym = trapezoid->yBottom;
#endif
if (ym > yMost) yMost = ym;
}
}
}
else if (ShouldClearFrame(trapezoid->frame, aBreakType)) {
#if 0
nscoord ym = GetFrameYMost(trapezoid->frame);
#else
nscoord ym = trapezoid->yBottom;
#endif
if (ym > yMost) yMost = ym;
}
}