LibWeb: Add hit-testing test for SVG path

Adds a test for <rect> to ensure we have at least some hit-testing
coverage for SVGs.
This commit is contained in:
Aliaksandr Kalenik 2024-02-14 04:35:07 +01:00 committed by Andreas Kling
parent 88ad871e2b
commit 5bea99367a
Notes: sideshowbarker 2024-07-17 07:48:42 +09:00
2 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1 @@
<rect> clicked

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<svg width="200" height="100">
<rect id="test" width="200" height="100" style="fill:blue;" />
</svg>
<script src="../include.js"></script>
<script>
asyncTest((done) => {
document.getElementById("test").addEventListener("click", () => {
println("<rect> clicked");
done();
});
internals.click(50, 50);
});
</script>