[webkit-reviews] review granted: [Bug 120786] Mouseenter/-leave not triggered when element under cursor is moved/removed : [Attachment 210721] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 6 13:37:32 PDT 2013
Darin Adler <darin at apple.com> has granted Allan Sandfeld Jensen
<allan.jensen at digia.com>'s request for review:
Bug 120786: Mouseenter/-leave not triggered when element under cursor is
moved/removed
https://bugs.webkit.org/show_bug.cgi?id=120786
Attachment 210721: Patch
https://bugs.webkit.org/attachment.cgi?id=210721&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=210721&action=review
We should make a regression test. Can we do that?
I’m going to say r=me, but the lack of a test is a big problem, and there are
some minor issues in the code, too.
> Source/WebCore/page/EventHandler.cpp:3210
> + bool shiftKey;
> + bool ctrlKey;
> + bool altKey;
> + bool metaKey;
> + PlatformKeyboardEvent::getCurrentModifierState(shiftKey,
ctrlKey, altKey, metaKey);
> + PlatformMouseEvent fakeMouseMoveEvent(m_lastKnownMousePosition,
m_lastKnownMouseGlobalPosition, NoButton, PlatformEvent::MouseMoved, 0,
shiftKey, ctrlKey, altKey, metaKey, currentTime());
It doesn’t seem great to combine the latest modifier state with the “last
known” mouse position.
And this code sequence reads awkwardly and poorly here. I would prefer that we
factor this into a separate function, and I also suggest we record the modifier
state when we record the mouse position instead of explicitly re-getting it
now.
More information about the webkit-reviews
mailing list