[webkit-reviews] review granted: [Bug 101857] Updating mouse cursor on style changes without emitting fake mousemove event : [Attachment 191721] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 6 09:30:40 PST 2013


Darin Adler <darin at apple.com> has granted Aivo Paas <aivopaas at gmail.com>'s
request for review:
Bug 101857: Updating mouse cursor on style changes without emitting fake
mousemove event
https://bugs.webkit.org/show_bug.cgi?id=101857

Attachment 191721: Patch
https://bugs.webkit.org/attachment.cgi?id=191721&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=191721&action=review


Seems OK. A few things that I still think need improvement, but good enough to
land.

> Source/WebCore/page/EventHandler.cpp:1254
> +    bool shiftKey;
> +    bool ctrlKey;
> +    bool altKey;
> +    bool metaKey;
> +    PlatformKeyboardEvent::getCurrentModifierState(shiftKey, ctrlKey,
altKey, metaKey);
> +
> +    HitTestRequest request(HitTestRequest::ReadOnly);
> +    HitTestResult result(view->windowToContents(m_lastKnownMousePosition));

As I mentioned in my previous comment, conceptually both mouse position changes
and modifier key states come in to the event handler as a stream. It’s a
mistake to pair a saved mouse position with a freshly obtained shift key state.


> Source/WebCore/page/EventHandler.cpp:1280
> +    bool originalIsText = node->isTextNode();

I think a better name would be originalNodeWasText.

> Source/WebCore/page/EventHandler.cpp:1282
> +    if (node && originalIsText)
> +	   node = node->parentNode();

This call to parentNode is new code. Why does this change need to be made? Does
it improve something?

> Source/WebCore/page/FrameView.h:343
> +    virtual bool shouldSetCursor() const;

Why virtual?


More information about the webkit-reviews mailing list