Changeset 140321 in webkit


Ignore:
Timestamp:
Jan 21, 2013, 4:06:57 AM (13 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 and reset the touch event emulation flag in window.internals.settings upon test completion.
  • fast/events/touch/emulated-touch-iframe.html: Reset the touch event emulation flag in window.internals.settings upon test completion.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140320 r140321  
     12013-01-21  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          and reset the touch event emulation flag in window.internals.settings upon test completion.
     10        * fast/events/touch/emulated-touch-iframe.html:
     11          Reset the touch event emulation flag in window.internals.settings upon test completion.
     12
    1132013-01-21  Andrey Lushnikov  <lushnikov@chromium.org>
    214
  • trunk/LayoutTests/fast/events/touch/emulate-touch-events.html

    r140313 r140321  
    1919        debug(event.type);
    2020
    21     if (window.testRunner && touchEventsReceived == EXPECTED_TOUCH_EVENTS_TOTAL)
     21    if (window.testRunner && touchEventsReceived == EXPECTED_TOUCH_EVENTS_TOTAL) {
     22        window.internals.settings.setTouchEventEmulationEnabled(false);
    2223        finishJSTest();
     24    }
     25}
     26
     27function mouseMoveCallback(e) {
     28    if (!lastEvent)
     29        debug("Unexpected mousemove event received before touchstart");
    2330}
    2431
     
    2633div.addEventListener("touchmove", touchEventCallback, false);
    2734div.addEventListener("touchend", touchEventCallback, false);
     35div.addEventListener("mousemove", mouseMoveCallback, false);
    2836
    2937function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchCount)
  • trunk/LayoutTests/fast/events/touch/emulated-touch-iframe.html

    r137295 r140321  
    2222
    2323    debug("touchend (test will time out if broken)");
     24    window.internals.settings.setTouchEventEmulationEnabled(false);
    2425    window.testRunner.notifyDone();
    2526}
  • trunk/Source/WebCore/ChangeLog

    r140320 r140321  
     12013-01-21  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  Andrey Lushnikov  <lushnikov@chromium.org>
    214
  • trunk/Source/WebCore/page/EventHandler.cpp

    r140313 r140321  
    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.