Bug 960664 - Unbreak libc++ build after 358f4a9aac18 (bug 157846) by using mozilla::Abs in nsTextControlFrame::CalcIntrinsicSize. r=roc

This commit is contained in:
Jan Beich 2014-01-17 10:03:44 -05:00
parent 2cdb53e517
commit 91d1a01aac

View File

@ -171,7 +171,7 @@ nsTextControlFrame::CalcIntrinsicSize(nsRenderingContext* aRenderingContext,
// To better match IE, take the maximum character width(in twips) and remove
// 4 pixels add this on as additional padding(internalPadding). But only do
// this if we think we have a fixed-width font.
if (std::abs(charWidth - charMaxAdvance) > nsPresContext::CSSPixelsToAppUnits(1)) {
if (mozilla::Abs(charWidth - charMaxAdvance) > (unsigned)nsPresContext::CSSPixelsToAppUnits(1)) {
nscoord internalPadding =
std::max(0, charMaxAdvance - nsPresContext::CSSPixelsToAppUnits(4));
nscoord t = nsPresContext::CSSPixelsToAppUnits(1);