WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
165377
[pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key.
https://bugs.webkit.org/show_bug.cgi?id=165377
Summary
[pointer-lock] Cursor should become visible when exiting pointer-lock via ESC...
Jer Noble
Reported
2016-12-05 09:14:57 PST
[pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key.
Attachments
Patch
(5.56 KB, patch)
2016-12-05 09:23 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch for landing
(6.66 KB, patch)
2016-12-05 10:56 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch for landing
(6.63 KB, patch)
2016-12-05 15:26 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Follow-Up Patch
(1.88 KB, patch)
2016-12-07 08:32 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2016-12-05 09:23:09 PST
Created
attachment 296146
[details]
Patch
Darin Adler
Comment 2
2016-12-05 09:30:26 PST
Comment on
attachment 296146
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=296146&action=review
> Source/WebCore/page/PointerLockController.h:50 > + enum ForceCursorVisibleFlag { > + DoNotForceCursorVisible, > + ForceCursorVisible, > + };
I suggest using an enum class: enum class ShouldForceCursorVisible { Yes, No }; I also suggest defining this on a single line instead of four lines.
> Source/WebCore/page/PointerLockController.h:52 > void elementRemoved(Element*);
These functions that take pointers are so old fashioned. They should take references unless there is some reason they need to work with null.
Darin Adler
Comment 3
2016-12-05 09:31:07 PST
Comment on
attachment 296146
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=296146&action=review
> Source/WebCore/page/PointerLockController.h:51 > + void requestPointerUnlock(ForceCursorVisibleFlag);
I suggest two different functions instead of one function with a flag. We can use the flag internally, but it is less clear for callers than two separate functions with good names would be.
Jer Noble
Comment 4
2016-12-05 10:56:20 PST
Created
attachment 296161
[details]
Patch for landing
Jon Lee
Comment 5
2016-12-05 15:17:42 PST
rdar://problem/29081718
Jer Noble
Comment 6
2016-12-05 15:26:16 PST
Created
attachment 296201
[details]
Patch for landing
WebKit Commit Bot
Comment 7
2016-12-05 16:47:35 PST
Comment on
attachment 296201
[details]
Patch for landing Rejecting
attachment 296201
[details]
from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: x86_64/RenderButton.dia -c /Volumes/Data/EWS/WebKit/Source/WebCore/rendering/RenderButton.cpp -o /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/RenderButton.o ** BUILD FAILED ** The following build commands failed: CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/PointerLockController.o page/PointerLockController.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Full output:
http://webkit-queues.webkit.org/results/2629953
Jer Noble
Comment 8
2016-12-06 08:41:33 PST
Committed
r209394
: <
http://trac.webkit.org/changeset/209394
>
Darin Adler
Comment 9
2016-12-06 18:55:07 PST
Comment on
attachment 296201
[details]
Patch for landing View in context:
https://bugs.webkit.org/attachment.cgi?id=296201&action=review
> Source/WebCore/page/PointerLockController.cpp:157 > + if (m_forceCursorVisibleUponUnlock) > + m_page.chrome().client().setCursorHiddenUntilMouseMoves(false);
Shouldn't we set m_forceCursorVisibleUponUnlock back to false here?
Jer Noble
Comment 10
2016-12-07 07:12:03 PST
Comment on
attachment 296201
[details]
Patch for landing View in context:
https://bugs.webkit.org/attachment.cgi?id=296201&action=review
>> Source/WebCore/page/PointerLockController.cpp:157 >> + m_page.chrome().client().setCursorHiddenUntilMouseMoves(false); > > Shouldn't we set m_forceCursorVisibleUponUnlock back to false here?
Gah, you're right. I'll fix that s in a follow-up.
Jer Noble
Comment 11
2016-12-07 08:32:48 PST
Reopening to attach new patch.
Jer Noble
Comment 12
2016-12-07 08:32:54 PST
Created
attachment 296392
[details]
Follow-Up Patch
WebKit Commit Bot
Comment 13
2016-12-07 11:31:12 PST
Comment on
attachment 296392
[details]
Follow-Up Patch Clearing flags on attachment: 296392 Committed
r209464
: <
http://trac.webkit.org/changeset/209464
>
WebKit Commit Bot
Comment 14
2016-12-07 11:31:18 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug