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

Unified Diff: third_party/WebKit/Source/core/input/PointerEventManager.cpp

Issue 2807433003: No pointer captured when the pointer lock is applied (Closed)
Patch Set: Merge tests and rename functions 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: third_party/WebKit/Source/core/input/PointerEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/PointerEventManager.cpp b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
index 798a336662dfbd9f8346265269e2788c16a9cc0a..d7b2eeb285f810fe7a165c6cf5fb79c3e9de079c 100644
--- a/third_party/WebKit/Source/core/input/PointerEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
@@ -549,6 +549,8 @@ bool PointerEventManager::GetPointerCaptureState(
return pointer_capture_target_temp != pending_pointercapture_target_temp;
}
+// TODO(727333): Replace the last two parameters by a single WebMouseEvent
mustaq 2017/05/29 18:37:44 Nit: Let's stick to the official style: TODO(lanwe
lanwei 2017/05/30 17:11:36 Done.
+// pointer which defaults to null.
EventTarget* PointerEventManager::ProcessCaptureAndPositionOfPointerEvent(
PointerEvent* pointer_event,
EventTarget* hit_test_target,
@@ -608,6 +610,14 @@ void PointerEventManager::ProcessPendingPointerCapture(
}
}
+void PointerEventManager::ProcessPendingPointerCaptureForPointerLock(
+ const WebMouseEvent& mouse_event) {
+ PointerEvent* pointer_event = pointer_event_factory_.Create(
+ EventTypeNames::mousemove, mouse_event, Vector<WebMouseEvent>(),
+ frame_->GetDocument()->domWindow());
+ ProcessPendingPointerCapture(pointer_event);
+}
+
void PointerEventManager::RemoveTargetFromPointerCapturingMapping(
PointerCapturingMap& map,
const EventTarget* target) {
@@ -667,6 +677,10 @@ void PointerEventManager::ReleasePointerCapture(int pointer_id,
ReleasePointerCapture(pointer_id);
}
+void PointerEventManager::ReleaseMousePointerCapture() {
+ ReleasePointerCapture(PointerEventFactory::kMouseId);
+}
+
bool PointerEventManager::HasPointerCapture(int pointer_id,
const EventTarget* target) const {
return pending_pointer_capture_target_.at(pointer_id) == target;

Powered by Google App Engine
This is Rietveld 408576698