Changeset 150588 in webkit


Ignore:
Timestamp:
May 23, 2013 9:11:25 AM (11 years ago)
Author:
commit-queue@webkit.org
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 <edbaker@blackberry.com> 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):

Location:
trunk/Source/WebKit/blackberry
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r150434 r150588  
    21622162
    21632163    bool nodeAllowSelectionOverride = false;
     2164    bool nodeIsImage = node->isHTMLElement() && node->hasTagName(HTMLNames::imgTag);
    21642165    Node* linkNode = node->enclosingLinkEventParentOrSelf();
    21652166    // 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.
    2166     if ((node == linkNode) || (node->isTextNode() && linkNode)) {
     2167    if (linkNode && (node == linkNode || node->isTextNode() || nodeIsImage)) {
    21672168        KURL href;
    21682169        if (linkNode->isLink() && linkNode->hasAttributes()) {
  • trunk/Source/WebKit/blackberry/ChangeLog

    r150587 r150588  
     12013-05-23  Ed Baker  <edbaker@blackberry.com>
     2
     3        [BlackBerry] The web context does not contain any link properties if the context node is an image enclosed by a link node
     4        https://bugs.webkit.org/show_bug.cgi?id=116627
     5
     6        Reviewed by Xan Lopez.
     7
     8        PR #341084
     9
     10        If the context node has an image tag and an enclosing link node was detected then add the link properties to the context.
     11
     12        Internally Reviewed by Gen Mak.
     13
     14        * Api/WebPage.cpp:
     15        (BlackBerry::WebKit::WebPagePrivate::webContext):
     16
    1172013-05-23  Mike Fenton  <mifenton@rim.com>
    218
Note: See TracChangeset for help on using the changeset viewer.