LibWeb: Do not clamp the output of the cubic bezier timing function

It is fine for timing function to be outside of the range [0, 1]

(cherry picked from commit 7925efda5fbc755b3fff00dcbba301fe4f8bc1c9)
This commit is contained in:
Matthew Olsson 2024-06-07 15:41:03 -07:00 committed by Nico Weber
parent ae4c5512af
commit fa46393e27

View file

@ -118,7 +118,7 @@ double CubicBezierTimingFunction::operator()(double input_progress, bool) const
auto& sample1 = m_cached_x_samples[nearby_index];
auto& sample2 = m_cached_x_samples[nearby_index + 1];
auto factor = (x - sample1.x) / (sample2.x - sample1.x);
return clamp(sample1.y + factor * (sample2.y - sample1.y), 0, 1);
return sample1.y + factor * (sample2.y - sample1.y);
}
// https://www.w3.org/TR/css-easing-1/#step-easing-algo