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

Side by Side Diff: content/renderer/gpu/gpu_benchmarking_extension.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 (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/renderer/gpu/gpu_benchmarking_extension.h" 5 #include "content/renderer/gpu/gpu_benchmarking_extension.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 if (gesture_source_type == SyntheticGestureParams::MOUSE_INPUT) { 355 if (gesture_source_type == SyntheticGestureParams::MOUSE_INPUT) {
356 // Ensure the mouse is centered and visible, in case it will 356 // Ensure the mouse is centered and visible, in case it will
357 // trigger any hover or mousemove effects. 357 // trigger any hover or mousemove effects.
358 context.web_view()->setIsActive(true); 358 context.web_view()->setIsActive(true);
359 blink::WebRect contentRect = 359 blink::WebRect contentRect =
360 context.web_view()->mainFrame()->visibleContentRect(); 360 context.web_view()->mainFrame()->visibleContentRect();
361 blink::WebMouseEvent mouseMove( 361 blink::WebMouseEvent mouseMove(
362 blink::WebInputEvent::MouseMove, blink::WebInputEvent::NoModifiers, 362 blink::WebInputEvent::MouseMove, blink::WebInputEvent::NoModifiers,
363 ui::EventTimeStampToSeconds(ui::EventTimeForNow())); 363 ui::EventTimeStampToSeconds(ui::EventTimeForNow()));
364 mouseMove.x = (contentRect.x + contentRect.width / 2) * page_scale_factor; 364 mouseMove.setPositionInWidget(
365 mouseMove.y = (contentRect.y + contentRect.height / 2) * page_scale_factor; 365 (contentRect.x + contentRect.width / 2) * page_scale_factor,
366 (contentRect.y + contentRect.height / 2) * page_scale_factor);
366 context.web_view()->handleInputEvent( 367 context.web_view()->handleInputEvent(
367 blink::WebCoalescedInputEvent(mouseMove)); 368 blink::WebCoalescedInputEvent(mouseMove));
368 context.web_view()->setCursorVisibilityState(true); 369 context.web_view()->setCursorVisibilityState(true);
369 } 370 }
370 371
371 scoped_refptr<CallbackAndContext> callback_and_context = 372 scoped_refptr<CallbackAndContext> callback_and_context =
372 new CallbackAndContext( 373 new CallbackAndContext(
373 isolate, callback, context.web_frame()->mainWorldScriptContext()); 374 isolate, callback, context.web_frame()->mainWorldScriptContext());
374 375
375 std::unique_ptr<SyntheticSmoothScrollGestureParams> gesture_params( 376 std::unique_ptr<SyntheticSmoothScrollGestureParams> gesture_params(
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 &gpu_driver_bug_workarounds))) { 1138 &gpu_driver_bug_workarounds))) {
1138 return; 1139 return;
1139 } 1140 }
1140 1141
1141 v8::Local<v8::Value> result; 1142 v8::Local<v8::Value> result;
1142 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result)) 1143 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result))
1143 args->Return(result); 1144 args->Return(result);
1144 } 1145 }
1145 1146
1146 } // namespace content 1147 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | content/renderer/input/render_widget_input_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698