Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: third_party/WebKit/Source/web/WebFrameWidgetBase.cpp

Issue 2655463015: Correctly set dragLeave and dragEnd coords for OOPIF drag and drop (Closed)
Patch Set: Added checks for null RWH on drag end Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameWidgetBase.h ('k') | third_party/WebKit/public/web/WebFrameWidget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebFrameWidgetBase.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetBase.cpp b/third_party/WebKit/Source/web/WebFrameWidgetBase.cpp
index 5a34a0e3281039667f871319d29c9432646d5c91..79e51fc74f47f7e990c4f1dec0e24542238a19db 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetBase.cpp
+++ b/third_party/WebKit/Source/web/WebFrameWidgetBase.cpp
@@ -72,14 +72,17 @@ WebDragOperation WebFrameWidgetBase::dragTargetDragOver(
modifiers);
}
-void WebFrameWidgetBase::dragTargetDragLeave() {
+void WebFrameWidgetBase::dragTargetDragLeave(const WebPoint& pointInViewport,
+ const WebPoint& screenPoint) {
DCHECK(m_currentDragData);
if (ignoreInputEvents()) {
cancelDrag();
return;
}
- DragData dragData(m_currentDragData.get(), IntPoint(), IntPoint(),
+
+ WebPoint pointInRootFrame(viewportToRootFrame(pointInViewport));
+ DragData dragData(m_currentDragData.get(), pointInRootFrame, screenPoint,
static_cast<DragOperation>(m_operationsAllowed));
page()->dragController().dragExited(&dragData, *toCoreFrame(localRoot()));
@@ -109,7 +112,7 @@ void WebFrameWidgetBase::dragTargetDrop(const WebDragData& webDragData,
if (m_dragOperation == WebDragOperationNone) {
// IPC RACE CONDITION: do not allow this drop.
- dragTargetDragLeave();
+ dragTargetDragLeave(pointInViewport, screenPoint);
return;
}
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameWidgetBase.h ('k') | third_party/WebKit/public/web/WebFrameWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698