mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 201797. Do an extra reflow of the scrollframe if we adjusted the width or height after reflowing it the first time. Also, don't include border/padding when calculating the visible width in the unconstrained case
This commit is contained in:
parent
e27ab6d217
commit
f4a1c61d8c
@ -1311,10 +1311,6 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_UNCONSTRAINEDSIZE == aReflowState.mComputedWidth) {
|
||||
visibleWidth += aReflowState.mComputedBorderPadding.left + aReflowState.mComputedBorderPadding.right;
|
||||
}
|
||||
|
||||
// When in dropdown mode make sure we obey min/max-width and min/max-height
|
||||
if (!isInDropDownMode) {
|
||||
nscoord fullWidth = visibleWidth + aReflowState.mComputedBorderPadding.left + aReflowState.mComputedBorderPadding.right;
|
||||
@ -1377,7 +1373,8 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
|
||||
secondPassState.mComputedHeight = visibleHeight;
|
||||
secondPassState.reason = eReflowReason_Resize;
|
||||
|
||||
if (mPassId == 0 || mPassId == 2) {
|
||||
if (mPassId == 0 || mPassId == 2 || visibleHeight != scrolledAreaHeight ||
|
||||
visibleWidth != scrolledAreaWidth) {
|
||||
nsGfxScrollFrame::Reflow(aPresContext, aDesiredSize, secondPassState, aStatus);
|
||||
if (aReflowState.mComputedHeight == 0) {
|
||||
aDesiredSize.ascent = 0;
|
||||
|
@ -1311,10 +1311,6 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_UNCONSTRAINEDSIZE == aReflowState.mComputedWidth) {
|
||||
visibleWidth += aReflowState.mComputedBorderPadding.left + aReflowState.mComputedBorderPadding.right;
|
||||
}
|
||||
|
||||
// When in dropdown mode make sure we obey min/max-width and min/max-height
|
||||
if (!isInDropDownMode) {
|
||||
nscoord fullWidth = visibleWidth + aReflowState.mComputedBorderPadding.left + aReflowState.mComputedBorderPadding.right;
|
||||
@ -1377,7 +1373,8 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
|
||||
secondPassState.mComputedHeight = visibleHeight;
|
||||
secondPassState.reason = eReflowReason_Resize;
|
||||
|
||||
if (mPassId == 0 || mPassId == 2) {
|
||||
if (mPassId == 0 || mPassId == 2 || visibleHeight != scrolledAreaHeight ||
|
||||
visibleWidth != scrolledAreaWidth) {
|
||||
nsGfxScrollFrame::Reflow(aPresContext, aDesiredSize, secondPassState, aStatus);
|
||||
if (aReflowState.mComputedHeight == 0) {
|
||||
aDesiredSize.ascent = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user