ladybird/Tests/LibWeb/Crash/CSS/repeating-gradient-zero-length.html
Andreas Kling e18d78eb2d LibWeb: Handle degenerate repeating gradients
Normalize zero-length repeating gradients to a solid average color
before painting code expands or tiles their stops. CSS Images defines
this case as an average over the same color stops with an arbitrary
non-zero distance, avoiding division by a zero repeat length while
painting.

Add a reduced crash test covering zero-length repeating linear, radial,
and conic gradients.
2026-06-08 01:04:08 +02:00

10 lines
387 B
HTML

<!doctype html>
<style>
.gradient {
width: 100px;
height: 100px;
}
</style>
<div class="gradient" style="background: repeating-linear-gradient(red 0%, blue 0%)"></div>
<div class="gradient" style="background: repeating-radial-gradient(circle, red 0%, blue 0%)"></div>
<div class="gradient" style="background: repeating-conic-gradient(red 0deg, blue 0deg)"></div>