зеркало из https://github.com/mozilla/gecko-dev.git
Fixed bug #1621 - if a floater was too wide and it was right aligned it would end up positioned off the left edge of the block
This commit is contained in:
Родитель
81f4c717f0
Коммит
320f0facc1
|
@ -3706,6 +3706,11 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||
else {
|
||||
aIsLeftFloater = PR_FALSE;
|
||||
region.x = mCurrentBand.availSpace.XMost() - region.width;
|
||||
|
||||
// In case the floater is too big, don't go past the left edge
|
||||
if (region.x < mCurrentBand.availSpace.x) {
|
||||
region.x = mCurrentBand.availSpace.x;
|
||||
}
|
||||
}
|
||||
region.y = mY - mBorderPadding.top;
|
||||
if (region.y < 0) {
|
||||
|
|
|
@ -3706,6 +3706,11 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||
else {
|
||||
aIsLeftFloater = PR_FALSE;
|
||||
region.x = mCurrentBand.availSpace.XMost() - region.width;
|
||||
|
||||
// In case the floater is too big, don't go past the left edge
|
||||
if (region.x < mCurrentBand.availSpace.x) {
|
||||
region.x = mCurrentBand.availSpace.x;
|
||||
}
|
||||
}
|
||||
region.y = mY - mBorderPadding.top;
|
||||
if (region.y < 0) {
|
||||
|
|
|
@ -3706,6 +3706,11 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||
else {
|
||||
aIsLeftFloater = PR_FALSE;
|
||||
region.x = mCurrentBand.availSpace.XMost() - region.width;
|
||||
|
||||
// In case the floater is too big, don't go past the left edge
|
||||
if (region.x < mCurrentBand.availSpace.x) {
|
||||
region.x = mCurrentBand.availSpace.x;
|
||||
}
|
||||
}
|
||||
region.y = mY - mBorderPadding.top;
|
||||
if (region.y < 0) {
|
||||
|
|
|
@ -3706,6 +3706,11 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||
else {
|
||||
aIsLeftFloater = PR_FALSE;
|
||||
region.x = mCurrentBand.availSpace.XMost() - region.width;
|
||||
|
||||
// In case the floater is too big, don't go past the left edge
|
||||
if (region.x < mCurrentBand.availSpace.x) {
|
||||
region.x = mCurrentBand.availSpace.x;
|
||||
}
|
||||
}
|
||||
region.y = mY - mBorderPadding.top;
|
||||
if (region.y < 0) {
|
||||
|
|
|
@ -3706,6 +3706,11 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||
else {
|
||||
aIsLeftFloater = PR_FALSE;
|
||||
region.x = mCurrentBand.availSpace.XMost() - region.width;
|
||||
|
||||
// In case the floater is too big, don't go past the left edge
|
||||
if (region.x < mCurrentBand.availSpace.x) {
|
||||
region.x = mCurrentBand.availSpace.x;
|
||||
}
|
||||
}
|
||||
region.y = mY - mBorderPadding.top;
|
||||
if (region.y < 0) {
|
||||
|
|
|
@ -3706,6 +3706,11 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||
else {
|
||||
aIsLeftFloater = PR_FALSE;
|
||||
region.x = mCurrentBand.availSpace.XMost() - region.width;
|
||||
|
||||
// In case the floater is too big, don't go past the left edge
|
||||
if (region.x < mCurrentBand.availSpace.x) {
|
||||
region.x = mCurrentBand.availSpace.x;
|
||||
}
|
||||
}
|
||||
region.y = mY - mBorderPadding.top;
|
||||
if (region.y < 0) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче