OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/render_widget_host_view_win.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <peninputpanel_i.c> | 9 #include <peninputpanel_i.c> |
10 #include <stack> | 10 #include <stack> |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 MapWindowPoints(::GetParent(hwnd), hwnd, &client_point, 1); | 414 MapWindowPoints(::GetParent(hwnd), hwnd, &client_point, 1); |
415 POINT screen_point = { location.x(), location.y()}; | 415 POINT screen_point = { location.x(), location.y()}; |
416 MapWindowPoints(hwnd, HWND_DESKTOP, &screen_point, 1); | 416 MapWindowPoints(hwnd, HWND_DESKTOP, &screen_point, 1); |
417 data().x = client_point.x; | 417 data().x = client_point.x; |
418 data().y = client_point.y; | 418 data().y = client_point.y; |
419 data().globalX = screen_point.x; | 419 data().globalX = screen_point.x; |
420 data().globalY = screen_point.y; | 420 data().globalY = screen_point.y; |
421 data().deltaX = details.generic_x(); | 421 data().deltaX = details.generic_x(); |
422 data().deltaY = details.generic_y(); | 422 data().deltaY = details.generic_y(); |
423 data().type = ConvertToWebInputEvent(type_); | 423 data().type = ConvertToWebInputEvent(type_); |
| 424 data().boundingBox = details.bounding_box(); |
424 | 425 |
425 // WebKit gesture events do not have bounding-boxes yet, and expect the data | 426 // WebKit gesture events do not have bounding-boxes yet, and expect the data |
426 // in deltaX/deltaY instead (and instead of bounding box, WebKit expects the | 427 // in deltaX/deltaY instead (and instead of bounding box, WebKit expects the |
427 // radius). This is currently used only for tap events. So special case this | 428 // radius). This is currently used only for tap events. So special case this |
428 // particular case. | 429 // particular case. |
429 // http://crbug.com/138572 | 430 // http://crbug.com/138572 |
430 if (type_ == ui::ET_GESTURE_TAP) { | 431 if (type_ == ui::ET_GESTURE_TAP) { |
431 data().deltaX = details.bounding_box().width() / 2; | 432 data().deltaX = details.bounding_box().width() / 2; |
432 data().deltaY = details.bounding_box().height() / 2; | 433 data().deltaY = details.bounding_box().height() / 2; |
433 } | 434 } |
(...skipping 2728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3162 // receive a focus change in the context of a pointer down message, it means | 3163 // receive a focus change in the context of a pointer down message, it means |
3163 // that the pointer down message occurred on the edit field and we should | 3164 // that the pointer down message occurred on the edit field and we should |
3164 // display the on screen keyboard | 3165 // display the on screen keyboard |
3165 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) | 3166 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) |
3166 DisplayOnScreenKeyboardIfNeeded(); | 3167 DisplayOnScreenKeyboardIfNeeded(); |
3167 received_focus_change_after_pointer_down_ = false; | 3168 received_focus_change_after_pointer_down_ = false; |
3168 pointer_down_context_ = false; | 3169 pointer_down_context_ = false; |
3169 } | 3170 } |
3170 | 3171 |
3171 } // namespace content | 3172 } // namespace content |
OLD | NEW |