зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
8593004082
Коммит
c843e5b33a
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче