зеркало из https://github.com/mozilla/gecko-dev.git
Account for 1 twip width of BR when computing the size of textareas. b=228752 Patch by Mats Palmgren <mats.palmgren@bredband.net>. r+sr=dbaron a=brendan
This commit is contained in:
Родитель
b79ff54049
Коммит
352509b071
|
@ -1490,6 +1490,14 @@ nsTextControlFrame::CalculateSizeStandard(nsIPresContext* aPresContext,
|
|||
}
|
||||
// Now add the extra padding on (so that small input sizes work well)
|
||||
aDesiredSize.width += internalPadding;
|
||||
} else {
|
||||
// This is to account for the anonymous <br> having a 1 twip width
|
||||
// in Full Standards mode, see BRFrame::Reflow and bug 228752.
|
||||
nsCompatibility mode;
|
||||
aPresContext->GetCompatibilityMode(&mode);
|
||||
if (mode == eCompatibility_FullStandards) {
|
||||
aDesiredSize.width += 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the height equal to total number of rows (times the height of each
|
||||
|
|
|
@ -184,6 +184,8 @@ BRFrame::Reflow(nsIPresContext* aPresContext,
|
|||
// code in nsLineLayout::VerticalAlignFrames that zaps minY/maxY
|
||||
// if the width is zero.
|
||||
// XXX This also fixes bug 10036!
|
||||
// Warning: nsTextControlFrame::CalculateSizeStandard depends on
|
||||
// the following line, see bug 228752.
|
||||
aMetrics.width = 1;
|
||||
|
||||
// Update max-element-width to keep us honest
|
||||
|
|
|
@ -184,6 +184,8 @@ BRFrame::Reflow(nsIPresContext* aPresContext,
|
|||
// code in nsLineLayout::VerticalAlignFrames that zaps minY/maxY
|
||||
// if the width is zero.
|
||||
// XXX This also fixes bug 10036!
|
||||
// Warning: nsTextControlFrame::CalculateSizeStandard depends on
|
||||
// the following line, see bug 228752.
|
||||
aMetrics.width = 1;
|
||||
|
||||
// Update max-element-width to keep us honest
|
||||
|
|
|
@ -1490,6 +1490,14 @@ nsTextControlFrame::CalculateSizeStandard(nsIPresContext* aPresContext,
|
|||
}
|
||||
// Now add the extra padding on (so that small input sizes work well)
|
||||
aDesiredSize.width += internalPadding;
|
||||
} else {
|
||||
// This is to account for the anonymous <br> having a 1 twip width
|
||||
// in Full Standards mode, see BRFrame::Reflow and bug 228752.
|
||||
nsCompatibility mode;
|
||||
aPresContext->GetCompatibilityMode(&mode);
|
||||
if (mode == eCompatibility_FullStandards) {
|
||||
aDesiredSize.width += 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the height equal to total number of rows (times the height of each
|
||||
|
|
Загрузка…
Ссылка в новой задаче