LayoutTests:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 May 2006 05:43:14 +0000 (05:43 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 May 2006 05:43:14 +0000 (05:43 +0000)
        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8781
          REGRESSION: image maps with "poly" areas, including one at lisp.geek.nz, don't work

        * fast/replaced/image-map.html: Added.
        * fast/replaced/image-map-expected.txt: Added.

WebCore:

        Reviewed by Hyatt.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8781
          REGRESSION: image maps with "poly" areas, including one at lisp.geek.nz, don't work

        * html/html_imageimpl.cpp: (WebCore::HTMLAreaElement::getRegion): Remove extra Path
        definition that was shadowing the real one.

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

LayoutTests/ChangeLog
LayoutTests/fast/replaced/image-map-expected.txt [new file with mode: 0644]
LayoutTests/fast/replaced/image-map.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/html_imageimpl.cpp

index f122261f84465d90eaa7b93060e14aed500bb8a8..c5f6b359468750bcb79277ba825d9894c257186b 100644 (file)
@@ -1,3 +1,11 @@
+2006-05-09  Darin Adler  <darin@apple.com>
+
+        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8781
+          REGRESSION: image maps with "poly" areas, including one at lisp.geek.nz, don't work
+
+        * fast/replaced/image-map.html: Added.
+        * fast/replaced/image-map-expected.txt: Added.
+
 2006-05-09  Darin Adler  <darin@apple.com>
 
         - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=6310
diff --git a/LayoutTests/fast/replaced/image-map-expected.txt b/LayoutTests/fast/replaced/image-map-expected.txt
new file mode 100644 (file)
index 0000000..7de563c
--- /dev/null
@@ -0,0 +1,3 @@
+
+area clicked
+
diff --git a/LayoutTests/fast/replaced/image-map.html b/LayoutTests/fast/replaced/image-map.html
new file mode 100644 (file)
index 0000000..2edc91f
--- /dev/null
@@ -0,0 +1,17 @@
+<head>
+<script>
+function test() {
+    if (window.layoutTestController) {
+        layoutTestController.dumpAsText();
+        eventSender.mouseMoveTo(50, 50);
+        eventSender.mouseDown();
+        eventSender.mouseUp();
+    }
+}
+</script>
+</head>
+<body onload="test()">
+<img id="image" height="100" width="100" src="resources/square-blue-100x100.png" usemap="#map">
+<map name="map"><area shape="poly" coords="0,0,0,100,100,100,100,0" href="javascript:document.getElementById('result').innerHTML='area clicked'"></map>
+<div id="result">no area click seen yet</div>
+</body>
index 1b3cf7ba7b4709a4dc0ee806dd9d72ffdb18d6ff..96bf0bc3c0b77b860e8ceb3d8f0dc892f4baae28 100644 (file)
@@ -1,3 +1,13 @@
+2006-05-09  Darin Adler  <darin@apple.com>
+
+        Reviewed by Hyatt.
+
+        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8781
+          REGRESSION: image maps with "poly" areas, including one at lisp.geek.nz, don't work
+
+        * html/html_imageimpl.cpp: (WebCore::HTMLAreaElement::getRegion): Remove extra Path
+        definition that was shadowing the real one.
+
 2006-05-09  Darin Adler  <darin@apple.com>
 
         - fix build
index 8588074038728e3e2fb6820ad1653d38bff81e99..6ba00f5c8305ffe9be544822e60fc682321dba57 100644 (file)
@@ -597,7 +597,6 @@ Path HTMLAreaElement::getRegion(int width, int height) const
     switch (shape) {
         case Poly:
             if (m_coordsLen >= 6) {
-                Path path;
                 int numPoints = m_coordsLen / 2;
                 path.moveTo(FloatPoint(m_coords[0].calcMinValue(width), m_coords[1].calcMinValue(height)));
                 for (int i = 1; i < numPoints; ++i)