2008-08-06 Benjamin C Meyer <ben@meyerhome.net>
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Aug 2008 13:30:07 +0000 (13:30 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Aug 2008 13:30:07 +0000 (13:30 +0000)
        Reviewed by Simon.

        During the drag operation only accept the event if the action is not ignore action.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35603 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/qt/Api/qwebpage.cpp
WebKit/qt/ChangeLog

index 9796bf73e39a23ed478c0d55f7a9e17227ebfca9..66a24fcca2d7b502bc30f435582ba3461915244b 100644 (file)
@@ -734,7 +734,8 @@ void QWebPagePrivate::dragEnterEvent(QDragEnterEvent *ev)
                       dropActionToDragOp(ev->possibleActions()));
     Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData));
     ev->setDropAction(action);
-    ev->accept();
+    if (action != Qt::IgnoreAction)
+        ev->accept();
 #endif
 }
 
@@ -754,7 +755,8 @@ void QWebPagePrivate::dragMoveEvent(QDragMoveEvent *ev)
                       dropActionToDragOp(ev->possibleActions()));
     Qt::DropAction action = dragOpToDropAction(page->dragController()->dragUpdated(&dragData));
     ev->setDropAction(action);
-    ev->accept();
+    if (action != Qt::IgnoreAction)
+        ev->accept();
 #endif
 }
 
@@ -764,7 +766,8 @@ void QWebPagePrivate::dropEvent(QDropEvent *ev)
     DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(),
                       dropActionToDragOp(ev->possibleActions()));
     Qt::DropAction action = dragOpToDropAction(page->dragController()->performDrag(&dragData));
-    ev->accept();
+    if (action != Qt::IgnoreAction)
+        ev->accept();
 #endif
 }
 
index 4189b65045cfd5559e429a08b45f317bc2fbeba5..7124fad4a618bbf396bcc323b7751473b7c74712 100644 (file)
@@ -1,3 +1,14 @@
+2008-08-06  Benjamin C Meyer  <ben@meyerhome.net>
+
+        Reviewed by Simon.
+
+        During the drag operation only accept the event if the action is not ignore action.
+
+        * Api/qwebpage.cpp:
+        (QWebPagePrivate::dragEnterEvent):
+        (QWebPagePrivate::dragMoveEvent):
+        (QWebPagePrivate::dropEvent):
+
 2008-08-06  Ariya Hidayat  <ariya.hidayat@trolltech.com>
 
         Fix the Qt build due to recent ScriptController refactoring.