[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

yael.aharon at nokia.com yael.aharon at nokia.com
Wed Dec 22 16:11:51 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 8c59fca5ab31812d6ef2b8ed3b0751b58f516fdf
Author: yael.aharon at nokia.com <yael.aharon at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 19 16:05:13 2010 +0000

    2010-11-19  Yael Aharon  <yael.aharon at nokia.com>
    
            Reviewed by Antonio Gomes.
    
            Focus ring in image maps does not take zooming into account
            https://bugs.webkit.org/show_bug.cgi?id=49625
    
            * fast/images/imagemap-focus-ring-zoom.html: Added.
            * platform/mac/fast/images/imagemap-focus-ring-zoom-expected.checksum: Added.
            * platform/mac/fast/images/imagemap-focus-ring-zoom-expected.png: Added.
            * platform/mac/fast/images/imagemap-focus-ring-zoom-expected.txt: Added.
    2010-11-19  Yael Aharon  <yael.aharon at nokia.com>
    
            Reviewed by Antonio Gomes.
    
            Focus ring in image maps does not take zooming into account
            https://bugs.webkit.org/show_bug.cgi?id=49625
    
            Take pageZoomFactor into account when calculating the path of the focus ring.
    
            Test: fast/images/imagemap-focus-ring-zoom.html
    
            * html/HTMLAreaElement.cpp:
            (WebCore::HTMLAreaElement::getPath):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72402 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ed500c9..ab529b5 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-19  Yael Aharon  <yael.aharon at nokia.com>
+
+        Reviewed by Antonio Gomes.
+
+        Focus ring in image maps does not take zooming into account
+        https://bugs.webkit.org/show_bug.cgi?id=49625
+
+        * fast/images/imagemap-focus-ring-zoom.html: Added.
+        * platform/mac/fast/images/imagemap-focus-ring-zoom-expected.checksum: Added.
+        * platform/mac/fast/images/imagemap-focus-ring-zoom-expected.png: Added.
+        * platform/mac/fast/images/imagemap-focus-ring-zoom-expected.txt: Added.
+
 2010-11-19  Nikolas Zimmermann  <nzimmermann at rim.com>
 
         Reviewed by Dirk Schulze.
diff --git a/LayoutTests/fast/images/imagemap-focus-ring-zoom.html b/LayoutTests/fast/images/imagemap-focus-ring-zoom.html
new file mode 100644
index 0000000..b8aee15
--- /dev/null
+++ b/LayoutTests/fast/images/imagemap-focus-ring-zoom.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<script>
+window.onload = function()
+{
+    document.getElementById("area").focus();
+
+    if (!window.eventSender)
+        return;
+
+    eventSender.zoomPageIn();
+    eventSender.zoomPageIn();
+}
+</script>
+</head>
+<body>
+This test can be used to ensure that a focus ring is drawn correctly for an imagemap even when the page is zoomed. This test PASSED if a focus ring is drawn around the &lt;area&gt; in the imagemap to the right.
+<map name="imagemap">
+    <area id="area" shape="rect" coords="0,0,128,128" href="#dummy" />
+</map>
+<img src="imagemap.jpg" width="128" height="128" usemap="#imagemap" ismap />
+</body>
+</head>
+</html>
diff --git a/LayoutTests/platform/mac/fast/images/imagemap-focus-ring-zoom-expected.checksum b/LayoutTests/platform/mac/fast/images/imagemap-focus-ring-zoom-expected.checksum
new file mode 100644
index 0000000..a3686cc
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/images/imagemap-focus-ring-zoom-expected.checksum
@@ -0,0 +1 @@
+3cac810de5540a774e7e7e84649ebb19
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/images/imagemap-focus-ring-zoom-expected.png b/LayoutTests/platform/mac/fast/images/imagemap-focus-ring-zoom-expected.png
new file mode 100644
index 0000000..e94db2f
Binary files /dev/null and b/LayoutTests/platform/mac/fast/images/imagemap-focus-ring-zoom-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/images/imagemap-focus-ring-zoom-expected.txt b/LayoutTests/platform/mac/fast/images/imagemap-focus-ring-zoom-expected.txt
new file mode 100644
index 0000000..acf75a2
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/images/imagemap-focus-ring-zoom-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (11,11) size 778x578
+      RenderText {#text} at (0,0) size 729x242
+        text run at (0,0) width 677: "This test can be used to ensure that a focus ring is drawn correctly for an"
+        text run at (0,26) width 729: "imagemap even when the page is zoomed. This test PASSED if a focus ring is"
+        text run at (0,216) width 515: "drawn around the <area> in the imagemap to the right. "
+      RenderInline {MAP} at (0,0) size 0x0
+        RenderText {#text} at (0,0) size 0x0
+        RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 0x0
+      RenderImage {IMG} at (515,52) size 184x184
+      RenderText {#text} at (0,0) size 0x0
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7274f43..27d86ea 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-19  Yael Aharon  <yael.aharon at nokia.com>
+
+        Reviewed by Antonio Gomes.
+
+        Focus ring in image maps does not take zooming into account
+        https://bugs.webkit.org/show_bug.cgi?id=49625
+
+        Take pageZoomFactor into account when calculating the path of the focus ring.
+
+        Test: fast/images/imagemap-focus-ring-zoom.html
+
+        * html/HTMLAreaElement.cpp:
+        (WebCore::HTMLAreaElement::getPath):
+
 2010-11-19  Nikolas Zimmermann  <nzimmermann at rim.com>
 
         Reviewed by Dirk Schulze.
diff --git a/WebCore/html/HTMLAreaElement.cpp b/WebCore/html/HTMLAreaElement.cpp
index cebfda2..dc87ef6 100644
--- a/WebCore/html/HTMLAreaElement.cpp
+++ b/WebCore/html/HTMLAreaElement.cpp
@@ -23,6 +23,7 @@
 #include "HTMLAreaElement.h"
 
 #include "Attribute.h"
+#include "Frame.h"
 #include "HTMLImageElement.h"
 #include "HTMLMapElement.h"
 #include "HTMLNames.h"
@@ -98,6 +99,13 @@ Path HTMLAreaElement::getPath(RenderObject* obj) const
         size = obj->absoluteOutlineBounds().size();
     
     Path p = getRegion(size);
+    float zoomFactor = document()->frame()->pageZoomFactor();
+    if (zoomFactor != 1.0f) {
+        AffineTransform zoomTransform;
+        zoomTransform.scale(zoomFactor);
+        p.transform(zoomTransform);
+    }
+
     p.translate(absPos - FloatPoint());
     return p;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list