Changeset 140292 in webkit


Ignore:
Timestamp:
Jan 20, 2013 9:12:37 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Dispatch LongPress to inner frames
https://bugs.webkit.org/show_bug.cgi?id=106874

Patch by Yongsheng Zhu <yongsheng.zhu@intel.com> on 2013-01-20
Reviewed by Antonio Gomes.

Source/WebCore:

Do check whether a LongPress gesture event should be passed
to inner frames. If needed, dispatch it.

Tests: fast/events/touch/gesture/long-press-on-draggable-element-in-iframe-triggers-drag.html

fast/events/touch/gesture/long-press-on-draggable-element-in-nested-iframes-triggers-drag.html

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleGestureLongPress):

LayoutTests:

  • fast/events/touch/gesture/long-press-on-draggable-element-in-iframe-triggers-drag.html: Added.
  • fast/events/touch/gesture/long-press-on-draggable-element-in-nested-iframes-triggers-drag.html: Added.
  • fast/events/touch/gesture/resources/drag-inside-iframe2.html: Added.
  • fast/events/touch/gesture/resources/drag-inside-nested-iframes2.html: Added.
  • fast/events/touch/gesture/resources/drag-inside-nested-iframes3.html: Added.
  • platform/chromium/fast/events/touch/gesture/long-press-on-draggable-element-in-iframe-triggers-drag-expected.txt: Added.
  • platform/chromium/fast/events/touch/gesture/long-press-on-draggable-element-in-nested-iframes-triggers-drag-expected.txt: Added.
Location:
trunk
Files:
7 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140290 r140292  
     12013-01-20  Yongsheng Zhu  <yongsheng.zhu@intel.com>
     2
     3        Dispatch LongPress to inner frames
     4        https://bugs.webkit.org/show_bug.cgi?id=106874
     5
     6        Reviewed by Antonio Gomes.
     7
     8        * fast/events/touch/gesture/long-press-on-draggable-element-in-iframe-triggers-drag.html: Added.
     9        * fast/events/touch/gesture/long-press-on-draggable-element-in-nested-iframes-triggers-drag.html: Added.
     10        * fast/events/touch/gesture/resources/drag-inside-iframe2.html: Added.
     11        * fast/events/touch/gesture/resources/drag-inside-nested-iframes2.html: Added.
     12        * fast/events/touch/gesture/resources/drag-inside-nested-iframes3.html: Added.
     13        * platform/chromium/fast/events/touch/gesture/long-press-on-draggable-element-in-iframe-triggers-drag-expected.txt: Added.
     14        * platform/chromium/fast/events/touch/gesture/long-press-on-draggable-element-in-nested-iframes-triggers-drag-expected.txt: Added.
     15
    1162013-01-20  Kent Tamura  <tkent@chromium.org>
    217
  • trunk/Source/WebCore/ChangeLog

    r140291 r140292  
     12013-01-20  Yongsheng Zhu  <yongsheng.zhu@intel.com>
     2
     3        Dispatch LongPress to inner frames
     4        https://bugs.webkit.org/show_bug.cgi?id=106874
     5
     6        Reviewed by Antonio Gomes.
     7
     8        Do check whether a LongPress gesture event should be passed
     9        to inner frames. If needed, dispatch it.
     10
     11        Tests: fast/events/touch/gesture/long-press-on-draggable-element-in-iframe-triggers-drag.html
     12               fast/events/touch/gesture/long-press-on-draggable-element-in-nested-iframes-triggers-drag.html
     13
     14        * page/EventHandler.cpp:
     15        (WebCore::EventHandler::handleGestureLongPress):
     16
    1172013-01-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    218
  • trunk/Source/WebCore/page/EventHandler.cpp

    r140286 r140292  
    25472547        MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseDragEvent);
    25482548        m_didStartDrag = false;
     2549        RefPtr<Frame> subframe = subframeForHitTestResult(mev);
     2550        if (subframe && !m_mouseDownMayStartDrag) {
     2551            if (subframe->eventHandler()->handleGestureLongPress(gestureEvent))
     2552                return true;
     2553        }
    25492554        handleDrag(mev, DontCheckDragHysteresis);
    25502555        if (m_didStartDrag)
Note: See TracChangeset for help on using the changeset viewer.