RESOLVED FIXED Bug 162745
Implement basic pointer lock behavior for WebKit and WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=162745
Summary Implement basic pointer lock behavior for WebKit and WebKit2.
Jeremy Jones
Reported 2016-09-29 12:22:22 PDT
Implement basic pointer lock behavior for WebKit and WebKit2.
Attachments
Patch (17.36 KB, patch)
2016-09-29 12:58 PDT, Jeremy Jones
no flags
Patch (19.50 KB, patch)
2016-09-29 14:11 PDT, Jeremy Jones
no flags
Patch (19.87 KB, patch)
2016-10-17 15:04 PDT, Jeremy Jones
simon.fraser: review+
Patch for landing. (18.91 KB, patch)
2016-10-21 10:07 PDT, Jeremy Jones
no flags
Patch for landing. (20.97 KB, patch)
2016-10-21 10:28 PDT, Jeremy Jones
no flags
Patch for landing. (20.98 KB, patch)
2016-10-21 10:45 PDT, Jeremy Jones
no flags
Jeremy Jones
Comment 1 2016-09-29 12:55:13 PDT
Jeremy Jones
Comment 2 2016-09-29 12:58:53 PDT
Dean Jackson
Comment 3 2016-09-29 13:38:21 PDT
Comment on attachment 290235 [details] Patch A WK2 owner should probably take a look too.
Jon Lee
Comment 4 2016-09-29 13:39:57 PDT
Comment on attachment 290235 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=290235&action=review r- until we have a WK2 reviewer. > Source/WebCore/ChangeLog:8 > + No new tests until feature is ready to enable. What is the new bug that will deal with test coverage?
Jon Lee
Comment 5 2016-09-29 13:40:24 PDT
Comment on attachment 290235 [details] Patch Sorry, better for it to be r? instead.
Tim Horton
Comment 6 2016-09-29 13:48:36 PDT
Please make the patch not red on all the platforms that we care about :|
Jeremy Jones
Comment 7 2016-09-29 13:55:21 PDT
Use this radar instead: rdar://problem/28550438
Jeremy Jones
Comment 8 2016-09-29 14:07:54 PDT
(In reply to comment #6) > Please make the patch not red on all the platforms that we care about :| I failed up upload the project change that adds 'WebCore/PointerLockController.h' as a WebCore private header.
Jeremy Jones
Comment 9 2016-09-29 14:11:01 PDT
Daniel Bates
Comment 10 2016-09-29 20:44:47 PDT
Can we write tests for this change?
Jeremy Jones
Comment 11 2016-10-05 13:45:31 PDT
(In reply to comment #10) > Can we write tests for this change? New layout tests shouldn't be necessary for this change as there are already many pointer-lock tests in LayoutTests/pointer-lock This change should make some of them pass. I'll annotate with which ones when I finish running the tests.
Simon Fraser (smfr)
Comment 12 2016-10-13 13:56:47 PDT
Comment on attachment 290242 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=290242&action=review > Source/WebKit2/Shared/WebEventConversion.cpp:102 > + m_movementDelta = WebCore::IntPoint(webEvent.deltaX(), webEvent.deltaY()); Should m_movementDelta really be integral? What about mouse positions on retina screens?
Jeremy Jones
Comment 13 2016-10-17 14:48:50 PDT
(In reply to comment #12) > Comment on attachment 290242 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=290242&action=review > > > Source/WebKit2/Shared/WebEventConversion.cpp:102 > > + m_movementDelta = WebCore::IntPoint(webEvent.deltaX(), webEvent.deltaY()); > > Should m_movementDelta really be integral? What about mouse positions on > retina screens? That does make sense. It would require also changing m_position and m_globalPosition. https://bugs.webkit.org/show_bug.cgi?id=163566
Jeremy Jones
Comment 14 2016-10-17 15:04:10 PDT
WebKit Commit Bot
Comment 15 2016-10-17 15:06:44 PDT
Attachment 291880 [details] did not pass style-queue: ERROR: Source/WebKit/mac/WebCoreSupport/WebChromeClient.h:0: Use #pragma once header guard. [build/header_guard] [5] ERROR: Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm:720: No space between ^ and block definition. [whitespace/brackets] [4] Total errors found: 2 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 16 2016-10-20 16:42:59 PDT
Comment on attachment 291880 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291880&action=review > Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm:720 > + dispatch_async(dispatch_get_main_queue(), ^{ Why is the dispatch_async() required?
Tim Horton
Comment 17 2016-10-20 16:47:55 PDT
Comment on attachment 291880 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291880&action=review > Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm:744 > + return false; Always false?
Jeremy Jones
Comment 18 2016-10-21 09:25:05 PDT
(In reply to comment #16) > Comment on attachment 291880 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=291880&action=review > > > Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm:720 > > + dispatch_async(dispatch_get_main_queue(), ^{ > > Why is the dispatch_async() required? The lower level logic doesn't handle receiving didAcquirePointerLock() call before requestPointerLock() returns. I'll remove this from this patch and have a better fix in a subsequent patch.
Jeremy Jones
Comment 19 2016-10-21 09:46:31 PDT
(In reply to comment #18) > (In reply to comment #16) > > Comment on attachment 291880 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=291880&action=review > > > > > Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm:720 > > > + dispatch_async(dispatch_get_main_queue(), ^{ > > > > Why is the dispatch_async() required? > > The lower level logic doesn't handle receiving didAcquirePointerLock() call > before requestPointerLock() returns. I'll remove this from this patch and > have a better fix in a subsequent patch. Actually lower level logic is easily fixed. I'll just remove the dispatch_async workaround.
Jeremy Jones
Comment 20 2016-10-21 09:47:12 PDT
(In reply to comment #17) > Comment on attachment 291880 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=291880&action=review > > > Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm:744 > > + return false; > > Always false? Actually isPointerLock() isn't used. Removed.
Jeremy Jones
Comment 21 2016-10-21 10:07:27 PDT
Created attachment 292361 [details] Patch for landing.
Jeremy Jones
Comment 22 2016-10-21 10:28:21 PDT
Created attachment 292367 [details] Patch for landing.
Jeremy Jones
Comment 23 2016-10-21 10:45:54 PDT
Created attachment 292373 [details] Patch for landing.
WebKit Commit Bot
Comment 24 2016-10-21 11:48:25 PDT
Comment on attachment 292373 [details] Patch for landing. Clearing flags on attachment: 292373 Committed r207689: <http://trac.webkit.org/changeset/207689>
Note You need to log in before you can comment on or make changes to this bug.