Show
Ignore:
Timestamp:
01/26/07 16:03:56 (2 years ago)
Author:
bdakin
Message:

Reviewed by Darin.

Fix for <rdar://problem/4956565> REGRESSION: After scrolling frame,
hovering over link in this frame doesn't change cursor to pointing
hand

The mouseMove event was not being propagated correctly after using
the mouse to scroll the frame because m_mousePressed was never
getting set to false.

  • page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): This code does not belong here.
  • page/EventHandler.h: lastEventIsMouseUp() is only ever relevant in EventHandlerMac, so it can just be a static function there.
  • page/mac/EventHandlerMac.mm: (WebCore::lastEventIsMouseUp): Make this static. (WebCore::EventHandler::passMouseDownEventToWidget): Here is where we need to set m_mousePressed to false if lastEventIsMouseUp() is true.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/page/EventHandler.cpp

    r19158 r19166  
    748748        else 
    749749            swallowEvent = handleMousePressEvent(mev); 
    750          
    751         // Many AK widgets run their own event loops and consume events while the mouse is down. 
    752         // When they finish, currentEvent is the mouseUp that they exited on.  We need to update 
    753         // the khtml state with this mouseUp, which khtml never saw. 
    754         // If this event isn't a mouseUp, we assume that the mouseUp will be coming later.  There 
    755         // is a hole here if the widget consumes the mouseUp and subsequent events. 
    756         if (lastEventIsMouseUp()) 
    757             m_mousePressed = false; 
    758750    } 
    759751