WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 202956
Bug 99036
[GTK] Enable Pointer Lock feature
https://bugs.webkit.org/show_bug.cgi?id=99036
Summary
[GTK] Enable Pointer Lock feature
Zan Dobersek
Reported
2012-10-11 06:00:26 PDT
Guarded by the ENABLE_POINTER_LOCK feature define. Not currently present in Source/WebCore/GNUmakefile.features.am.
Attachments
Patch
(40.69 KB, patch)
2013-07-25 06:12 PDT
,
Anton Obzhirov
no flags
Details
Formatted Diff
Diff
Patch
(41.03 KB, patch)
2013-07-31 07:38 PDT
,
Anton Obzhirov
no flags
Details
Formatted Diff
Diff
Patch
(51.23 KB, patch)
2013-10-03 08:25 PDT
,
Anton Obzhirov
no flags
Details
Formatted Diff
Diff
Patch
(50.54 KB, patch)
2013-10-03 10:43 PDT
,
Anton Obzhirov
mcatanzaro
: review-
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Anton Obzhirov
Comment 1
2013-02-05 05:38:05 PST
I will have a look on this one.
Anton Obzhirov
Comment 2
2013-07-25 05:55:27 PDT
The tests that are really testing the feature are located in LayoutTests/pointer-lock. Some information about pointer lock:
https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html
https://developer.mozilla.org/en-US/docs/WebAPI/Pointer_Lock
Anton Obzhirov
Comment 3
2013-07-25 06:12:02 PDT
Created
attachment 207452
[details]
Patch
Anton Obzhirov
Comment 4
2013-07-25 06:14:16 PDT
Early path for initial review.
Anton Obzhirov
Comment 5
2013-07-31 07:38:33 PDT
Created
attachment 207851
[details]
Patch
Anton Obzhirov
Comment 6
2013-07-31 07:39:40 PDT
Updated patch to get latest upstream and to get EWS running.
WebKit Commit Bot
Comment 7
2013-07-31 07:40:42 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See
http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Early Warning System Bot
Comment 8
2013-07-31 07:56:03 PDT
Comment on
attachment 207851
[details]
Patch
Attachment 207851
[details]
did not pass qt-wk2-ews (qt-wk2): Output:
http://webkit-queues.appspot.com/results/1297611
EFL EWS Bot
Comment 9
2013-07-31 08:14:04 PDT
Comment on
attachment 207851
[details]
Patch
Attachment 207851
[details]
did not pass efl-wk2-ews (efl-wk2): Output:
http://webkit-queues.appspot.com/results/1290790
Build Bot
Comment 10
2013-07-31 08:32:45 PDT
Comment on
attachment 207851
[details]
Patch
Attachment 207851
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/1296730
Build Bot
Comment 11
2013-07-31 09:36:54 PDT
Comment on
attachment 207851
[details]
Patch
Attachment 207851
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/1290805
Build Bot
Comment 12
2013-07-31 10:40:15 PDT
Comment on
attachment 207851
[details]
Patch
Attachment 207851
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/1297642
Simon Pena
Comment 13
2013-08-16 06:03:08 PDT
I applied your patch locally and then checked
http://threejs.org/examples/misc_controls_pointerlock.html
, and it works! :) (I run it with Tools/Scripts/run-launcher --gtk --release -2 --enable-webgl=TRUE
http://threejs.org/examples/misc_controls_pointerlock.html
) However, I noticed a couple of issues: * First, the lock wasn't released when I pressed Esc, so I had to close minibrowser to stop. * Then, you probably need to do some adjustments on how you calculate the way it turns. In Chromium, you're able to turn 360º, while in Minibrowser the range was something closer to maybe 120º. That also happens when looking up & down. Regarding the patch itself, I didn't check much, but I think you missed some memory cleanup in the webkitWebViewBaseUnlockMouse and webkitWebViewBaseLockMouse methods. Pretty nice! I already look forward to trying
http://media.tojicode.com/q3bsp/
!
Simon Pena
Comment 14
2013-08-19 01:23:36 PDT
I filed a bug about the Quake 3 Map explorer not working due to a crash in JSC, in
bug #119895
Ben Boeckel
Comment 15
2013-09-04 17:46:11 PDT
Should this use permission-request as well? Or is there a guaranteed way to break any pointer lock status?
Anton Obzhirov
Comment 16
2013-09-10 03:04:26 PDT
(In reply to
comment #15
)
> Should this use permission-request as well? Or is there a guaranteed way to break any pointer lock status?
Well ESC should break it - however after checking other browsers they do issue permission request. So probably I need to add it in my patch or create new patch after this one is approved.
Anton Obzhirov
Comment 17
2013-10-03 08:25:55 PDT
Created
attachment 213248
[details]
Patch
EFL EWS Bot
Comment 18
2013-10-03 08:46:07 PDT
Comment on
attachment 213248
[details]
Patch
Attachment 213248
[details]
did not pass efl-wk2-ews (efl-wk2): Output:
http://webkit-queues.appspot.com/results/2918146
Build Bot
Comment 19
2013-10-03 09:08:44 PDT
Comment on
attachment 213248
[details]
Patch
Attachment 213248
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/3109155
Build Bot
Comment 20
2013-10-03 09:42:59 PDT
Comment on
attachment 213248
[details]
Patch
Attachment 213248
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/3116135
Anton Obzhirov
Comment 21
2013-10-03 10:43:17 PDT
Created
attachment 213276
[details]
Patch
Anton Obzhirov
Comment 22
2013-10-04 02:30:28 PDT
Summary about my 2013-10-03 patch: I fixed mouse clipping issue, added handling of ESC key, fixed few other small issues and tried to simplify patch a bit. All tests from LayoutTests/pointer-lock/ are pass. Regarding permission request I am planning to submit it after this patch goes upstream.
Martin Robinson
Comment 23
2013-10-17 11:17:19 PDT
Comment on
attachment 213276
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=213276&action=review
Hrm. I'm not sure I understand why so much of this is in the UI process. It seems like a lot of it could move to the web process and be written in a cross-platform way.
> Source/WTF/wtf/FeatureDefines.h:692 > #if !defined(ENABLE_POINTER_LOCK) > +#if PLATFORM(GTK) > +#define ENABLE_POINTER_LOCK 1 > +#else > #define ENABLE_POINTER_LOCK 0 > #endif > +#endif
This probably isn't the right place to do this. Instead you should define ENABLE_POINTER_LOCK via the Scripts directory.
> Source/WebCore/dom/Document.cpp:5492 > if (Element* target = page()->pointerLockController()->element()) { > - if (target->document() != this) > + if (&target->document() != this) > return; > }
Is this just a build fix? If so, you should split it out into another patch.
> Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h:149 > #endif > - > virtual bool shouldRubberBandInDirection(ScrollDirection) const { return true; }
Looks unecessary
Anton Obzhirov
Comment 24
2013-10-18 01:45:13 PDT
Comment on
attachment 213276
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=213276&action=review
>> Source/WTF/wtf/FeatureDefines.h:692 >> +#endif > > This probably isn't the right place to do this. Instead you should define ENABLE_POINTER_LOCK via the Scripts directory.
Yep, will do that.
>> Source/WebCore/dom/Document.cpp:5492 >> } > > Is this just a build fix? If so, you should split it out into another patch.
Yes. I'll create another patch for this.
>> Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h:149 >> virtual bool shouldRubberBandInDirection(ScrollDirection) const { return true; } > > Looks unecessary
Sorry, forgot to remove white space.
Anton Obzhirov
Comment 25
2013-10-18 02:17:15 PDT
Thanks for the review! About changes in UIProcess - could you clarify what can be made cross platform? In general each platform has it its own way of locking pointer and handling mouse events when mouse locked is different as well (for example I have to move mouse back to the the center of the window to avoid clipping of mouse movements in GTK). I also followed the model they use in blink since it already works there.
Martin Robinson
Comment 26
2013-10-30 12:20:44 PDT
(In reply to
comment #25
)
> Thanks for the review! > > About changes in UIProcess - could you clarify what can be made cross platform? > > In general each platform has it its own way of locking pointer and handling mouse events when mouse locked is different as well (for example I have to move mouse back to the the center of the window to avoid clipping of mouse movements in GTK). I also followed the model they use in blink since it already works there.
I was thinking it might make more sense to just notify that the WebProcess that pointer lock has started and always send the same type of events across the IPC channel. Then the WebProcess can be responsible for interpreting the events properly. I'm not sure it makes sense for the UIProcess to modify the event according to the pointer lock state. Is there a reason this kind of design is infeasible?
Jinwoo Song
Comment 27
2014-03-13 22:02:25 PDT
Is there any more progress? I'd like to start work in EFL port so I'm looking forward this patch to be landed. :)
Anton Obzhirov
Comment 28
2014-03-14 07:08:20 PDT
(In reply to
comment #27
)
> Is there any more progress? I'd like to start work in EFL port so I'm looking forward this patch to be landed. :)
I have a plan to start working on this patch soon. Probably beginning of April. Please let me know if this would be good enough for you, so we can think of some alternative solution otherwise.
Jinwoo Song
Comment 29
2014-03-14 19:50:09 PDT
(In reply to
comment #28
)
> (In reply to
comment #27
) > > Is there any more progress? I'd like to start work in EFL port so I'm looking forward this patch to be landed. :) > I have a plan to start working on this patch soon. Probably beginning of April. Please let me know if this would be good enough for you, so we can think of some alternative solution otherwise.
Sounds good! I'll prepare a patch based on yours.
ChangSeok Oh
Comment 30
2015-07-16 01:48:30 PDT
(In reply to
comment #28
)
> (In reply to
comment #27
) > > Is there any more progress? I'd like to start work in EFL port so I'm looking forward this patch to be landed. :) > I have a plan to start working on this patch soon. Probably beginning of > April. Please let me know if this would be good enough for you, so we can > think of some alternative solution otherwise.
Any update on this?
Michael Catanzaro
Comment 31
2016-01-06 19:46:20 PST
Comment on
attachment 213276
[details]
Patch Looks like this patch needs more work, according to the comments above.
Carlos Alberto Lopez Perez
Comment 32
2019-11-08 08:04:42 PST
I just discovered this bug now :\ This feature has been implemented in the end in bugs 202956 and 203896 *** This bug has been marked as a duplicate of
bug 202956
***
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