Compute correct Y coordinate after clear floaters; fixed bullet positioning bug when placing a bullet next to a block frame that has a carried-out top margin
This commit is contained in:
@@ -2291,7 +2291,8 @@ nsBaseIBFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
|||||||
PostPlaceLine(aState, aLine, brc.GetMaxElementSize());
|
PostPlaceLine(aState, aLine, brc.GetMaxElementSize());
|
||||||
|
|
||||||
// Notify anyone who cares that the line has been placed
|
// Notify anyone who cares that the line has been placed
|
||||||
DidPlaceLine(aState, aLine, brc.GetCollapsedTopMargin(),
|
DidPlaceLine(aState, aLine,
|
||||||
|
applyTopMargin ? brc.GetCollapsedTopMargin() : 0,
|
||||||
brc.GetCollapsedBottomMargin(), aKeepReflowGoing);
|
brc.GetCollapsedBottomMargin(), aKeepReflowGoing);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -3675,7 +3676,7 @@ nsBlockReflowState::ClearFloaters(nscoord aY, PRUint8 aBreakType)
|
|||||||
|
|
||||||
nscoord newY = mCurrentBand.ClearFloaters(aY - mBorderPadding.top,
|
nscoord newY = mCurrentBand.ClearFloaters(aY - mBorderPadding.top,
|
||||||
aBreakType);
|
aBreakType);
|
||||||
mY = newY;
|
mY = newY + mBorderPadding.top;
|
||||||
GetAvailableSpace();
|
GetAvailableSpace();
|
||||||
|
|
||||||
#ifdef NOISY_INCREMENTAL_REFLOW
|
#ifdef NOISY_INCREMENTAL_REFLOW
|
||||||
|
|||||||
@@ -2291,7 +2291,8 @@ nsBaseIBFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
|||||||
PostPlaceLine(aState, aLine, brc.GetMaxElementSize());
|
PostPlaceLine(aState, aLine, brc.GetMaxElementSize());
|
||||||
|
|
||||||
// Notify anyone who cares that the line has been placed
|
// Notify anyone who cares that the line has been placed
|
||||||
DidPlaceLine(aState, aLine, brc.GetCollapsedTopMargin(),
|
DidPlaceLine(aState, aLine,
|
||||||
|
applyTopMargin ? brc.GetCollapsedTopMargin() : 0,
|
||||||
brc.GetCollapsedBottomMargin(), aKeepReflowGoing);
|
brc.GetCollapsedBottomMargin(), aKeepReflowGoing);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -3675,7 +3676,7 @@ nsBlockReflowState::ClearFloaters(nscoord aY, PRUint8 aBreakType)
|
|||||||
|
|
||||||
nscoord newY = mCurrentBand.ClearFloaters(aY - mBorderPadding.top,
|
nscoord newY = mCurrentBand.ClearFloaters(aY - mBorderPadding.top,
|
||||||
aBreakType);
|
aBreakType);
|
||||||
mY = newY;
|
mY = newY + mBorderPadding.top;
|
||||||
GetAvailableSpace();
|
GetAvailableSpace();
|
||||||
|
|
||||||
#ifdef NOISY_INCREMENTAL_REFLOW
|
#ifdef NOISY_INCREMENTAL_REFLOW
|
||||||
|
|||||||
@@ -2291,7 +2291,8 @@ nsBaseIBFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
|||||||
PostPlaceLine(aState, aLine, brc.GetMaxElementSize());
|
PostPlaceLine(aState, aLine, brc.GetMaxElementSize());
|
||||||
|
|
||||||
// Notify anyone who cares that the line has been placed
|
// Notify anyone who cares that the line has been placed
|
||||||
DidPlaceLine(aState, aLine, brc.GetCollapsedTopMargin(),
|
DidPlaceLine(aState, aLine,
|
||||||
|
applyTopMargin ? brc.GetCollapsedTopMargin() : 0,
|
||||||
brc.GetCollapsedBottomMargin(), aKeepReflowGoing);
|
brc.GetCollapsedBottomMargin(), aKeepReflowGoing);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -3675,7 +3676,7 @@ nsBlockReflowState::ClearFloaters(nscoord aY, PRUint8 aBreakType)
|
|||||||
|
|
||||||
nscoord newY = mCurrentBand.ClearFloaters(aY - mBorderPadding.top,
|
nscoord newY = mCurrentBand.ClearFloaters(aY - mBorderPadding.top,
|
||||||
aBreakType);
|
aBreakType);
|
||||||
mY = newY;
|
mY = newY + mBorderPadding.top;
|
||||||
GetAvailableSpace();
|
GetAvailableSpace();
|
||||||
|
|
||||||
#ifdef NOISY_INCREMENTAL_REFLOW
|
#ifdef NOISY_INCREMENTAL_REFLOW
|
||||||
|
|||||||
@@ -2291,7 +2291,8 @@ nsBaseIBFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
|||||||
PostPlaceLine(aState, aLine, brc.GetMaxElementSize());
|
PostPlaceLine(aState, aLine, brc.GetMaxElementSize());
|
||||||
|
|
||||||
// Notify anyone who cares that the line has been placed
|
// Notify anyone who cares that the line has been placed
|
||||||
DidPlaceLine(aState, aLine, brc.GetCollapsedTopMargin(),
|
DidPlaceLine(aState, aLine,
|
||||||
|
applyTopMargin ? brc.GetCollapsedTopMargin() : 0,
|
||||||
brc.GetCollapsedBottomMargin(), aKeepReflowGoing);
|
brc.GetCollapsedBottomMargin(), aKeepReflowGoing);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -3675,7 +3676,7 @@ nsBlockReflowState::ClearFloaters(nscoord aY, PRUint8 aBreakType)
|
|||||||
|
|
||||||
nscoord newY = mCurrentBand.ClearFloaters(aY - mBorderPadding.top,
|
nscoord newY = mCurrentBand.ClearFloaters(aY - mBorderPadding.top,
|
||||||
aBreakType);
|
aBreakType);
|
||||||
mY = newY;
|
mY = newY + mBorderPadding.top;
|
||||||
GetAvailableSpace();
|
GetAvailableSpace();
|
||||||
|
|
||||||
#ifdef NOISY_INCREMENTAL_REFLOW
|
#ifdef NOISY_INCREMENTAL_REFLOW
|
||||||
|
|||||||
@@ -2291,7 +2291,8 @@ nsBaseIBFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
|||||||
PostPlaceLine(aState, aLine, brc.GetMaxElementSize());
|
PostPlaceLine(aState, aLine, brc.GetMaxElementSize());
|
||||||
|
|
||||||
// Notify anyone who cares that the line has been placed
|
// Notify anyone who cares that the line has been placed
|
||||||
DidPlaceLine(aState, aLine, brc.GetCollapsedTopMargin(),
|
DidPlaceLine(aState, aLine,
|
||||||
|
applyTopMargin ? brc.GetCollapsedTopMargin() : 0,
|
||||||
brc.GetCollapsedBottomMargin(), aKeepReflowGoing);
|
brc.GetCollapsedBottomMargin(), aKeepReflowGoing);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -3675,7 +3676,7 @@ nsBlockReflowState::ClearFloaters(nscoord aY, PRUint8 aBreakType)
|
|||||||
|
|
||||||
nscoord newY = mCurrentBand.ClearFloaters(aY - mBorderPadding.top,
|
nscoord newY = mCurrentBand.ClearFloaters(aY - mBorderPadding.top,
|
||||||
aBreakType);
|
aBreakType);
|
||||||
mY = newY;
|
mY = newY + mBorderPadding.top;
|
||||||
GetAvailableSpace();
|
GetAvailableSpace();
|
||||||
|
|
||||||
#ifdef NOISY_INCREMENTAL_REFLOW
|
#ifdef NOISY_INCREMENTAL_REFLOW
|
||||||
|
|||||||
@@ -2291,7 +2291,8 @@ nsBaseIBFrame::ReflowBlockFrame(nsBlockReflowState& aState,
|
|||||||
PostPlaceLine(aState, aLine, brc.GetMaxElementSize());
|
PostPlaceLine(aState, aLine, brc.GetMaxElementSize());
|
||||||
|
|
||||||
// Notify anyone who cares that the line has been placed
|
// Notify anyone who cares that the line has been placed
|
||||||
DidPlaceLine(aState, aLine, brc.GetCollapsedTopMargin(),
|
DidPlaceLine(aState, aLine,
|
||||||
|
applyTopMargin ? brc.GetCollapsedTopMargin() : 0,
|
||||||
brc.GetCollapsedBottomMargin(), aKeepReflowGoing);
|
brc.GetCollapsedBottomMargin(), aKeepReflowGoing);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -3675,7 +3676,7 @@ nsBlockReflowState::ClearFloaters(nscoord aY, PRUint8 aBreakType)
|
|||||||
|
|
||||||
nscoord newY = mCurrentBand.ClearFloaters(aY - mBorderPadding.top,
|
nscoord newY = mCurrentBand.ClearFloaters(aY - mBorderPadding.top,
|
||||||
aBreakType);
|
aBreakType);
|
||||||
mY = newY;
|
mY = newY + mBorderPadding.top;
|
||||||
GetAvailableSpace();
|
GetAvailableSpace();
|
||||||
|
|
||||||
#ifdef NOISY_INCREMENTAL_REFLOW
|
#ifdef NOISY_INCREMENTAL_REFLOW
|
||||||
|
|||||||
Reference in New Issue
Block a user