mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
SVGPolylineElement::get_path() produces a path based on the points attribute. During layout, this path is copied into paintables. If the points 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.
18 lines
573 B
HTML
18 lines
573 B
HTML
<!DOCTYPE html>
|
|
<html class="reftest-wait">
|
|
<link rel="match" href="../expected/svg-polyline-dynamic-attribute-update-ref.html">
|
|
<svg width="200" height="200">
|
|
<polyline id="polyline" points="0,0 10,10" stroke="black" stroke-width="2" fill="none"/>
|
|
</svg>
|
|
<script>
|
|
window.onload = () => {
|
|
requestAnimationFrame(() => {
|
|
requestAnimationFrame(() => {
|
|
document.getElementById("polyline").setAttribute("points", "10,10 100,190 190,10");
|
|
document.documentElement.classList.remove("reftest-wait");
|
|
});
|
|
});
|
|
};
|
|
</script>
|
|
</html>
|