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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 10806092: Expose bounding-rectangle for the touch-points in a gesture event in WebGestureEvent (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/web_input_event_aurax11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/web_input_event_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698