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

Unified Diff: content/browser/renderer_host/input/synthetic_mouse_driver.cc

Issue 2807433003: No pointer captured when the pointer lock is applied (Closed)
Patch Set: pointer lock Created 3 years, 7 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: content/browser/renderer_host/input/synthetic_mouse_driver.cc
diff --git a/content/browser/renderer_host/input/synthetic_mouse_driver.cc b/content/browser/renderer_host/input/synthetic_mouse_driver.cc
index aa76d1b6a2a38197fd2c8c2beb351d7a995cddde..bdc58826bb648933ccd192eb8013cd06ac9406ec 100644
--- a/content/browser/renderer_host/input/synthetic_mouse_driver.cc
+++ b/content/browser/renderer_host/input/synthetic_mouse_driver.cc
@@ -17,7 +17,10 @@ SyntheticMouseDriver::~SyntheticMouseDriver() {}
void SyntheticMouseDriver::DispatchEvent(SyntheticGestureTarget* target,
const base::TimeTicks& timestamp) {
mouse_event_.SetTimeStampSeconds(ConvertTimestampToSeconds(timestamp));
- target->DispatchInputEventToPlatform(mouse_event_);
+ if (mouse_event_.GetType() != blink::WebInputEvent::kUndefined) {
+ target->DispatchInputEventToPlatform(mouse_event_);
+ mouse_event_.SetType(blink::WebInputEvent::kUndefined);
+ }
}
void SyntheticMouseDriver::Press(float x,
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock_after_pointercapture-manual.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698