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

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

Issue 2650403006: Remove PlatformMouseEvent and use WebMouseEvent instead (Closed)
Patch Set: Created 3 years, 11 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
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 00a0c73407b793a48fa16517984c57b6afb6bb56..5a34a0e3281039667f871319d29c9432646d5c91 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetBase.cpp
+++ b/third_party/WebKit/Source/web/WebFrameWidgetBase.cpp
@@ -131,16 +131,19 @@ void WebFrameWidgetBase::dragSourceEndedAt(const WebPoint& pointInViewport,
cancelDrag();
return;
}
- WebPoint pointInRootFrame(
+ WebFloatPoint pointInRootFrame(
page()->frameHost().visualViewport().viewportToRootFrame(
pointInViewport));
- PlatformMouseEvent pme(
- pointInRootFrame, screenPoint, WebPointerProperties::Button::Left,
- PlatformEvent::MouseMoved, 0, PlatformEvent::NoModifiers,
- PlatformMouseEvent::RealOrIndistinguishable, TimeTicks::Now());
+
+ WebMouseEvent fakeMouseMove(WebInputEvent::MouseMove, pointInRootFrame,
+ WebFloatPoint(screenPoint.x, screenPoint.y),
+ WebPointerProperties::Button::Left, 0,
+ PlatformEvent::NoModifiers,
+ TimeTicks::Now().InSeconds());
+ fakeMouseMove.setFrameScale(1);
toCoreFrame(localRoot())
->eventHandler()
- .dragSourceEndedAt(pme, static_cast<DragOperation>(operation));
+ .dragSourceEndedAt(fakeMouseMove, static_cast<DragOperation>(operation));
}
void WebFrameWidgetBase::dragSourceSystemDragEnded() {

Powered by Google App Engine
This is Rietveld 408576698