[Webkit-unassigned] [Bug 101857] Updating mouse cursor on style changes without emitting fake mousemove event

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 3 13:42:56 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=101857





--- Comment #61 from Aivo Paas <aivopaas at gmail.com>  2012-12-03 13:45:19 PST ---
(In reply to comment #60)
> (From update of attachment 177187 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=177187&action=review
> 
> > Source/WebCore/rendering/RenderObject.cpp:1813
> > +    if (oldStyle.get() && !areCursorsEqual(oldStyle.get(), this->style())) {
> > +        if (Frame* frame = this->frame()) {
> > +            if (node() && node()->hovered())
> > +                frame->eventHandler()->updateCursor();
> > +        }
> > +    }
> 
> The old code did some coalescing (by virtue of the "soon"), and yours does not. I'd be worried that this could create a performance issue.

The old code used a path that was built for use in scrolling, that's why it has the throttling built in. I don't think that changing cursor is so common to affect performance. My code also checks if the node that had the cursor changed is hovered or not. Old code changed the cursor even when cursor was changed on a node that was not hovered, not to mention the completely unnecessary mousemove event that was fired all the way up to javascript.

By the way, there's a lot more code run on every mousemove event. My code is a cleaned up version of that doing only the things needed for changing the cursor. And I couldn't think of a reason why someone would change mouse cursor more often than a mousemove event is fired - unless, of course, if that's what they intend to do.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list