Title: [209464] trunk/Source/WebCore
Revision
209464
Author
jer.no...@apple.com
Date
2016-12-07 11:30:45 -0800 (Wed, 07 Dec 2016)

Log Message

[pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key.
https://bugs.webkit.org/show_bug.cgi?id=165377

Reviewed by Eric Carlson.

Follow up to previous patch; clear the m_forceCursorVisibleUponUnlock flag upon losing
pointer lock, so that subsequent unlocks don't erroneously cause the cursor to become
visible.

* page/PointerLockController.cpp:
(WebCore::PointerLockController::didLosePointerLock):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (209463 => 209464)


--- trunk/Source/WebCore/ChangeLog	2016-12-07 19:21:11 UTC (rev 209463)
+++ trunk/Source/WebCore/ChangeLog	2016-12-07 19:30:45 UTC (rev 209464)
@@ -1,3 +1,17 @@
+2016-12-07  Jer Noble  <jer.no...@apple.com>
+
+        [pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key.
+        https://bugs.webkit.org/show_bug.cgi?id=165377
+
+        Reviewed by Eric Carlson.
+
+        Follow up to previous patch; clear the m_forceCursorVisibleUponUnlock flag upon losing
+        pointer lock, so that subsequent unlocks don't erroneously cause the cursor to become
+        visible. 
+
+        * page/PointerLockController.cpp:
+        (WebCore::PointerLockController::didLosePointerLock):
+
 2016-12-06  Geoffrey Garen  <gga...@apple.com>
 
         performance.now() should truncate to 100us

Modified: trunk/Source/WebCore/page/PointerLockController.cpp (209463 => 209464)


--- trunk/Source/WebCore/page/PointerLockController.cpp	2016-12-07 19:21:11 UTC (rev 209463)
+++ trunk/Source/WebCore/page/PointerLockController.cpp	2016-12-07 19:30:45 UTC (rev 209464)
@@ -154,8 +154,10 @@
     enqueueEvent(eventNames().pointerlockchangeEvent, m_element ? &m_element->document() : m_documentOfRemovedElementWhileWaitingForUnlock.get());
     clearElement();
     m_documentOfRemovedElementWhileWaitingForUnlock = nullptr;
-    if (m_forceCursorVisibleUponUnlock)
+    if (m_forceCursorVisibleUponUnlock) {
+        m_forceCursorVisibleUponUnlock = false;
         m_page.chrome().client().setCursorHiddenUntilMouseMoves(false);
+    }
 }
 
 void PointerLockController::dispatchLockedMouseEvent(const PlatformMouseEvent& event, const AtomicString& eventType)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to