Changeset 140311 in webkit


Ignore:
Timestamp:
Jan 21, 2013 12:49:54 AM (11 years ago)
Author:
apavlov@chromium.org
Message:

Web Inspector: Do not dispatch mousemove when emulating touch event and no touch is active
https://bugs.webkit.org/show_bug.cgi?id=107419

Reviewed by Pavel Feldman.

Source/WebCore:

mousemove event should not be dispatched when emulating touch events and mouse button is not pressed

  • page/EventHandler.cpp:

(WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):

LayoutTests:

  • fast/events/touch/emulate-touch-events.html: Test that mousemove is dispatched not more than once.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140310 r140311  
     12013-01-20  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Web Inspector: Do not dispatch mousemove when emulating touch event and no touch is active
     4        https://bugs.webkit.org/show_bug.cgi?id=107419
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * fast/events/touch/emulate-touch-events.html: Test that mousemove is dispatched not more than once.
     9
    1102013-01-21  Tommy Widenflycht  <tommyw@google.com>
    211
  • trunk/LayoutTests/fast/events/touch/emulate-touch-events.html

    r120792 r140311  
    1010var lastEvent = null;
    1111var touchEventsReceived = 0;
     12var mouseMoveEventsReceived = 0;
    1213var EXPECTED_TOUCH_EVENTS_TOTAL = 3;
    1314
     
    2324}
    2425
     26function mouseMoveCallback(e) {
     27    if (++mouseMoveEventsReceived === 2)
     28        debug("Unexpected mousemove event received before touchstart");
     29}
     30
    2531div.addEventListener("touchstart", touchEventCallback, false);
    2632div.addEventListener("touchmove", touchEventCallback, false);
    2733div.addEventListener("touchend", touchEventCallback, false);
     34div.addEventListener("mousemove", mouseMoveCallback, false);
    2835
    2936function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchCount)
  • trunk/Source/WebCore/ChangeLog

    r140310 r140311  
     12013-01-20  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Web Inspector: Do not dispatch mousemove when emulating touch event and no touch is active
     4        https://bugs.webkit.org/show_bug.cgi?id=107419
     5
     6        Reviewed by Pavel Feldman.
     7
     8        mousemove event should not be dispatched when emulating touch events and mouse button is not pressed
     9
     10        * page/EventHandler.cpp:
     11        (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
     12
    1132013-01-21  Tommy Widenflycht  <tommyw@google.com>
    214
  • trunk/Source/WebCore/page/EventHandler.cpp

    r140292 r140311  
    39823982
    39833983    if (eventType == PlatformEvent::MouseMoved && !m_touchPressed)
    3984         return false;
     3984        return true;
    39853985
    39863986    HitTestRequest request(HitTestRequest::Active);
Note: See TracChangeset for help on using the changeset viewer.