Changeset 48500 in webkit


Ignore:
Timestamp:
Sep 17, 2009 10:21:11 PM (15 years ago)
Author:
weinig@apple.com
Message:

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):

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r48499 r48500  
     12009-09-17  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Adele Peterson.
     4
     5        Fix for https://bugs.webkit.org/show_bug.cgi?id=29276
     6        REGRESSION(r48334): WebKit crashes on file select by drag
     7
     8        Document.elementFromPoint now takes point in client space, not page space.
     9
     10        * page/DragController.cpp:
     11        (WebCore::DragController::tryDocumentDrag):
     12        (WebCore::DragController::concludeEditDrag):
     13
    1142009-09-17  Albert J. Wong  <ajwong@chromium.org>
    215
  • trunk/WebCore/page/DragController.cpp

    r48426 r48500  
    289289        }
    290290
    291         IntPoint dragPos = dragData->clientPosition();
    292         IntPoint point = frameView->windowToContents(dragPos);
     291        IntPoint point = frameView->convertFromContainingWindow(dragData->clientPosition());
    293292        Element* element = m_documentUnderMouse->elementFromPoint(point.x(), point.y());
    294293        ASSERT(element);
     
    341340        return false;
    342341
    343     IntPoint point = m_documentUnderMouse->view()->windowToContents(dragData->clientPosition());
     342    IntPoint point = m_documentUnderMouse->view()->convertFromContainingWindow(dragData->clientPosition());
    344343    Element* element =  m_documentUnderMouse->elementFromPoint(point.x(), point.y());
    345344    ASSERT(element);
Note: See TracChangeset for help on using the changeset viewer.