Changeset 186148 in webkit


Ignore:
Timestamp:
Jun 30, 2015 5:08:12 PM (9 years ago)
Author:
enrica@apple.com
Message:

<rdar://problem/20655729> WebKit should heuristically exclude scrolling touch events from the user gesture category

Reviewed by Benjamin Poulain.

  • Platform/spi/ios/UIKitSPI.h:
  • Shared/WebEvent.h:

(WebKit::WebTouchEvent::WebTouchEvent):
(WebKit::WebTouchEvent::position):
(WebKit::WebTouchEvent::isPotentialTap):
(WebKit::WebTouchEvent::isGesture):
(WebKit::WebTouchEvent::gestureScale):
(WebKit::WebTouchEvent::gestureRotation):

  • Shared/WebEventConversion.cpp:

(WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):

  • Shared/ios/NativeWebTouchEventIOS.mm:

(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):

  • Shared/ios/WebTouchEventIOS.cpp:

(WebKit::WebTouchEvent::encode):
(WebKit::WebTouchEvent::decode):
Pipe isPotentialTap through.

Location:
trunk/Source/WebKit2
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r186140 r186148  
     12015-06-30  Enrica Casucci  <enrica@apple.com>
     2
     3        <rdar://problem/20655729> WebKit should heuristically exclude scrolling touch events from the user gesture category
     4
     5        Reviewed by Benjamin Poulain.
     6
     7        * Platform/spi/ios/UIKitSPI.h:
     8        * Shared/WebEvent.h:
     9        (WebKit::WebTouchEvent::WebTouchEvent):
     10        (WebKit::WebTouchEvent::position):
     11        (WebKit::WebTouchEvent::isPotentialTap):
     12        (WebKit::WebTouchEvent::isGesture):
     13        (WebKit::WebTouchEvent::gestureScale):
     14        (WebKit::WebTouchEvent::gestureRotation):
     15        * Shared/WebEventConversion.cpp:
     16        (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
     17        * Shared/ios/NativeWebTouchEventIOS.mm:
     18        (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
     19        * Shared/ios/WebTouchEventIOS.cpp:
     20        (WebKit::WebTouchEvent::encode):
     21        (WebKit::WebTouchEvent::decode):
     22        Pipe isPotentialTap through.
     23
    1242015-06-30  Carlos Alberto Lopez Perez  <clopez@igalia.com>
    225
  • trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h

    r186073 r186148  
    587587    struct _UIWebTouchPoint* touchPoints;
    588588    unsigned touchPointCount;
     589
     590#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000
     591    bool isPotentialTap;
     592#endif
    589593};
    590594
  • trunk/Source/WebKit2/Shared/WebEvent.h

    r185415 r186148  
    326326public:
    327327    WebTouchEvent() { }
    328     WebTouchEvent(WebEvent::Type type, Modifiers modifiers, double timestamp, const Vector<WebPlatformTouchPoint>& touchPoints, WebCore::IntPoint position, bool isGesture, float gestureScale, float gestureRotation)
     328    WebTouchEvent(WebEvent::Type type, Modifiers modifiers, double timestamp, const Vector<WebPlatformTouchPoint>& touchPoints, WebCore::IntPoint position, bool isPotentialTap, bool isGesture, float gestureScale, float gestureRotation)
    329329        : WebEvent(type, modifiers, timestamp)
    330330        , m_touchPoints(touchPoints)
    331331        , m_position(position)
    332332        , m_canPreventNativeGestures(true)
     333        , m_isPotentialTap(isPotentialTap)
    333334        , m_isGesture(isGesture)
    334335        , m_gestureScale(gestureScale)
     
    342343    WebCore::IntPoint position() const { return m_position; }
    343344
     345    bool isPotentialTap() const { return m_isPotentialTap; }
     346
    344347    bool isGesture() const { return m_isGesture; }
    345348    float gestureScale() const { return m_gestureScale; }
     
    359362    WebCore::IntPoint m_position;
    360363    bool m_canPreventNativeGestures;
     364    bool m_isPotentialTap;
    361365    bool m_isGesture;
    362366    float m_gestureScale;
  • trunk/Source/WebKit2/Shared/WebEventConversion.cpp

    r185415 r186148  
    333333        m_canPreventNativeGestures = webEvent.canPreventNativeGestures();
    334334        m_isGesture = webEvent.isGesture();
     335        m_isPotentialTap = webEvent.isPotentialTap();
    335336        m_position = webEvent.position();
    336337        m_globalPosition = webEvent.position();
  • trunk/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm

    r184028 r186148  
    9797
    9898NativeWebTouchEvent::NativeWebTouchEvent(const _UIWebTouchEvent* event)
    99     : WebTouchEvent(webEventTypeForUIWebTouchEventType(event->type), static_cast<Modifiers>(0), event->timestamp, extractWebTouchPoint(event), positionForCGPoint(event->locationInDocumentCoordinates), event->inJavaScriptGesture, event->scale, event->rotation)
     99    : WebTouchEvent(
     100        webEventTypeForUIWebTouchEventType(event->type),
     101        static_cast<Modifiers>(0),
     102        event->timestamp,
     103        extractWebTouchPoint(event),
     104        positionForCGPoint(event->locationInDocumentCoordinates),
     105#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000
     106        event->isPotentialTap,
     107#else
     108        true,
     109#endif
     110        event->inJavaScriptGesture,
     111        event->scale,
     112        event->rotation)
    100113{
    101114}
  • trunk/Source/WebKit2/Shared/ios/WebTouchEventIOS.cpp

    r168393 r186148  
    4242    encoder << m_position;
    4343    encoder << m_canPreventNativeGestures;
     44    encoder << m_isPotentialTap;
    4445    encoder << m_isGesture;
    4546    encoder << m_gestureScale;
     
    5859    if (!decoder.decode(result.m_canPreventNativeGestures))
    5960        return false;
     61    if (!decoder.decode(result.m_isPotentialTap))
     62        return false;
    6063    if (!decoder.decode(result.m_isGesture))
    6164        return false;
Note: See TracChangeset for help on using the changeset viewer.