| 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..0d19f6ee30c66853fd98567390846183a147cb1c 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,20 +112,24 @@ 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 old_button_state,
|
| + int new_button_state,
|
| + 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;
|
| @@ -134,10 +138,20 @@ WebMouseEvent WebMouseEventBuilder::Build(
|
| result.clickCount = click_count;
|
| result.modifiers = modifiers;
|
|
|
| - if (type == WebInputEvent::MouseDown || type == WebInputEvent::MouseUp)
|
| - result.button = button;
|
| - else
|
| - result.button = WebMouseEvent::Button::NoButton;
|
| + int android_buttons_changed = 0;
|
| + if (type == WebInputEvent::MouseDown)
|
| + android_buttons_changed = new_button_state & ~old_button_state;
|
| + else if (type == WebInputEvent::MouseUp)
|
| + android_buttons_changed = old_button_state & ~new_button_state;
|
| +
|
| + ui::SetWebPointerPropertiesFromMotionEventData(
|
| + result,
|
| + pointer_id,
|
| + pressure,
|
| + orientation_rad,
|
| + tilt_rad,
|
| + android_buttons_changed,
|
| + tool_type);
|
|
|
| return result;
|
| }
|
|
|