Changeset 148624 in webkit


Ignore:
Timestamp:
Apr 17, 2013, 12:14:30 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Check image node with usemap attribute isLink failed
https://bugs.webkit.org/show_bug.cgi?id=114751

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

PR 326780
Internally Reviewed by Liam Quinn.

An image node with usemap will crash when call isLink.
If the node is linkNode, bring up the CCM(eg. linked image).
Also use toElement method as agomes suggested in pr 113957.

  • Api/WebPage.cpp:

(BlackBerry::WebKit::WebPagePrivate::webContext):

  • WebKitSupport/FatFingers.cpp:

(BlackBerry::WebKit::FatFingers::findBestPoint):

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

Legend:

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

    r148575 r148624  
    21622162    bool nodeAllowSelectionOverride = false;
    21632163    Node* linkNode = node->enclosingLinkEventParentOrSelf();
    2164     if (node->isLink() || (node->isTextNode() && linkNode)) {
     2164    // 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.
     2165    if ((node == linkNode) || (node->isTextNode() && linkNode)) {
    21652166        KURL href;
    21662167        if (linkNode->isLink() && linkNode->hasAttributes()) {
  • trunk/Source/WebKit/blackberry/ChangeLog

    r148575 r148624  
     12013-04-17  Tiancheng Jiang  <tijiang@rim.com>
     2
     3        [BlackBerry] Check image node with usemap attribute isLink failed
     4        https://bugs.webkit.org/show_bug.cgi?id=114751
     5
     6        Reviewed by Rob Buis.
     7
     8        PR 326780
     9        Internally Reviewed by Liam Quinn.
     10
     11        An image node with usemap will crash when call isLink.
     12        If the node is linkNode, bring up the CCM(eg. linked image).
     13        Also use toElement method as agomes suggested in pr 113957.
     14
     15        * Api/WebPage.cpp:
     16        (BlackBerry::WebKit::WebPagePrivate::webContext):
     17        * WebKitSupport/FatFingers.cpp:
     18        (BlackBerry::WebKit::FatFingers::findBestPoint):
     19
    1202013-04-16  Nima Ghanavatian  <nghanavatian@blackberry.com>
    221
  • trunk/Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp

    r147807 r148624  
    171171        node = node->parentNode();
    172172
    173     Element* elementUnderPoint = static_cast<Element*>(node);
     173    Element* elementUnderPoint = toElement(node);
    174174
    175175    if (elementUnderPoint) {
Note: See TracChangeset for help on using the changeset viewer.