servo/tests/wpt/web-platform-tests/css/css-images/gradient-crash.html
Pyfisch 94f3e3353d Fix division by zero in gradient stop calculation
Check if total_length is zero and return 0.0 instead
of NaN in this case.

Closes #18435

Regression test for crash.
2017-12-28 21:18:49 +01:00

12 lines
421 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>Does this gradient crash the browser?</title>
<link rel="match" href="gradient-crash-ref.html">
<link rel="help" href="https://drafts.csswg.org/css-images-3/#color-stop-syntax">
<meta name="assert" content="Gradients with total length zero and absolute positioned stops do not crash.">
<style>
div {
background: linear-gradient(black 0,white);
}
</style>
<div></div>