[BlackBerry] Make image clickable when it has anchor as parent node.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jun 2013 21:40:19 +0000 (21:40 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jun 2013 21:40:19 +0000 (21:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=117271

Patch by Tiancheng Jiang <tijiang@rim.com> on 2013-06-05
Reviewed by Rob Buis.

BlackBerry PR 345995
Internally Reviewed by Genevieve Mak.
* WebKitSupport/FatFingers.cpp:
(BlackBerry::WebKit::FatFingers::isElementClickable):

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

Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp

index bdbab8b..c9aaaa5 100644 (file)
@@ -1,3 +1,15 @@
+2013-06-05  Tiancheng Jiang  <tijiang@rim.com>
+
+        [BlackBerry] Make image clickable when it has anchor as parent node.
+        https://bugs.webkit.org/show_bug.cgi?id=117271
+
+        Reviewed by Rob Buis.
+
+        BlackBerry PR 345995
+        Internally Reviewed by Genevieve Mak.
+        * WebKitSupport/FatFingers.cpp:
+        (BlackBerry::WebKit::FatFingers::isElementClickable):
+
 2013-06-05  Mike Fenton  <mifenton@rim.com>
 
         [BlackBerry] Selection handles are inverted on directional selections
index 955bc1a..71e5cc0 100644 (file)
@@ -92,7 +92,8 @@ bool FatFingers::isElementClickable(Element* element) const
 
     if (element->webkitMatchesSelector("a[href],*:link,*:visited,*[role=button],button,input,select,label[for],area[href],textarea,embed,object", ec)
         || element->isMediaControlElement()
-        || element->isContentEditable())
+        || element->isContentEditable()
+        || (element->hasTagName(HTMLNames::imgTag) && element->parentNode() && element->parentNode()->hasTagName(HTMLNames::aTag)))
         return true;
 
     return hasMousePressListener(element)