Commit 7c2f4a32 authored by weinig@apple.com's avatar weinig@apple.com

Fix for https://bugs.webkit.org/show_bug.cgi?id=29276

REGRESSION(r48334): WebKit crashes on file select by drag

Reviewed by Adele Peterson.

Document.elementFromPoint now takes point in client space, not page space.

* page/DragController.cpp:
(WebCore::DragController::tryDocumentDrag):
(WebCore::DragController::concludeEditDrag):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 85a391e1
2009-09-17 Sam Weinig <sam@webkit.org>
Reviewed by Adele Peterson.
Fix for https://bugs.webkit.org/show_bug.cgi?id=29276
REGRESSION(r48334): WebKit crashes on file select by drag
Document.elementFromPoint now takes point in client space, not page space.
* page/DragController.cpp:
(WebCore::DragController::tryDocumentDrag):
(WebCore::DragController::concludeEditDrag):
2009-09-17 Albert J. Wong <ajwong@chromium.org>
Reviewed by David Levin.
......@@ -288,8 +288,7 @@ bool DragController::tryDocumentDrag(DragData* dragData, DragDestinationAction a
return true;
}
IntPoint dragPos = dragData->clientPosition();
IntPoint point = frameView->windowToContents(dragPos);
IntPoint point = frameView->convertFromContainingWindow(dragData->clientPosition());
Element* element = m_documentUnderMouse->elementFromPoint(point.x(), point.y());
ASSERT(element);
if (!asFileInput(element)) {
......@@ -340,7 +339,7 @@ bool DragController::concludeEditDrag(DragData* dragData)
if (!m_documentUnderMouse)
return false;
IntPoint point = m_documentUnderMouse->view()->windowToContents(dragData->clientPosition());
IntPoint point = m_documentUnderMouse->view()->convertFromContainingWindow(dragData->clientPosition());
Element* element = m_documentUnderMouse->elementFromPoint(point.x(), point.y());
ASSERT(element);
Frame* innerFrame = element->ownerDocument()->frame();
......
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