зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1319072 - Don't assert even if coefficient is out of range [0, 1]. r=boris
MozReview-Commit-ID: 6TnuoNnHcSc --HG-- extra : rebase_source : c112546cae35050f1c02cc09e3cff1cb5f9ac41b
This commit is contained in:
Родитель
d8c897d5bc
Коммит
598b376e51
|
@ -0,0 +1,20 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html class="reftest-wait">
|
||||||
|
<title>Interpolation of decomposed matrices</title>
|
||||||
|
<style>
|
||||||
|
#target {
|
||||||
|
width: 100px; height: 100px;
|
||||||
|
background: blue;
|
||||||
|
animation: anim 0.1s cubic-bezier(0,1.5,1,1.5);
|
||||||
|
}
|
||||||
|
@keyframes anim {
|
||||||
|
from { transform: matrix(1, 0, 0, 1, 100, 200); }
|
||||||
|
to { transform: matrix(1, 0, 0, 1, 200, 100); }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div id="target"></div>
|
||||||
|
<script>
|
||||||
|
document.getElementById("target").addEventListener("animationend", () => {
|
||||||
|
document.documentElement.classList.remove("reftest-wait");
|
||||||
|
}, false);
|
||||||
|
</script>
|
|
@ -162,3 +162,4 @@ load 1290994-4.html
|
||||||
load 1314531.html
|
load 1314531.html
|
||||||
load 1315889-1.html
|
load 1315889-1.html
|
||||||
load 1315894-1.html
|
load 1315894-1.html
|
||||||
|
load 1319072-1.html
|
||||||
|
|
|
@ -319,8 +319,6 @@ public:
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static T operate(const T& aOne, const T& aTwo, double aCoeff)
|
static T operate(const T& aOne, const T& aTwo, double aCoeff)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aCoeff >= 0.0 && aCoeff <= 1.0,
|
|
||||||
"Coefficient should be in the range [0.0, 1.0]");
|
|
||||||
return aOne + (aTwo - aOne) * aCoeff;
|
return aOne + (aTwo - aOne) * aCoeff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,8 +326,6 @@ public:
|
||||||
const Point4D& aTwo,
|
const Point4D& aTwo,
|
||||||
double aCoeff)
|
double aCoeff)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aCoeff >= 0.0 && aCoeff <= 1.0,
|
|
||||||
"Coefficient should be in the range [0.0, 1.0]");
|
|
||||||
return aOne + (aTwo - aOne) * aCoeff;
|
return aOne + (aTwo - aOne) * aCoeff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,8 +333,6 @@ public:
|
||||||
const Point3D& aTwo,
|
const Point3D& aTwo,
|
||||||
double aCoeff)
|
double aCoeff)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aCoeff >= 0.0 && aCoeff <= 1.0,
|
|
||||||
"Coefficient should be in the range [0.0, 1.0]");
|
|
||||||
return aOne + (aTwo - aOne) * aCoeff;
|
return aOne + (aTwo - aOne) * aCoeff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,8 +340,6 @@ public:
|
||||||
const gfxQuaternion& aTwo,
|
const gfxQuaternion& aTwo,
|
||||||
double aCoeff)
|
double aCoeff)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aCoeff >= 0.0 && aCoeff <= 1.0,
|
|
||||||
"Coefficient should be in the range [0.0, 1.0]");
|
|
||||||
return aOne.Slerp(aTwo, aCoeff).ToMatrix();
|
return aOne.Slerp(aTwo, aCoeff).ToMatrix();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Загрузка…
Ссылка в новой задаче