- added SVG path hit testing test
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2006 03:50:06 +0000 (03:50 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2006 03:50:06 +0000 (03:50 +0000)
        * svg/custom/hit-test-path-expected.checksum: Added.
        * svg/custom/hit-test-path-expected.png: Added.
        * svg/custom/hit-test-path-expected.txt: Added.
        * svg/custom/hit-test-path.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12678 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/svg/custom/hit-test-path-expected.checksum [new file with mode: 0644]
LayoutTests/svg/custom/hit-test-path-expected.png [new file with mode: 0644]
LayoutTests/svg/custom/hit-test-path-expected.txt [new file with mode: 0644]
LayoutTests/svg/custom/hit-test-path.svg [new file with mode: 0644]

index e28b45a9a57683e295054b87b2b24873e7944a6d..af5cc3f2f9db8c178b5cafa8460d104e259f6765 100644 (file)
@@ -1,3 +1,12 @@
+2006-02-08  Maciej Stachowiak  <mjs@apple.com>
+
+        - added SVG path hit testing test
+
+        * svg/custom/hit-test-path-expected.checksum: Added.
+        * svg/custom/hit-test-path-expected.png: Added.
+        * svg/custom/hit-test-path-expected.txt: Added.
+        * svg/custom/hit-test-path.svg: Added.
+
 2006-02-08  Adele Peterson  <adele@apple.com>
 
         Reviewed by Maciej.
diff --git a/LayoutTests/svg/custom/hit-test-path-expected.checksum b/LayoutTests/svg/custom/hit-test-path-expected.checksum
new file mode 100644 (file)
index 0000000..8d53d38
--- /dev/null
@@ -0,0 +1 @@
+8c8a6fe84eae6094cceb5438e21ad553
\ No newline at end of file
diff --git a/LayoutTests/svg/custom/hit-test-path-expected.png b/LayoutTests/svg/custom/hit-test-path-expected.png
new file mode 100644 (file)
index 0000000..9821de2
Binary files /dev/null and b/LayoutTests/svg/custom/hit-test-path-expected.png differ
diff --git a/LayoutTests/svg/custom/hit-test-path-expected.txt b/LayoutTests/svg/custom/hit-test-path-expected.txt
new file mode 100644 (file)
index 0000000..a22bbfb
--- /dev/null
@@ -0,0 +1,11 @@
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of text > svg > #document to 0 of text > svg > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x576
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {TEXT} at (0,0) size 560x18
+          text run at (0,0) width 560: "If you see this, then SVG hit testing on paths works - the arrow was successfully clicked."
diff --git a/LayoutTests/svg/custom/hit-test-path.svg b/LayoutTests/svg/custom/hit-test-path.svg
new file mode 100644 (file)
index 0000000..8116d33
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
+<!--======================================================================-->
+<!--=  Copyright 2000 World Wide Web Consortium, (Massachusetts          =-->
+<!--=  Institute of Technology, Institut National de Recherche en        =-->
+<!--=  Informatique et en Automatique, Keio University). All Rights      =-->
+<!--=  Reserved. See http://www.w3.org/Consortium/Legal/.                =-->
+<!--======================================================================-->
+<!-- ===================================================================== -->
+<!-- linking-a-01-b.svg                                             -->
+<!-- Notes.  This is based on sample files by Kelvin Lawrence et al, for   -->
+<!-- IBM's SVGview.  Requires supplemental file, linkingCircle-f.svg.        -->
+<!-- Author : Lofton Henderson  03-April-2000                              -->
+<!--======================================================================-->
+<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" onload="clickLinkSoon()">
+
+<script>
+if (window.layoutTestController)
+    window.layoutTestController.waitUntilDone();
+
+function clickLinkSoon()
+{
+    window.setTimeout("clickLinkNow()", 0);
+}
+
+function clickLinkNow() {
+    if (window.eventSender) {
+        eventSender.mouseMoveTo(240, 180);
+        eventSender.mouseDown();
+        eventSender.mouseUp();
+    }
+}
+</script>
+
+       <title id="test-title">linking-a-01-b</title>
+       <desc id="test-desc">Basic in-bound link object addressing formats.</desc>
+       <g id="test-body-content" transform="scale(2)">
+               <a xlink:href="resources/link-target.html">
+                       <path fill="aqua" stroke="blue" d="M 185,40 h -100 v -12 l -45 36 l 45 36 v -12 h 100 z"/>
+               </a>
+       </g>
+       <text id="revision" x="10" y="340" font-size="20" stroke="none" fill="black">Clicking the arrow should load a new page.</text>
+       <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
+</svg>