зеркало из https://github.com/mozilla/pjs.git
Removed code where standard mode was incorrectly subtracting border size
r=kmcclusk
This commit is contained in:
Родитель
cd9e766fbc
Коммит
d317d2245a
|
@ -176,9 +176,8 @@ nsTextControlFrame::GetHorizontalInsidePadding(nsIPresContext& aPresContext,
|
|||
} else {
|
||||
padding = (nscoord)(aCharWidth * padTextField);
|
||||
}
|
||||
#ifdef DEBUG_rods
|
||||
printf("Padding - %d %5.2f %d\n", aCharWidth, padTextField, padding);
|
||||
#endif
|
||||
|
||||
|
||||
nscoord min = NSIntPixelsToTwips(padMinText, aPixToTwip);
|
||||
if (padding > min && (1 == shouldUsePadMinText)) {
|
||||
return padding;
|
||||
|
@ -291,17 +290,6 @@ nsTextControlFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
|
||||
if (eCompatibility_Standard == mode) {
|
||||
nsCOMPtr<nsILookAndFeel> lookAndFeel;
|
||||
if (NS_SUCCEEDED(aPresContext->GetLookAndFeel(getter_AddRefs(lookAndFeel)))) {
|
||||
PRInt32 borderSize;
|
||||
lookAndFeel->GetMetric(nsILookAndFeel::eMetric_TextFieldBorder, borderSize);
|
||||
nscoord borderTwips = NSIntPixelsToTwips(borderSize, p2t);
|
||||
desiredSize.width -= borderTwips*2;
|
||||
desiredSize.height -= borderTwips*2;
|
||||
}
|
||||
}
|
||||
|
||||
aDesiredLayoutSize.width = desiredSize.width;
|
||||
aDesiredLayoutSize.height = desiredSize.height;
|
||||
aDesiredLayoutSize.ascent = aDesiredLayoutSize.height;
|
||||
|
|
|
@ -176,9 +176,8 @@ nsTextControlFrame::GetHorizontalInsidePadding(nsIPresContext& aPresContext,
|
|||
} else {
|
||||
padding = (nscoord)(aCharWidth * padTextField);
|
||||
}
|
||||
#ifdef DEBUG_rods
|
||||
printf("Padding - %d %5.2f %d\n", aCharWidth, padTextField, padding);
|
||||
#endif
|
||||
|
||||
|
||||
nscoord min = NSIntPixelsToTwips(padMinText, aPixToTwip);
|
||||
if (padding > min && (1 == shouldUsePadMinText)) {
|
||||
return padding;
|
||||
|
@ -291,17 +290,6 @@ nsTextControlFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
|
||||
if (eCompatibility_Standard == mode) {
|
||||
nsCOMPtr<nsILookAndFeel> lookAndFeel;
|
||||
if (NS_SUCCEEDED(aPresContext->GetLookAndFeel(getter_AddRefs(lookAndFeel)))) {
|
||||
PRInt32 borderSize;
|
||||
lookAndFeel->GetMetric(nsILookAndFeel::eMetric_TextFieldBorder, borderSize);
|
||||
nscoord borderTwips = NSIntPixelsToTwips(borderSize, p2t);
|
||||
desiredSize.width -= borderTwips*2;
|
||||
desiredSize.height -= borderTwips*2;
|
||||
}
|
||||
}
|
||||
|
||||
aDesiredLayoutSize.width = desiredSize.width;
|
||||
aDesiredLayoutSize.height = desiredSize.height;
|
||||
aDesiredLayoutSize.ascent = aDesiredLayoutSize.height;
|
||||
|
|
Загрузка…
Ссылка в новой задаче