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

Unified Diff: content/shell/renderer/test_runner/event_sender.cc

Issue 878413003: Support buttons attribute for drag event (chromium side). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years, 9 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: content/shell/renderer/test_runner/event_sender.cc
diff --git a/content/shell/renderer/test_runner/event_sender.cc b/content/shell/renderer/test_runner/event_sender.cc
index 8706b8643211bf3ce4311ce42c76519ff9a006de..e54a95872fe3f239c7419605f20afb26038ba3c8 100644
--- a/content/shell/renderer/test_runner/event_sender.cc
+++ b/content/shell/renderer/test_runner/event_sender.cc
@@ -1102,6 +1102,7 @@ void EventSenderBindings::SetWmSysDeadChar(int sys_dead_char) {
// EventSender -----------------------------------------------------------------
WebMouseEvent::Button EventSender::pressed_button_ = WebMouseEvent::ButtonNone;
+int EventSender::modifiers_ = 0;
WebPoint EventSender::last_mouse_pos_;
@@ -1206,14 +1207,18 @@ void EventSender::DoDragDrop(const WebDragData& drag_data,
last_mouse_pos_,
GetCurrentEventTimeSec(),
click_count_,
- 0,
+ modifiers_,
&event);
WebPoint client_point(event.x, event.y);
WebPoint screen_point(event.globalX, event.globalY);
current_drag_data_ = drag_data;
current_drag_effects_allowed_ = mask;
current_drag_effect_ = view_->dragTargetDragEnter(
- drag_data, client_point, screen_point, current_drag_effects_allowed_, 0);
+ drag_data,
+ client_point,
+ screen_point,
+ current_drag_effects_allowed_,
+ modifiers_);
// Finish processing events.
ReplaySavedEvents();
@@ -1231,6 +1236,7 @@ void EventSender::MouseDown(int button_number, int modifiers) {
UpdateClickCountForButton(button_type);
pressed_button_ = button_type;
+ modifiers_ = modifiers;
WebMouseEvent event;
InitMouseEvent(WebInputEvent::MouseDown,
@@ -2441,7 +2447,10 @@ void EventSender::DoMouseUp(const WebMouseEvent& e) {
FinishDragAndDrop(
e,
view_->dragTargetDragOver(
- client_point, screen_point, current_drag_effects_allowed_, 0));
+ client_point,
+ screen_point,
+ current_drag_effects_allowed_,
+ e.modifiers));
}
void EventSender::DoMouseMove(const WebMouseEvent& e) {
@@ -2457,7 +2466,7 @@ void EventSender::DoMouseMove(const WebMouseEvent& e) {
WebPoint client_point(e.x, e.y);
WebPoint screen_point(e.globalX, e.globalY);
current_drag_effect_ = view_->dragTargetDragOver(
- client_point, screen_point, current_drag_effects_allowed_, 0);
+ client_point, screen_point, current_drag_effects_allowed_, e.modifiers);
}
void EventSender::ReplaySavedEvents() {
« no previous file with comments | « content/shell/renderer/test_runner/event_sender.h ('k') | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698