Bug 1159056. Don't store a value in CSS pixels in a variable with type nscoord in ScrollFrameHelper::SetCoordAttribute. r=dholbert

This commit is contained in:
Timothy Nikkel 2015-04-27 19:34:39 -05:00
parent 0efde2ed68
commit 57139b38b0

View File

@ -4882,12 +4882,12 @@ ScrollFrameHelper::SetCoordAttribute(nsIContent* aContent, nsIAtom* aAtom,
DebugOnly<nsWeakPtr> weakShell(
do_GetWeakReference(mOuter->PresContext()->PresShell()));
// convert to pixels
aSize = nsPresContext::AppUnitsToIntCSSPixels(aSize);
int32_t pizelSize = nsPresContext::AppUnitsToIntCSSPixels(aSize);
// only set the attribute if it changed.
nsAutoString newValue;
newValue.AppendInt(aSize);
newValue.AppendInt(pizelSize);
if (aContent->AttrValueIs(kNameSpaceID_None, aAtom, newValue, eCaseMatters))
return;