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

Unified Diff: components/html_viewer/html_frame.cc

Issue 1313353010: Overhaul Mandoline event transport code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed gn check Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/html_viewer/html_frame.cc
diff --git a/components/html_viewer/html_frame.cc b/components/html_viewer/html_frame.cc
index 1d2405965a63ed533649ae7858c0e9c8869e94fd..77d1524d59798db7f3949790f647d325e09fe12e 100644
--- a/components/html_viewer/html_frame.cc
+++ b/components/html_viewer/html_frame.cc
@@ -631,10 +631,12 @@ void HTMLFrame::OnViewDestroyed(View* view) {
void HTMLFrame::OnViewInputEvent(View* view, const mojo::EventPtr& event) {
if (event->pointer_data) {
// Blink expects coordintes to be in DIPs.
- event->pointer_data->x /= global_state()->device_pixel_ratio();
- event->pointer_data->y /= global_state()->device_pixel_ratio();
- event->pointer_data->screen_x /= global_state()->device_pixel_ratio();
- event->pointer_data->screen_y /= global_state()->device_pixel_ratio();
+ event->pointer_data->location->x /= global_state()->device_pixel_ratio();
+ event->pointer_data->location->y /= global_state()->device_pixel_ratio();
+ event->pointer_data->location->screen_x /=
+ global_state()->device_pixel_ratio();
+ event->pointer_data->location->screen_y /=
+ global_state()->device_pixel_ratio();
}
blink::WebWidget* web_widget = GetWebWidget();
« no previous file with comments | « components/html_viewer/blink_input_events_type_converters.cc ('k') | components/html_viewer/input_events_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698