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

Side by Side Diff: content/renderer/input/render_widget_input_handler.cc

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Rebased, fixed a comment in web_input_event_builders_mac.mm Created 3 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/renderer/input/render_widget_input_handler.h" 5 #include "content/renderer/input/render_widget_input_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 if (widget_->compositor()) { 253 if (widget_->compositor()) {
254 latency_info_swap_promise_monitor = 254 latency_info_swap_promise_monitor =
255 widget_->compositor()->CreateLatencyInfoSwapPromiseMonitor( 255 widget_->compositor()->CreateLatencyInfoSwapPromiseMonitor(
256 &swap_latency_info); 256 &swap_latency_info);
257 } 257 }
258 258
259 bool prevent_default = false; 259 bool prevent_default = false;
260 if (WebInputEvent::isMouseEventType(input_event.type())) { 260 if (WebInputEvent::isMouseEventType(input_event.type())) {
261 const WebMouseEvent& mouse_event = 261 const WebMouseEvent& mouse_event =
262 static_cast<const WebMouseEvent&>(input_event); 262 static_cast<const WebMouseEvent&>(input_event);
263 TRACE_EVENT2("renderer", "HandleMouseMove", "x", mouse_event.x, "y", 263 TRACE_EVENT2("renderer", "HandleMouseMove", "x",
264 mouse_event.y); 264 mouse_event.positionInWidget().x, "y",
265 mouse_event.positionInWidget().y);
265 context_menu_source_type_ = ui::MENU_SOURCE_MOUSE; 266 context_menu_source_type_ = ui::MENU_SOURCE_MOUSE;
266 prevent_default = delegate_->WillHandleMouseEvent(mouse_event); 267 prevent_default = delegate_->WillHandleMouseEvent(mouse_event);
267 } 268 }
268 269
269 if (WebInputEvent::isKeyboardEventType(input_event.type())) { 270 if (WebInputEvent::isKeyboardEventType(input_event.type())) {
270 context_menu_source_type_ = ui::MENU_SOURCE_KEYBOARD; 271 context_menu_source_type_ = ui::MENU_SOURCE_KEYBOARD;
271 #if defined(OS_ANDROID) 272 #if defined(OS_ANDROID)
272 // The DPAD_CENTER key on Android has a dual semantic: (1) in the general 273 // The DPAD_CENTER key on Android has a dual semantic: (1) in the general
273 // case it should behave like a select key (i.e. causing a click if a button 274 // case it should behave like a select key (i.e. causing a click if a button
274 // is focused). However, if a text field is focused (2), its intended 275 // is focused). However, if a text field is focused (2), its intended
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 // it can be bundled in the event ack. 466 // it can be bundled in the event ack.
466 if (handling_event_overscroll_) { 467 if (handling_event_overscroll_) {
467 *handling_event_overscroll_ = std::move(params); 468 *handling_event_overscroll_ = std::move(params);
468 return; 469 return;
469 } 470 }
470 471
471 delegate_->OnDidOverscroll(*params); 472 delegate_->OnDidOverscroll(*params);
472 } 473 }
473 474
474 } // namespace content 475 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/gpu_benchmarking_extension.cc ('k') | content/renderer/pepper/event_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698