Commit 346107ea authored by oliver@apple.com's avatar oliver@apple.com

<rdar://problem/5537289> REGRESSION: Dragging a link or an image from an...

<rdar://problem/5537289> REGRESSION: Dragging a link or an image from an IFrame causes the page to not respond to clicks afterwards (15460)

Reviewed by John S.

EventHandler needs to reset these fields when a drag terminates, otherwise
EventHandler is left in an inconsistent state when a drag is initiated on a
page with multiple frames.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6778a7f1
......@@ -9,6 +9,22 @@
with a detail of 2 or higher comes in. This prevents the selection.
* page/inspector/inspector.css: Mark the breadcrumb as user-select: none.
2007-11-12 Oliver Hunt <oliver@apple.com>
Reviewed by John S.
<rdar://problem/5537289> REGRESSION: Dragging a link or an image from an IFrame causes the page to not respond to clicks afterwards (15460)
EventHandler needs to reset these fields when a drag terminates, otherwise
EventHandler is left in an inconsistent state when a drag is initiated on a
page with multiple frames.
* page/EventHandler.cpp:
(WebCore::EventHandler::cancelDragAndDrop):
(WebCore::EventHandler::performDragAndDrop):
(WebCore::EventHandler::clearDragState):
* page/EventHandler.h:
2007-11-12 Oliver Hunt <oliver@apple.com>
Reviewed by Darin and Antti.
......
......@@ -1177,7 +1177,7 @@ void EventHandler::cancelDragAndDrop(const PlatformMouseEvent& event, Clipboard*
else
dispatchDragEvent(dragleaveEvent, m_dragTarget.get(), event, clipboard);
}
m_dragTarget = 0;
clearDragState();
}
bool EventHandler::performDragAndDrop(const PlatformMouseEvent& event, Clipboard* clipboard)
......@@ -1191,10 +1191,19 @@ bool EventHandler::performDragAndDrop(const PlatformMouseEvent& event, Clipboard
else
accept = dispatchDragEvent(dropEvent, m_dragTarget.get(), event, clipboard);
}
m_dragTarget = 0;
clearDragState();
return accept;
}
void EventHandler::clearDragState()
{
m_dragTarget = 0;
m_capturingMouseEventsNode = 0;
#if PLATFORM(MAC)
m_sendingEventToSubview = false;
#endif
}
Node* EventHandler::nodeUnderMouse() const
{
return m_nodeUnderMouse.get();
......
......@@ -222,6 +222,7 @@ private:
bool handleDrag(const MouseEventWithHitTestResults&);
bool handleMouseUp(const MouseEventWithHitTestResults&);
void clearDragState();
bool dispatchDragSrcEvent(const AtomicString& eventType, const PlatformMouseEvent&);
......
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