Changeset 84217 in webkit


Ignore:
Timestamp:
Apr 18, 2011 8:21:10 PM (13 years ago)
Author:
dbates@webkit.org
Message:

2011-04-18 Daniel Bates <dbates@rim.com>

Reviewed by Adam Roben.

With PAN_SCROLLING, mousedown events for a mouse button aren't dispatched while
pressing-and-holding another mouse button
https://bugs.webkit.org/show_bug.cgi?id=58700

Fixes an issue where mousedown events weren't dispatched when pressing a mouse button A
while pressing and holding a mouse button B, where A != B. This issue only affects builds
that enable PAN_SCROLLING.

On mouse press with autoscroll in progress (m_autoscrollInProgress == true) we stopped
the autoscroll timer, invalidated the click, and swallowed the mouse press. Instead, we
should only stop the autoscroll timer.

Test: fast/events/fire-mousedown-while-pressing-mouse-button.html

  • page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent):

2011-04-18 Daniel Bates <dbates@rim.com>

Reviewed by Adam Roben.

With PAN_SCROLLING, mousedown events for a mouse button aren't dispatched while
pressing-and-holding another mouse button
https://bugs.webkit.org/show_bug.cgi?id=58700

Test to ensure that a mousedown event is fired when pressing a mouse button A
while pressing and holding a mouse button B, where A != B.

  • fast/events/fire-mousedown-while-pressing-mouse-button-expected.txt: Added.
  • fast/events/fire-mousedown-while-pressing-mouse-button.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r84209 r84217  
     12011-04-18  Daniel Bates  <dbates@rim.com>
     2
     3        Reviewed by Adam Roben.
     4
     5        With PAN_SCROLLING, mousedown events for a mouse button aren't dispatched while
     6        pressing-and-holding another mouse button
     7        https://bugs.webkit.org/show_bug.cgi?id=58700
     8
     9        Test to ensure that a mousedown event is fired when pressing a mouse button A
     10        while pressing and holding a mouse button B, where A != B.
     11
     12        * fast/events/fire-mousedown-while-pressing-mouse-button-expected.txt: Added.
     13        * fast/events/fire-mousedown-while-pressing-mouse-button.html: Added.
     14
    1152011-04-18  Jessie Berlin  <jberlin@apple.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r84215 r84217  
     12011-04-18  Daniel Bates  <dbates@rim.com>
     2
     3        Reviewed by Adam Roben.
     4
     5        With PAN_SCROLLING, mousedown events for a mouse button aren't dispatched while
     6        pressing-and-holding another mouse button
     7        https://bugs.webkit.org/show_bug.cgi?id=58700
     8
     9        Fixes an issue where mousedown events weren't dispatched when pressing a mouse button A
     10        while pressing and holding a mouse button B, where A != B. This issue only affects builds
     11        that enable PAN_SCROLLING.
     12
     13        On mouse press with autoscroll in progress (m_autoscrollInProgress == true) we stopped
     14        the autoscroll timer, invalidated the click, and swallowed the mouse press. Instead, we
     15        should only stop the autoscroll timer.
     16
     17        Test: fast/events/fire-mousedown-while-pressing-mouse-button.html
     18
     19        * page/EventHandler.cpp:
     20        (WebCore::EventHandler::handleMousePressEvent):
     21
    1222011-04-18  Jon Lee  <jonlee@apple.com>
    223
  • trunk/Source/WebCore/page/EventHandler.cpp

    r83967 r84217  
    13941394
    13951395#if ENABLE(PAN_SCROLLING)
    1396     Page* page = m_frame->page();
    1397     if ((page && page->mainFrame()->eventHandler()->panScrollInProgress()) || m_autoscrollInProgress) {
     1396    // We store whether pan scrolling is in progress before calling stopAutoscrollTimer()
     1397    // because it will set m_panScrollInProgress to false on return.
     1398    bool isPanScrollInProgress = m_frame->page() && m_frame->page()->mainFrame()->eventHandler()->panScrollInProgress();
     1399    if (isPanScrollInProgress || m_autoscrollInProgress)
    13981400        stopAutoscrollTimer();
     1401    if (isPanScrollInProgress) {
     1402        // We invalidate the click when exiting pan scrolling so that we don't inadvertently navigate
     1403        // away from the current page (e.g. the click was on a hyperlink). See <rdar://problem/6095023>.
    13991404        invalidateClick();
    14001405        return true;
Note: See TracChangeset for help on using the changeset viewer.