Problem: On https://turbovision.in6-addr.net a tiny-background-size + background-repeat tile over a large painted area crashed WebContent. Cause: BackgroundPainting was recording one paint command per tile for any repeating background that’s not a decoded image. A small tile over a large area could produce literally millions of commands — resulting in a display list exceeding MAX_MESSAGE_PAYLOAD_SIZE, and tripping an assert. Fix: When a repeating AbstractImageStyleValue would emit more tiles than a fixed threshold, record a single tile into a nested display list and, reusing some existing SVG pattern machinery, fill the coverage rect with a PatternPaintStyle. We render the tile once, and repeat it with a tiling shader — so the display list holds a single command regardless of tile count. Normal backgrounds keep their exact per-tile painting. Fixes https://github.com/LadybirdBrowser/ladybird/issues/9876
14 lines
632 B
HTML
14 lines
632 B
HTML
<!DOCTYPE html>
|
|
<!-- A gradient that fills its background area looks the same whether or not background-repeat is set — because there's
|
|
nothing to repeat. This guards against a repeating non-image background being rerouted through a pattern fill that
|
|
paints it differently from a direct paint. See issue #9876. -->
|
|
<link rel="match" href="../../expected/css/background-repeat-gradient-ref.html" />
|
|
<style>
|
|
html, body { margin: 0; padding: 0; }
|
|
#test {
|
|
width: 200px;
|
|
height: 200px;
|
|
background: linear-gradient(45deg, red, orange, yellow, green, blue);
|
|
}
|
|
</style>
|
|
<div id="test"></div>
|