Files
ladybird/Tests/LibWeb/Ref/input/svg-path-dynamic-attribute-update.html
Aliaksandr Kalenik 317075e8b0 LibWeb: Invalidate layout when SVGPathElement attributes change
SVGPathElement::get_path() produces a path based on the d attribute.
During layout, this path is copied into paintables. If the d attribute
changes after layout, the path stored in the paintable becomes stale.
Fix by calling set_needs_layout_update() when it changes so the path
is recomputed.
2026-02-05 15:43:41 +01:00

18 lines
548 B
HTML

<!DOCTYPE html>
<html class="reftest-wait">
<link rel="match" href="../expected/svg-path-dynamic-attribute-update-ref.html">
<svg width="200" height="200">
<path id="path" d="M 0 0 L 10 10" stroke="black" stroke-width="2" fill="none"/>
</svg>
<script>
window.onload = () => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
document.getElementById("path").setAttribute("d", "M 10 10 L 190 190");
document.documentElement.classList.remove("reftest-wait");
});
});
};
</script>
</html>