diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2017-01-17 15:30:11 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2017-01-18 09:08:57 +0000 |
commit | 8eab45ef460cc6614094ec287dda73febdf3e720 (patch) | |
tree | e270fea749a8278347254e5ffd87ac76d3d4876c /src/core/web_contents_adapter_p.h | |
parent | 42c6033724e2b5a54702d626c57806e53f163c62 (diff) |
Fix conversion from blink::WebDragOperation to Qt::DropAction
blink::WebDragOperation is a bit field, even if it is not used in
its blink::WebDragOperationsMask incarnation. In particular,
WebDragOperationGeneric can be set in addition to other operations.
This fixes situations where UpdateDragCursor is called with multiple
bits set in its WebDragOperationArgument and the drag action will be
spuriously ignored.
Also directly pass the WebDragOperation we get from UpdateDragCursor to
chromium's API without converting to QDropAction and then converting it
back.
Task-number: QTBUG-58037
Change-Id: I5c85699de534771f84db69abf7b98e779872a0f7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter_p.h')
-rw-r--r-- | src/core/web_contents_adapter_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/web_contents_adapter_p.h b/src/core/web_contents_adapter_p.h index 23a1aaef4..2d8490c7b 100644 --- a/src/core/web_contents_adapter_p.h +++ b/src/core/web_contents_adapter_p.h @@ -55,6 +55,7 @@ #include <base/callback.h> #include "base/memory/ref_counted.h" +#include <third_party/WebKit/public/platform/WebDragOperation.h> #include <QScopedPointer> #include <QSharedPointer> @@ -93,7 +94,7 @@ public: quint64 nextRequestId; int lastFindRequestId; std::unique_ptr<content::DropData> currentDropData; - Qt::DropAction currentDropAction; + blink::WebDragOperation currentDropAction; bool inDragUpdateLoop; base::Closure dragUpdateLoopQuitClosure; QScopedPointer<QTimer> updateDragCursorMessagePollingTimer; |