Index: content/renderer/gpu/gpu_benchmarking_extension.cc |
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc |
index 366d0a8b68aa219db1eab3446ce393848b4eefc8..f491519b81ebe1472efc2bd62af4ce6c77cf8c1f 100644 |
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc |
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc |
@@ -289,6 +289,19 @@ bool BeginSmoothScroll(v8::Isolate* isolate, |
if (!context.Init(false)) |
return false; |
+ if (gesture_source_type == SyntheticGestureParams::MOUSE_INPUT) { |
+ // Ensure the mouse is centered and visible, in case it will |
+ // trigger any hover or mousemove effects. |
+ blink::WebRect contentRect = |
+ context.web_view()->mainFrame()->visibleContentRect(); |
+ blink::WebMouseEvent mouseMove; |
+ mouseMove.type = blink::WebInputEvent::MouseMove; |
+ mouseMove.x = (contentRect.width - contentRect.x) / 2; |
+ mouseMove.y = (contentRect.height - contentRect.y) / 2; |
Ken Russell (switch to Gerrit)
2015/05/26 22:58:32
Sorry if this is a stupid question, but did you me
tdresser
2015/05/27 14:14:16
Uh... Yeah...
Not a stupid question.
Just a stupid
|
+ context.web_view()->handleInputEvent(mouseMove); |
+ context.web_view()->setCursorVisibilityState(true); |
+ } |
+ |
scoped_refptr<CallbackAndContext> callback_and_context = |
new CallbackAndContext( |
isolate, callback, context.web_frame()->mainWorldScriptContext()); |