diff --git a/mozilla/layout/forms/nsTextControlFrame.cpp b/mozilla/layout/forms/nsTextControlFrame.cpp index c7328684966..6ffc4c5d969 100644 --- a/mozilla/layout/forms/nsTextControlFrame.cpp +++ b/mozilla/layout/forms/nsTextControlFrame.cpp @@ -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 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; diff --git a/mozilla/layout/html/forms/src/nsTextControlFrame.cpp b/mozilla/layout/html/forms/src/nsTextControlFrame.cpp index c7328684966..6ffc4c5d969 100644 --- a/mozilla/layout/html/forms/src/nsTextControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsTextControlFrame.cpp @@ -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 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;