Changeset 91416 in webkit


Ignore:
Timestamp:
Jul 20, 2011 4:15:31 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Source/WebCore: mouseover reporting incorrect mouse button, when the button isn't
down. https://bugs.webkit.org/show_bug.cgi?id=64882

Patch by Scott Graham <scottmg@chromium.org> on 2011-07-20
Reviewed by Eric Seidel.

Don't increment the button returned in 'which' unless the button is
actually down.

Test: fast/events/mouseover-button.html

  • dom/MouseEvent.cpp:

(WebCore::MouseEvent::which):

LayoutTests: mouseover event reporting incorrect button in 'which'.
https://bugs.webkit.org/show_bug.cgi?id=64882

New test, move in/out of iframe with none/left/middle buttons down.

Patch by Scott Graham <scottmg@chromium.org> on 2011-07-20
Reviewed by Eric Seidel.

  • fast/events/mouseover-button-expected.txt: Added.
  • fast/events/mouseover-button.html: Added.
  • fast/events/resources/mouseover-button-iframe.html: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r91414 r91416  
     12011-07-20  Scott Graham  <scottmg@chromium.org>
     2
     3        mouseover event reporting incorrect button in 'which'.
     4        https://bugs.webkit.org/show_bug.cgi?id=64882
     5
     6        New test, move in/out of iframe with none/left/middle buttons down.
     7
     8        Reviewed by Eric Seidel.
     9
     10        * fast/events/mouseover-button-expected.txt: Added.
     11        * fast/events/mouseover-button.html: Added.
     12        * fast/events/resources/mouseover-button-iframe.html: Added.
     13
    1142011-07-20  Kenneth Russell  <kbr@google.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r91414 r91416  
     12011-07-20  Scott Graham  <scottmg@chromium.org>
     2
     3        mouseover reporting incorrect mouse button, when the button isn't
     4        down. https://bugs.webkit.org/show_bug.cgi?id=64882
     5
     6        Reviewed by Eric Seidel.
     7
     8        Don't increment the button returned in 'which' unless the button is
     9        actually down.
     10
     11        Test: fast/events/mouseover-button.html
     12
     13        * dom/MouseEvent.cpp:
     14        (WebCore::MouseEvent::which):
     15
    1162011-07-20  Kenneth Russell  <kbr@google.com>
    217
  • trunk/Source/WebCore/dom/MouseEvent.cpp

    r87865 r91416  
    110110    // For the Netscape "which" property, the return values for left, middle and right mouse buttons are 1, 2, 3, respectively.
    111111    // So we must add 1.
     112    if (!m_buttonDown)
     113        return 0;
    112114    return m_button + 1;
    113115}
Note: See TracChangeset for help on using the changeset viewer.