2011-06-21 Yael Aharon <yael.aharon@nokia.com>
authorYael Aharon <yael.aharon@nokia.com>
Tue, 21 Jun 2011 19:18:11 +0000 (19:18 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Tue, 21 Jun 2011 21:38:57 +0000 (18:38 -0300)
commit34a007bedefb01148ae64284f020dbdc4e2f1d96
tree9014ee214b69c3f9d3c9ed7d64fba7a66499c9d7
parentaaba6ea55f96e2c59af19fea65afa67b59c3e09b
2011-06-21  Yael Aharon  <yael.aharon@nokia.com>

        Reviewed by Andreas Kling.

        [Qt] Regression(60942) wrong default action for drag-and-drop.
        https://bugs.webkit.org/show_bug.cgi?id=63004

        Added special handling for the case that dragOperation is not initialized.
        Save the last dropOperation and pass it to the dropEvent, so that it can
        be accepted by QDrag.
        Call event->accepted() and not event->acceptProposedAction(), because the
        later ignores the dropAction specified in JavaScript.

        Tested with the test page attached to https://bugs.webkit.org/show_bug.cgi?id=40401
        and did not see any issue.
        Also manually tested all combinations of LayoutTests/fast/events/drag-and-drop.html
        and they all pass.

        * Api/qwebpage.cpp:
        (dropActionToDragOp):
        (QWebPagePrivate::dragMoveEvent):
        (QWebPagePrivate::dropEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/qt/Api/qwebpage.cpp
Source/WebKit/qt/ChangeLog