⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 173450 in webkit


Ignore:
Timestamp:
Sep 9, 2014, 4:16:55 PM (12 years ago)
Author:
enrica@apple.com
Message:

REGRESSION (WebKit2): -webkit-touch-callout: none has no effect.
​https://bugs.webkit.org/show_bug.cgi?id=136685
rdar://problem/17629840

Reviewed by Benjamin Poulain.

We need to check if the touch callout is enabled for the element before starting
the long press gesture.
The information about the touch callout is returned together with the rest of data
returned by the InteractionInformationAtPosition.

  • Shared/InteractionInformationAtPosition.cpp:

(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):

  • Shared/InteractionInformationAtPosition.h:

(WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _actionForLongPress]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPositionInformation):

Location:
trunk/Source/WebKit2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r173443 r173450  
     12014-09-09  Enrica Casucci  <enrica@apple.com>
     2
     3        REGRESSION (WebKit2): -webkit-touch-callout: none has no effect.
     4        https://bugs.webkit.org/show_bug.cgi?id=136685
     5        rdar://problem/17629840
     6
     7        Reviewed by Benjamin Poulain.
     8
     9        We need to check if the touch callout is enabled for the element before starting
     10        the long press gesture.
     11        The information about the touch callout is returned together with the rest of data
     12        returned by the InteractionInformationAtPosition.
     13
     14        * Shared/InteractionInformationAtPosition.cpp:
     15        (WebKit::InteractionInformationAtPosition::encode):
     16        (WebKit::InteractionInformationAtPosition::decode):
     17        * Shared/InteractionInformationAtPosition.h:
     18        (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
     19        * UIProcess/ios/WKContentViewInteraction.mm:
     20        (-[WKContentView _actionForLongPress]):
     21        * WebProcess/WebPage/ios/WebPageIOS.mm:
     22        (WebKit::WebPage::getPositionInformation):
     23
    1242014-09-09  Benjamin Poulain  <bpoulain@apple.com>
    225
  • trunk/Source/WebKit2/Shared/InteractionInformationAtPosition.cpp

    r171057 r173450  
    3939    encoder << isSelectable;
    4040    encoder << isNearMarkedText;
     41    encoder << touchCalloutEnabled;
    4142    encoder << clickableElementName;
    4243    encoder << url;
    … …  
    6465        return false;
    6566
     67    if (!decoder.decode(result.touchCalloutEnabled))
     68        return false;
     69   
    6670    if (!decoder.decode(result.clickableElementName))
    6771        return false;
  • trunk/Source/WebKit2/Shared/InteractionInformationAtPosition.h

    r171848 r173450  
    4444        , isSelectable(false)
    4545        , isNearMarkedText(false)
     46        , touchCalloutEnabled(true)
    4647    {
    4748    }
    … …  
    5152    bool isSelectable;
    5253    bool isNearMarkedText;
     54    bool touchCalloutEnabled;
    5355    String clickableElementName;
    5456    String url;
  • trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm

    r173045 r173450  
    783783- (SEL)_actionForLongPress
    784784{
     785    if (!_positionInformation.touchCalloutEnabled)
     786        return nil;
     787
    785788    if (_positionInformation.clickableElementName == "IMG")
    786789        return @selector(_showImageSheet);
  • trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm

    r173071 r173450  
    19061906            if (linkElement && info.title.isEmpty())
    19071907                info.title = element->innerText();
    1908             if (element->renderer())
     1908            if (element->renderer()) {
    19091909                info.bounds = element->renderer()->absoluteBoundingBoxRect(true);
     1910                info.touchCalloutEnabled = element->renderer()->style().touchCalloutEnabled();
     1911            }
    19101912        }
    19111913    }
Note: See TracChangeset for help on using the changeset viewer.