• allan.jensen@digia.com's avatar
    Mouseenter/-leave not triggered when element under cursor is moved/removed · f297334e
    allan.jensen@digia.com authored
    https://bugs.webkit.org/show_bug.cgi?id=120786
    
    Reviewed by Antonio Gomes.
    
    Source/WebCore:
    
    When a hovered element is detached it will now emit a fake mousemove event
    similar to what happens when a hovered element has CSS display set to none.
    
    Test: fast/events/mouseenterleave-detached-element.html
    
    * dom/Document.cpp:
    (WebCore::Document::hoveredElementDidDetach):
    * page/EventHandler.cpp:
    (WebCore::EventHandler::EventHandler):
    (WebCore::EventHandler::clear):
    (WebCore::EventHandler::handleMouseMoveEvent):
    * page/EventHandler.h:
    
    LayoutTests:
    
    Test of mouseenter/mouseleave events when a hovered element is removed.
    
    * fast/events/mouseenterleave-detached-element-expected.txt: Added.
    * fast/events/mouseenterleave-detached-element.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    f297334e
EventHandler.cpp 155 KB