diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/svg/shapes/scripted/disabled-shapes-not-hit.svg | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/svg/shapes/scripted/disabled-shapes-not-hit.svg')
-rw-r--r-- | testing/web-platform/tests/svg/shapes/scripted/disabled-shapes-not-hit.svg | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/testing/web-platform/tests/svg/shapes/scripted/disabled-shapes-not-hit.svg b/testing/web-platform/tests/svg/shapes/scripted/disabled-shapes-not-hit.svg new file mode 100644 index 0000000000..21ea907878 --- /dev/null +++ b/testing/web-platform/tests/svg/shapes/scripted/disabled-shapes-not-hit.svg @@ -0,0 +1,69 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml"> + <title>Disabled shapes are not rendered and cannot be hit</title> + <h:script src="/resources/testharness.js"/> + <h:script src="/resources/testharnessreport.js"/> + <metadata> + <h:link rel="help" href="https://svgwg.org/svg2-draft/shapes.html#RectElement"/> + <h:link rel="help" href="https://svgwg.org/svg2-draft/shapes.html#CircleElement"/> + <h:link rel="help" href="https://svgwg.org/svg2-draft/shapes.html#EllipseElement"/> + </metadata> + <g stroke="red" stroke-width="100"> + <g transform="translate(50, 50)"> + <rect/> + <rect width="0" height="10"/> + <rect width="-10" height="10"/> + <rect height="0" width="10"/> + <rect height="-10" width="10"/> + <rect style="width: 0"/> + <rect style="width: 0" height="10"/> + <rect style="width: -10px"/> + <rect style="width: -10px" height="10"/> + <rect style="height: 0"/> + <rect style="height: 0" width="10"/> + <rect style="height: -10px"/> + <rect style="height: -10px" width="10"/> + <rect style="width: calc(-10px); height: calc(-10px)"/> + </g> + + <g transform="translate(150, 50)"> + <circle/> + <circle r="0"/> + <circle r="-10"/> + <circle style="r: 0"/> + <circle style="r: -10px"/> + <circle style="r: calc(-10px)"/> + </g> + + <g transform="translate(250, 50)"> + <ellipse/> + <ellipse rx="0"/> + <ellipse rx="0" ry="10"/> + <ellipse ry="0"/> + <ellipse ry="0" rx="10"/> + <ellipse style="rx: 0"/> + <ellipse style="rx: -10px"/> + <ellipse style="rx: 0" ry="10"/> + <ellipse style="ry: 0"/> + <ellipse style="ry: -10px"/> + <ellipse style="ry: 0" rx="10"/> + <ellipse style="rx: calc(-10px); ry: calc(-10px)"/> + </g> + </g> + <script><![CDATA[ + test(function() { + let element = document.elementFromPoint(50, 50); + assert_equals(element, document.documentElement, "does not hit one of the shapes"); + }, document.title + ": <rect>"); + + test(function() { + let element = document.elementFromPoint(150, 50); + assert_equals(element, document.documentElement, "does not hit one of the shapes"); + }, document.title + ": <circle>"); + + test(function() { + let element = document.elementFromPoint(250, 50); + assert_equals(element, document.documentElement, "does not hit one of the shapes"); + }, document.title + ": <ellipse>"); + ]]> + </script> +</svg> |