Changeset 83442 in webkit


Ignore:
Timestamp:
Apr 11, 2011 7:50:12 AM (13 years ago)
Author:
benjamin.poulain@nokia.com
Message:

[Qt] HTML5 Drag and Drop demos not working
https://bugs.webkit.org/show_bug.cgi?id=56486

Reviewed by Andreas Kling.

Handling the drop with JavaScript was not working with Qt because if the action is ignored
in response to DragEnter, no further events are sent to the view.

Drag and drop is defined and used differently by webpages. The drag move events are determining
what action should take place. To adopt this behavior for Qt, we always accept drag enter events
on the widget.

  • Api/qwebpage.cpp:

(QWebPagePrivate::dragEnterEvent):

Location:
trunk/Source/WebKit/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/qt/Api/qwebpage.cpp

    r82235 r83442  
    980980    Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData));
    981981    ev->setDropAction(action);
    982     if (action != Qt::IgnoreAction)
    983         ev->acceptProposedAction();
     982    ev->acceptProposedAction();
    984983#endif
    985984}
  • trunk/Source/WebKit/qt/ChangeLog

    r83440 r83442  
     12011-04-11  Benjamin Poulain  <benjamin.poulain@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] HTML5 Drag and Drop demos not working
     6        https://bugs.webkit.org/show_bug.cgi?id=56486
     7
     8        Handling the drop with JavaScript was not working with Qt because if the action is ignored
     9        in response to DragEnter, no further events are sent to the view.
     10
     11        Drag and drop is defined and used differently by webpages. The drag move events are determining
     12        what action should take place. To adopt this behavior for Qt, we always accept drag enter events
     13        on the widget.
     14
     15        * Api/qwebpage.cpp:
     16        (QWebPagePrivate::dragEnterEvent):
     17
    1182011-04-11  Andras Becsi  <abecsi@webkit.org>
    219
Note: See TracChangeset for help on using the changeset viewer.