• darin's avatar
    WebCore: · c9a8d22b
    darin authored
            Reviewed by Maciej and Richard.
    
    	- fixed 3125497 -- REGRESSION: Infinite recursion with mouseUp: events
    
    	The problem was that events could end up back at the same part due to the responder chain.
    
            * kwq/KWQKHTMLPart.h: Added mouseDown, mouseDragged, mouseUp, mouseMoved, buttonForCurrentEvent,
    	and stateForCurrentEvent. Remove setCurrentEvent and currentEvent. Renamed handleMouseDownEventForWidget
    	to passWidgetMouseDownEventToWidget. John and I had agreed to this name change before the last commit,
    	but I forgot.
    
            * kwq/KWQKHTMLPart.mm:
            (KWQKHTMLPart::KWQKHTMLPart): Initialize _sendingEventToSubview to false. No need to initialize
    	_mouseDownWasInSubframe at all since it's only looked at when _mouseDownView is non-nil.
            (KWQKHTMLPart::keyEvent): Save and restore _currentEvent instead of setting to nil.
    	Use stateForCurrentEvent instead of stateForEvent:.
            (KWQKHTMLPart::khtmlMousePressEvent): Name change.
            (KWQKHTMLPart::khtmlMouseDoubleClickEvent): Name change.
            (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Name change. Set _sendingEventToSubview when
            sending event to subview.
            (KWQKHTMLPart::khtmlMouseReleaseEvent): Name change. Set _sendingEventToSubview when sending
    	event to subview.
            (KWQKHTMLPart::passSubframeEventToSubframe): Name change. Set _sendingEventToSubview when
    	sending event to subview.
            (KWQKHTMLPart::buttonForCurrentEvent): Added. Similar to code I moved here from WebCoreBridge.
            (KWQKHTMLPart::stateForCurrentEvent): Added. Similar to code I moved here from WebCoreBridge.
            (KWQKHTMLPart::mouseDown): Added. Similar to code I moved here from WebCoreBridge, except returns
    	and does nothing if _sendingEventToSubview is set.
            (KWQKHTMLPart::mouseDragged): Ditto.
            (KWQKHTMLPart::mouseUp): Ditto.
            (KWQKHTMLPart::mouseMoved): Added. Similar to code I moved here from WebCoreBridge.
    
            * kwq/WebCoreBridge.mm:
            (-[WebCoreBridge mouseDown:]): Just call _part->mouseDown().
            (-[WebCoreBridge mouseDragged:]): Just call _part->mouseDragged().
            (-[WebCoreBridge mouseUp:]): Just call _part->mouseUp().
            (-[WebCoreBridge mouseMoved:]): Just call _part->mouseMoved().
    
            * kwq/WebCoreBridgePrivate.h: Removed.
            * WebCore.pbproj/project.pbxproj: Removed WebCoreBridgePrivate.h.
    
    WebKit:
    
            Reviewed by Maciej and Richard.
    
            - fixed reentrancy crash I ran into while debugging infinite recursion bugs
    
            * WebView.subproj/WebHTMLViewPrivate.m:
            (-[WebHTMLView _updateMouseoverWithFakeEvent]): Added. Does part of what _frameOrBoundsChanged did.
            (-[WebHTMLView _frameOrBoundsChanged]): Schedule the mouseover update to happen soon, rather than
            doing it right away. If we do it right away, we might reenter because sending a mouse moved event
            can result in another layout since mouse moved events are the same as mouse dragged events in KHTML.
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView viewWillMoveToWindow:]): Cancel the scheduled mouseover update.
    
            * WebKit.pbproj/project.pbxproj: Electron uber alles.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    c9a8d22b
ChangeLog-2005-08-23 42 KB