2010-11-19 Yael Aharon <yael.aharon@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@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/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 @@
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;
}