Index: content/browser/renderer_host/input/web_input_event_builders_android.cc |
diff --git a/content/browser/renderer_host/input/web_input_event_builders_android.cc b/content/browser/renderer_host/input/web_input_event_builders_android.cc |
index 016665399a487bceb948b457ef39652e539189a8..9e893110611bd8c163e015505bec316321f225ef 100644 |
--- a/content/browser/renderer_host/input/web_input_event_builders_android.cc |
+++ b/content/browser/renderer_host/input/web_input_event_builders_android.cc |
@@ -112,32 +112,39 @@ WebKeyboardEvent WebKeyboardEventBuilder::Build( |
} |
WebMouseEvent WebMouseEventBuilder::Build( |
- WebInputEvent::Type type, |
- WebMouseEvent::Button button, |
- double time_sec, |
- int window_x, |
- int window_y, |
- int modifiers, |
- int click_count, |
- WebPointerProperties::PointerType pointer_type) { |
+ WebInputEvent::Type type, |
+ double time_sec, |
+ int window_x, |
+ int window_y, |
+ int modifiers, |
+ int click_count, |
+ int pointer_id, |
+ float pressure, |
+ float orientation_rad, |
+ float tilt_rad, |
+ int changed_button, |
+ int tool_type) { |
DCHECK(WebInputEvent::isMouseEventType(type)); |
WebMouseEvent result; |
result.type = type; |
- result.pointerType = pointer_type; |
result.x = window_x; |
result.y = window_y; |
result.windowX = window_x; |
result.windowY = window_y; |
result.timeStampSeconds = time_sec; |
result.clickCount = click_count; |
- result.modifiers = modifiers; |
- |
- if (type == WebInputEvent::MouseDown || type == WebInputEvent::MouseUp) |
- result.button = button; |
- else |
- result.button = WebMouseEvent::Button::NoButton; |
+ result.modifiers = ui::EventFlagsToWebEventModifiers(modifiers); |
+ |
+ ui::SetWebPointerPropertiesFromMotionEventData( |
+ result, |
+ pointer_id, |
+ pressure, |
+ orientation_rad, |
+ tilt_rad, |
+ changed_button, |
+ tool_type); |
return result; |
} |