My favorites | Sign in
Project Home Downloads Wiki Issues Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 236215: Support mouseenter and mouseleave
8 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  mkwst@chromium.org
Closed:  Jul 2013
Cc:  meh@chromium.org

Blocking:
issue 176671


Sign in to add a comment
 
Reported by stepien....@gmail.com, Apr 28, 2013
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31

Steps to reproduce the problem:
WebKit added support for mouseenter and mouseleave, would love Blink to port this patch.

What is the expected behavior?

What went wrong?
http://trac.webkit.org/changeset/149173

Did this work before? No 

Chrome version: 26.0.1410.63  Channel: stable
OS Version:
Apr 29, 2013
#1 tkent@chromium.org
(No comment was entered for this change.)
Labels: Cr-Blink
May 9, 2013
#2 xkramb...@gmail.com
Please, support mouseenter/mouseleave as soon as possible. Google Chrome is not that last browser that remains with this unimplemented.

MouseEnter and MouseLeave are events defined by W3C, and will be fine if implemented:

http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-type-mouseenter
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-type-mouseleave

Of course there are some workarrounds, but there are not as fine as a native solution.

Thanks for your work!
Jun 30, 2013
#3 mkwst@chromium.org
It's a good patch. I'll work on porting this over.
Owner: mkwst@chromium.org
Jun 30, 2013
#4 mkwst@chromium.org
(No comment was entered for this change.)
Status: Assigned
Cc: meh@chromium.org
Jul 2, 2013
#5 mkwst@chromium.org
(No comment was entered for this change.)
Blocking: chromium:176671
Jul 8, 2013
#6 bugdro...@chromium.org
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=153664

------------------------------------------------------------------------
r153664 | mkwst@chromium.org | 2013-07-08T09:52:21.535238Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=153664&r2=153663&pathrev=153664
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/Document.cpp?r1=153664&r2=153663&pathrev=153664

Optimize (slightly) Document::updateHoverActiveState.

When walking up the chain of potentially effected elements, we can stop
updating hover state as soon as we hit the common ancestor of the newly
hovered element and the previously hovered element. This is a tiny
optimization; it should result in no web-visible change in behavior.

This patch is extracted from the larger mouseenter/mouseleave WebKit
patch[1] submitted by allan.jensen@digia.com (carewolf), reviewed by
David Hyatt.

[1]: http://trac.webkit.org/changeset/149173,

BUG=236215

Review URL: https://chromiumcodereview.appspot.com/18297002
------------------------------------------------------------------------
Jul 10, 2013
#7 bugdro...@chromium.org
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=153877

------------------------------------------------------------------------
r153877 | mkwst@chromium.org | 2013-07-10T10:08:28.807278Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/page/DOMWindow.h?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/EventNames.h?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/Document.cpp?r1=153877&r2=153876&pathrev=153877
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/mouseenter-mouseleave-chained-listeners-expected.txt?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/svg/SVGElementInstance.cpp?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/Element.idl?r1=153877&r2=153876&pathrev=153877
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/mouseenter-mouseleave-inline-attributes-expected.txt?r1=153877&r2=153876&pathrev=153877
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/mouseenter-mouseleave-expected.txt?r1=153877&r2=153876&pathrev=153877
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/mouseenter-mouseleave-capture-expected.txt?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/Document.h?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/svg/SVGElementInstance.h?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/HTMLAttributeNames.in?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/EventListenerMap.cpp?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/svg/SVGElement.cpp?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/page/Window.idl?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/MouseEvent.cpp?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/EventListenerMap.h?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/EventTarget.h?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/Element.h?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/HTMLElement.cpp?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/svg/SVGElementInstance.idl?r1=153877&r2=153876&pathrev=153877
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/mouseenter-mouseleave-chained-listeners.html?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/Document.idl?r1=153877&r2=153876&pathrev=153877
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/mouseenter-mouseleave-inline-attributes.html?r1=153877&r2=153876&pathrev=153877
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/mouseenter-mouseleave.html?r1=153877&r2=153876&pathrev=153877
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/events/mouseenter-mouseleave-capture.html?r1=153877&r2=153876&pathrev=153877
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/scripts/CodeGeneratorV8.pm?r1=153877&r2=153876&pathrev=153877

Implement 'mouseenter' and 'mouseleave' from DOM Level 3 Events.

This patch adds 'mouseenter' and 'mouseleave' as accepted event names in
a variety of places, and does the core of the implementation inside
Document::updateHoverActiveState. Since we're already doing all the
testing there to determine hover state (which 'mouseenter'/'mouseleave'
closely mirrors), that method now accepts a PlatformMouseEvent*
parameter, using it to directly dispatch the new events on relevant
nodes.

A bit of logic has also been added to that method to ensure that we only
generate events when an event handler is listening for them, as
performance is otherwise slightly less than awesome. This optimization
requires the addition of an EventTarget method to determine if capturing
event listeners exist (which requires the addition of an
EventListenerMap method to do the dirty work).

This patch is a lightly modified version of the mouseenter/mouseleave
WebKit patch[1] submitted by allan.jensen@digia.com (carewolf), reviewed
by David Hyatt.

[1]: http://trac.webkit.org/changeset/149173

BUG=236215

Review URL: https://chromiumcodereview.appspot.com/18836002
------------------------------------------------------------------------
Jul 10, 2013
#8 stepien....@gmail.com
Hooray
Jul 28, 2013
#9 mkwst@chromium.org
(No comment was entered for this change.)
Status: Fixed
Aug 1, 2013
#10 rby...@chromium.org
(No comment was entered for this change.)
Labels: -OS-Linux OS-All M-30
Sep 5, 2013
#11 karl.boh...@gmail.com
This implementation does not work like IE/Firefox when it comes to mouseenter events triggered by DOM-changes instead of mouse movement.

I created a new bug, but maybe I should have commented here also/instead. Since this will soon enter stable, I'll add a reference here and hope somebody notices. https://code.google.com/p/chromium/issues/detail?id=276329
Sign in to add a comment

Powered by Google Project Hosting