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

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

Issue 10830081: Remove code that sets |deltaX| and |deltaY| for WebKit gesture tap events (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 POINT screen_point = { location.x(), location.y()}; 412 POINT screen_point = { location.x(), location.y()};
413 MapWindowPoints(hwnd, HWND_DESKTOP, &screen_point, 1); 413 MapWindowPoints(hwnd, HWND_DESKTOP, &screen_point, 1);
414 data().x = client_point.x; 414 data().x = client_point.x;
415 data().y = client_point.y; 415 data().y = client_point.y;
416 data().globalX = screen_point.x; 416 data().globalX = screen_point.x;
417 data().globalY = screen_point.y; 417 data().globalY = screen_point.y;
418 data().deltaX = details.generic_x(); 418 data().deltaX = details.generic_x();
419 data().deltaY = details.generic_y(); 419 data().deltaY = details.generic_y();
420 data().type = ConvertToWebInputEvent(type_); 420 data().type = ConvertToWebInputEvent(type_);
421 data().boundingBox = details.bounding_box(); 421 data().boundingBox = details.bounding_box();
422
423 // WebKit gesture events do not have bounding-boxes yet, and expect the data
424 // in deltaX/deltaY instead (and instead of bounding box, WebKit expects the
425 // radius). This is currently used only for tap events. So special case this
426 // particular case.
427 // http://crbug.com/138572
428 if (type_ == ui::ET_GESTURE_TAP) {
429 data().deltaX = details.bounding_box().width() / 2;
430 data().deltaY = details.bounding_box().height() / 2;
431 }
432 } 422 }
433 423
434 virtual int GetLowestTouchId() const OVERRIDE { 424 virtual int GetLowestTouchId() const OVERRIDE {
435 return LowestBit(touch_ids_bitfield_); 425 return LowestBit(touch_ids_bitfield_);
436 } 426 }
437 427
438 ui::EventType type() { 428 ui::EventType type() {
439 return type_; 429 return type_;
440 } 430 }
441 431
(...skipping 2716 matching lines...) Expand 10 before | Expand all | Expand 10 after
3158 // receive a focus change in the context of a pointer down message, it means 3148 // receive a focus change in the context of a pointer down message, it means
3159 // that the pointer down message occurred on the edit field and we should 3149 // that the pointer down message occurred on the edit field and we should
3160 // display the on screen keyboard 3150 // display the on screen keyboard
3161 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_) 3151 if (!received_focus_change_after_pointer_down_ && virtual_keyboard_)
3162 DisplayOnScreenKeyboardIfNeeded(); 3152 DisplayOnScreenKeyboardIfNeeded();
3163 received_focus_change_after_pointer_down_ = false; 3153 received_focus_change_after_pointer_down_ = false;
3164 pointer_down_context_ = false; 3154 pointer_down_context_ = false;
3165 } 3155 }
3166 3156
3167 } // namespace content 3157 } // 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