Title: [150588] trunk/Source/WebKit/blackberry
Revision
150588
Author
[email protected]
Date
2013-05-23 09:11:25 -0700 (Thu, 23 May 2013)

Log Message

[BlackBerry] The web context does not contain any link properties if the context node is an image enclosed by a link node
https://bugs.webkit.org/show_bug.cgi?id=116627

Patch by Ed Baker <[email protected]> on 2013-05-23
Reviewed by Xan Lopez.

PR #341084

If the context node has an image tag and an enclosing link node was detected then add the link properties to the context.

Internally Reviewed by Gen Mak.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::webContext):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (150587 => 150588)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2013-05-23 15:55:18 UTC (rev 150587)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2013-05-23 16:11:25 UTC (rev 150588)
@@ -2161,9 +2161,10 @@
     layoutIfNeeded();
 
     bool nodeAllowSelectionOverride = false;
+    bool nodeIsImage = node->isHTMLElement() && node->hasTagName(HTMLNames::imgTag);
     Node* linkNode = node->enclosingLinkEventParentOrSelf();
     // Set link url only when the node is linked image, or text inside anchor. Prevent CCM popup when long press non-link element(eg. button) inside an anchor.
-    if ((node == linkNode) || (node->isTextNode() && linkNode)) {
+    if (linkNode && (node == linkNode || node->isTextNode() || nodeIsImage)) {
         KURL href;
         if (linkNode->isLink() && linkNode->hasAttributes()) {
             if (const Attribute* attribute = toElement(linkNode)->getAttributeItem(HTMLNames::hrefAttr))

Modified: trunk/Source/WebKit/blackberry/ChangeLog (150587 => 150588)


--- trunk/Source/WebKit/blackberry/ChangeLog	2013-05-23 15:55:18 UTC (rev 150587)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2013-05-23 16:11:25 UTC (rev 150588)
@@ -1,3 +1,19 @@
+2013-05-23  Ed Baker  <[email protected]>
+
+        [BlackBerry] The web context does not contain any link properties if the context node is an image enclosed by a link node
+        https://bugs.webkit.org/show_bug.cgi?id=116627
+
+        Reviewed by Xan Lopez.
+
+        PR #341084
+
+        If the context node has an image tag and an enclosing link node was detected then add the link properties to the context.
+
+        Internally Reviewed by Gen Mak.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::webContext):
+
 2013-05-23  Mike Fenton  <[email protected]>
 
         [BlackBerry] Validate form data before doing direct submission.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to