mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Don't try to clear pushed floats when computing the final size of blocks. Fixes scrollbar on layout/reftests/bugs/563584-6-columns.html . (Bug 563584, patch 11) r=roc
This commit is contained in:
parent
fe16c37241
commit
4f730231c6
@ -1299,7 +1299,8 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState,
|
||||
// Include the float manager's state to properly account for the
|
||||
// bottom margin of any floated elements; e.g., inside a table cell.
|
||||
nscoord floatHeight =
|
||||
aState.ClearFloats(bottomEdgeOfChildren, NS_STYLE_CLEAR_LEFT_AND_RIGHT);
|
||||
aState.ClearFloats(bottomEdgeOfChildren, NS_STYLE_CLEAR_LEFT_AND_RIGHT,
|
||||
nsnull, nsFloatManager::DONT_CLEAR_PUSHED_FLOATS);
|
||||
bottomEdgeOfChildren = NS_MAX(bottomEdgeOfChildren, floatHeight);
|
||||
}
|
||||
|
||||
|
@ -965,7 +965,8 @@ nsBlockReflowState::PlaceBelowCurrentLineFloats(nsFloatCacheFreeList& aList)
|
||||
|
||||
nscoord
|
||||
nsBlockReflowState::ClearFloats(nscoord aY, PRUint8 aBreakType,
|
||||
nsIFrame *aReplacedBlock)
|
||||
nsIFrame *aReplacedBlock,
|
||||
PRUint32 aFlags)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (nsBlockFrame::gNoisyReflow) {
|
||||
@ -985,7 +986,8 @@ nsBlockReflowState::ClearFloats(nscoord aY, PRUint8 aBreakType,
|
||||
nscoord newY = aY;
|
||||
|
||||
if (aBreakType != NS_STYLE_CLEAR_NONE) {
|
||||
newY = bp.top + mFloatManager->ClearFloats(newY - bp.top, aBreakType);
|
||||
newY = bp.top +
|
||||
mFloatManager->ClearFloats(newY - bp.top, aBreakType, aFlags);
|
||||
}
|
||||
|
||||
if (aReplacedBlock) {
|
||||
|
@ -118,7 +118,8 @@ public:
|
||||
// floats indicated by aBreakType and has enough width between floats
|
||||
// (or no floats remaining) to accomodate aReplacedBlock.
|
||||
nscoord ClearFloats(nscoord aY, PRUint8 aBreakType,
|
||||
nsIFrame *aReplacedBlock = nsnull);
|
||||
nsIFrame *aReplacedBlock = nsnull,
|
||||
PRUint32 aFlags = 0);
|
||||
|
||||
PRBool IsAdjacentWithTop() const {
|
||||
return mY ==
|
||||
|
@ -480,9 +480,10 @@ nsFloatManager::List(FILE* out) const
|
||||
#endif
|
||||
|
||||
nscoord
|
||||
nsFloatManager::ClearFloats(nscoord aY, PRUint8 aBreakType) const
|
||||
nsFloatManager::ClearFloats(nscoord aY, PRUint8 aBreakType,
|
||||
PRUint32 aFlags) const
|
||||
{
|
||||
if (ClearContinues(aBreakType)) {
|
||||
if (!(aFlags & DONT_CLEAR_PUSHED_FLOATS) && ClearContinues(aBreakType)) {
|
||||
return nscoord_MAX;
|
||||
}
|
||||
if (!HasAnyFloats()) {
|
||||
|
@ -274,7 +274,12 @@ public:
|
||||
*
|
||||
* Both aY and the result are relative to the current translation.
|
||||
*/
|
||||
nscoord ClearFloats(nscoord aY, PRUint8 aBreakType) const;
|
||||
enum {
|
||||
// Tell ClearFloats not to push to nscoord_MAX when floats have been
|
||||
// pushed to the next page/column.
|
||||
DONT_CLEAR_PUSHED_FLOATS = (1<<0)
|
||||
};
|
||||
nscoord ClearFloats(nscoord aY, PRUint8 aBreakType, PRUint32 aFlags = 0) const;
|
||||
|
||||
/**
|
||||
* Checks if clear would pass into the floats' BFC's next-in-flow,
|
||||
|
Loading…
Reference in New Issue
Block a user