Make nsStyleAnimation::ComputeDistance not crash when given -moz-transform: none. (Bug 576761) (pending review)

--HG--
extra : transplant_source : _hY%B1%23%2Cb%D2%19R%BB%24%A4%9C%1B%16R%5C%8Ee
This commit is contained in:
L. David Baron 2010-07-03 12:25:37 -07:00
Родитель 8593004082
Коммит c843e5b33a
1 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -408,11 +408,18 @@ nsStyleAnimation::ComputeDistance(nsCSSProperty aProperty,
const nsCSSValueList *list1 = aStartValue.GetCSSValueListValue();
const nsCSSValueList *list2 = aEndValue.GetCSSValueListValue();
nsStyleTransformMatrix matrix1, matrix2; // initialized to identity
PRBool dummy;
nsStyleTransformMatrix matrix1 =
nsStyleTransformMatrix::ReadTransforms(list1, nsnull, nsnull, dummy),
matrix2 =
nsStyleTransformMatrix::ReadTransforms(list2, nsnull, nsnull, dummy);
if (list1->mValue.GetUnit() != eCSSUnit_None) {
matrix1 = nsStyleTransformMatrix::ReadTransforms(list1, nsnull,
nsnull, dummy);
}
if (list2->mValue.GetUnit() != eCSSUnit_None) {
matrix2 = nsStyleTransformMatrix::ReadTransforms(list2, nsnull,
nsnull, dummy);
}
double diff;
double squareDistance = 0.0;
for (PRUint32 i = 0; i < 4; ++i) {