[webkit-dev] mouseenter and mouseleave events

Allan Sandfeld Jensen kde at carewolf.com
Tue Apr 16 05:08:12 PDT 2013


Hi webkit-dev

I have recently uploaded a new patch to 
https://bugs.webkit.org/show_bug.cgi?id=18930 to implement mouseenter and 
mouseleave events.

These events are part of DOM3 http://www.w3.org/TR/DOM-Level-3-Events/#events-mouseevents and supported by MSIE, Mozilla and pre-blink Opera. They are also 
listed as issues jQuery needs to work around in WebKit 
https://bugs.webkit.org/show_bug.cgi?id=110007

Previously they have not been implemented because they were not considered 
important, and could cause performance regression by issuing more events on 
every mouse-move that may not even be used by many websites.

After I refactored hit-testing in the fall and especially moved the update of 
hover/active state out of hit-testing, it is now possible to dispatch these 
events where the hover state is updated, which makes the logic of dispatching 
mouseenter and mouseleave events correctly simple. It is also possible to only 
do one check for possible capturing listeners before issuing any mouseenter or 
mouseleave events for a mousemove.

This is what the new patch does. It does incur an additional overhead by 
checking for the existence of capturing listeners, but the check is of lower 
magnitude than existing iterations over the tree, and should keep performance 
comparable, and is in all circumstances faster than issuing new events that 
fall for deaf ears.

Are there more objections for the support of mouseenter and mouseleave events 
in WebKit?

Best Regards
`Allan


More information about the webkit-dev mailing list