Commit 793ea993 authored by bdakin@apple.com's avatar bdakin@apple.com

2009-04-30 Beth Dakin <bdakin@apple.com>

        Reviewed by Oliver Hunt.

        Fix for <rdar://problem/6841106> REGRESSION: Crash drag selecting 
        To Do's in a Mail note (excessive recursion in mouse drag tracking)

        Oliver's recent change to dragging seems to have revealed a long-
        time bug in passSubframeEventToSubframe where we did not set 
        m_sendingEventToSubview to true before calling 
        handleMouseMoveEvent() in the NSMouseMoved case. This patch fixes 
        that and adds ASSERTions around all of the places where 
        m_sendingEventToSubview is set to true and then false to make sure 
        we are not trampling its state.

        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::eventLoopHandleMouseDragged):
        (WebCore::EventHandler::eventLoopHandleMouseUp):
        (WebCore::EventHandler::passSubframeEventToSubframe):
        (WebCore::EventHandler::passWheelEventToWidget):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 33fd41d8
2009-04-30 Beth Dakin <bdakin@apple.com>
Reviewed by Oliver Hunt.
Fix for <rdar://problem/6841106> REGRESSION: Crash drag selecting
To Do's in a Mail note (excessive recursion in mouse drag tracking)
Oliver's recent change to dragging seems to have revealed a long-
time bug in passSubframeEventToSubframe where we did not set
m_sendingEventToSubview to true before calling
handleMouseMoveEvent() in the NSMouseMoved case. This patch fixes
that and adds ASSERTions around all of the places where
m_sendingEventToSubview is set to true and then false to make sure
we are not trampling its state.
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::eventLoopHandleMouseDragged):
(WebCore::EventHandler::eventLoopHandleMouseUp):
(WebCore::EventHandler::passSubframeEventToSubframe):
(WebCore::EventHandler::passWheelEventToWidget):
2009-04-30 Eric Carlson <eric.carlson@apple.com>
Reviewed by Simon Fraser.
......@@ -352,6 +352,7 @@ bool EventHandler::eventLoopHandleMouseDragged(const MouseEventWithHitTestResult
return false;
if (!m_mouseDownWasInSubframe) {
ASSERT(!m_sendingEventToSubview);
m_sendingEventToSubview = true;
BEGIN_BLOCK_OBJC_EXCEPTIONS;
[view mouseDragged:currentEvent().get()];
......@@ -378,6 +379,7 @@ bool EventHandler::eventLoopHandleMouseUp(const MouseEventWithHitTestResults&)
return false;
if (!m_mouseDownWasInSubframe) {
ASSERT(!m_sendingEventToSubview);
m_sendingEventToSubview = true;
BEGIN_BLOCK_OBJC_EXCEPTIONS;
[view mouseUp:currentEvent().get()];
......@@ -406,7 +408,10 @@ bool EventHandler::passSubframeEventToSubframe(MouseEventWithHitTestResults& eve
// Since we're passing in currentEvent() here, we can call
// handleMouseMoveEvent() directly, since the save/restore of
// currentEvent() that mouseMoved() does would have no effect.
ASSERT(!m_sendingEventToSubview);
m_sendingEventToSubview = true;
subframe->eventHandler()->handleMouseMoveEvent(currentEvent().get(), hoveredNode);
m_sendingEventToSubview = false;
return true;
case NSLeftMouseDown: {
......@@ -490,6 +495,7 @@ bool EventHandler::passWheelEventToWidget(PlatformWheelEvent&, Widget* widget)
// We probably hit the border of a RenderWidget
return false;
ASSERT(!m_sendingEventToSubview);
m_sendingEventToSubview = true;
// Work around <rdar://problem/6806810> which can cause -[NSScrollView scrollWheel:] to
// crash if the NSScrollView is released during timer or network callback dispatch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment