summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/svg/shapes/scripted/disabled-shapes-not-hit.svg
diff options
context:
space:
mode:
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.svg69
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>