Commit e4398bed authored by abarth@webkit.org's avatar abarth@webkit.org

WebCore::DragController::cleanupAfterSystemDrag should null-check page

https://bugs.webkit.org/show_bug.cgi?id=61815

Reviewed by Eric Seidel.

* page/DragController.cpp:
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::doSystemDrag):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8f475bd3
2012-08-03 Adam Barth <abarth@webkit.org>
WebCore::DragController::cleanupAfterSystemDrag should null-check page
https://bugs.webkit.org/show_bug.cgi?id=61815
Reviewed by Eric Seidel.
* page/DragController.cpp:
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::doSystemDrag):
2012-08-03 Sergio Carlos Morales Angeles <carloschilazo@gmail.com>
Delete text from password does nothing.
......@@ -254,7 +254,7 @@ void DragController::mouseMovedIntoDocument(Document* newDocument)
DragSession DragController::dragEnteredOrUpdated(DragData* dragData)
{
ASSERT(dragData);
ASSERT(m_page->mainFrame()); // It is not possible in Mac WebKit to have a Page without a mainFrame()
ASSERT(m_page->mainFrame());
mouseMovedIntoDocument(m_page->mainFrame()->documentAtPoint(dragData->clientPosition()));
m_dragDestinationAction = m_client->actionMaskForDrag(dragData);
......@@ -892,6 +892,9 @@ void DragController::doSystemDrag(DragImageRef image, const IntPoint& dragLoc, c
RefPtr<FrameView> viewProtector = frameProtector->view();
m_client->startDrag(image, viewProtector->rootViewToContents(frame->view()->contentsToRootView(dragLoc)),
viewProtector->rootViewToContents(frame->view()->contentsToRootView(eventPos)), clipboard, frameProtector.get(), forLink);
// DragClient::startDrag can cause our Page to dispear, deallocating |this|.
if (!frameProtector->page())
return;
cleanupAfterSystemDrag();
}
......
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