Changeset 60942 in webkit


Ignore:
Timestamp:
Jun 10, 2010 12:59:09 AM (14 years ago)
Author:
Simon Hausmann
Message:

REGRESSION: [Qt] When dragging onto a page that handles the drag in Javascript it will be a move and not a copy by default
https://bugs.webkit.org/show_bug.cgi?id=40401

Patch by Andy Shaw <andy.shaw@nokia.com> on 2010-06-10
Reviewed by Simon Hausmann.

The correct pattern in Qt for Dnd events is to use acceptProposedAction() instead
of accept().

  • Api/qwebpage.cpp:

(QWebPagePrivate::dragEnterEvent):
(QWebPagePrivate::dragMoveEvent):
(QWebPagePrivate::dropEvent):

Location:
trunk/WebKit/qt
Files:
2 edited

Legend:

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

    r60935 r60942  
    10091009    ev->setDropAction(action);
    10101010    if (action != Qt::IgnoreAction)
    1011         ev->accept();
     1011        ev->acceptProposedAction();
    10121012#endif
    10131013}
     
    10221022    // We must accept this event in order to receive the drag move events that are sent
    10231023    // while the drag and drop action is in progress.
    1024     ev->accept();
     1024    ev->acceptProposedAction();
    10251025#endif
    10261026}
     
    10521052    ev->setDropAction(action);
    10531053    if (action != Qt::IgnoreAction)
    1054         ev->accept();
     1054        ev->acceptProposedAction();
    10551055#endif
    10561056}
     
    10661066    // We must accept this event in order to receive the drag move events that are sent
    10671067    // while the drag and drop action is in progress.
    1068     ev->accept();
     1068    ev->acceptProposedAction();
    10691069#endif
    10701070}
     
    10761076            QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
    10771077    if (page->dragController()->performDrag(&dragData))
    1078         ev->accept();
     1078        ev->acceptProposedAction();
    10791079#endif
    10801080}
     
    10881088                      dropActionToDragOp(Qt::DropAction(ev->dropAction())));
    10891089    if (page->dragController()->performDrag(&dragData))
    1090         ev->accept();
     1090        ev->acceptProposedAction();
    10911091#endif
    10921092}
  • trunk/WebKit/qt/ChangeLog

    r60935 r60942  
     12010-06-10  Andy Shaw  <andy.shaw@nokia.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        REGRESSION: [Qt] When dragging onto a page that handles the drag in Javascript it will be a move and not a copy by default
     6        https://bugs.webkit.org/show_bug.cgi?id=40401
     7
     8        The correct pattern in Qt for Dnd events is to use acceptProposedAction() instead
     9        of accept().
     10
     11        * Api/qwebpage.cpp:
     12        (QWebPagePrivate::dragEnterEvent):
     13        (QWebPagePrivate::dragMoveEvent):
     14        (QWebPagePrivate::dropEvent):
     15
    1162010-06-09  Pierre Rossi  <pierre.rossi@nokia.com>
    217
Note: See TracChangeset for help on using the changeset viewer.