Bug 167775 - WK1 mouse events are missing movementX and movementY for pointerlock.
Summary: WK1 mouse events are missing movementX and movementY for pointerlock.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jeremy Jones
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-02-02 21:36 PST by Jeremy Jones
Modified: 2020-12-30 12:38 PST (History)
5 users (show)

See Also:


Attachments
Patch (9.79 KB, patch)
2017-02-02 21:51 PST, Jeremy Jones
ap: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-elcapitan (909.99 KB, application/zip)
2017-02-02 22:54 PST, Build Bot
no flags Details
Archive of layout-test-results from ews107 for mac-elcapitan-wk2 (926.47 KB, application/zip)
2017-02-02 22:59 PST, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-elcapitan (1.61 MB, application/zip)
2017-02-02 23:11 PST, Build Bot
no flags Details
Patch for landing. (10.03 KB, patch)
2017-02-03 16:59 PST, Jeremy Jones
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Jones 2017-02-02 21:36:52 PST
WK1 mouse events are missing movementX and movementY for pointerlock.
Comment 1 Jeremy Jones 2017-02-02 21:48:24 PST
rdar://problem/30343810
Comment 2 Jeremy Jones 2017-02-02 21:49:04 PST
I don't expect this patch to work until https://bugs.webkit.org/show_bug.cgi?id=167134 is landed.
Comment 3 Jeremy Jones 2017-02-02 21:51:35 PST
Created attachment 300495 [details]
Patch
Comment 4 Build Bot 2017-02-02 22:54:07 PST
Comment on attachment 300495 [details]
Patch

Attachment 300495 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/2995502

New failing tests:
pointer-lock/mouse-event-delivery.html
Comment 5 Build Bot 2017-02-02 22:54:10 PST
Created attachment 300500 [details]
Archive of layout-test-results from ews102 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 6 Build Bot 2017-02-02 22:59:28 PST
Comment on attachment 300495 [details]
Patch

Attachment 300495 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/2995508

New failing tests:
pointer-lock/mouse-event-delivery.html
Comment 7 Build Bot 2017-02-02 22:59:31 PST
Created attachment 300502 [details]
Archive of layout-test-results from ews107 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 8 Build Bot 2017-02-02 23:11:13 PST
Comment on attachment 300495 [details]
Patch

Attachment 300495 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2995536

New failing tests:
pointer-lock/mouse-event-delivery.html
Comment 9 Build Bot 2017-02-02 23:11:16 PST
Created attachment 300504 [details]
Archive of layout-test-results from ews114 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 10 Alexey Proskuryakov 2017-02-03 12:02:27 PST
Comment on attachment 300495 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=300495&action=review

> Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:719
> +#if ENABLE(POINTER_LOCK)
> +        m_movementDelta = IntPoint(event.deltaX, event.deltaY);
> +#endif

It feels a little strange for this to be under ENABLE(POINTER_LOCK). I guess it's OK if we don't use this data for anything else.

> Tools/DumpRenderTree/mac/EventSendingController.mm:646
> +    NSPoint prevMousePosition = lastMousePosition;

WebKit style is to avoid abbreviations as much as possible; previousMousePosition would be a better name.

It may also be cleaner to put the new position into "newMousePosition" instead, and only update lastMousePosition once we no longer need it.

> Tools/WebKitTestRunner/mac/EventSenderProxy.mm:604
> +    WKPoint prevMousePosition = m_position;

Ditto.
Comment 11 Jeremy Jones 2017-02-03 16:55:00 PST
(In reply to comment #10)
> Comment on attachment 300495 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=300495&action=review
> 
> > Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:719
> > +#if ENABLE(POINTER_LOCK)
> > +        m_movementDelta = IntPoint(event.deltaX, event.deltaY);
> > +#endif
> 
> It feels a little strange for this to be under ENABLE(POINTER_LOCK). I guess
> it's OK if we don't use this data for anything else.
> 
> > Tools/DumpRenderTree/mac/EventSendingController.mm:646
> > +    NSPoint prevMousePosition = lastMousePosition;
> 
> WebKit style is to avoid abbreviations as much as possible;
> previousMousePosition would be a better name.
> 
> It may also be cleaner to put the new position into "newMousePosition"
> instead, and only update lastMousePosition once we no longer need it.

I've changed this to newMousePosition.

> 
> > Tools/WebKitTestRunner/mac/EventSenderProxy.mm:604
> > +    WKPoint prevMousePosition = m_position;
> 
> Ditto.

Ditto.
Comment 12 Jeremy Jones 2017-02-03 16:59:05 PST
Created attachment 300580 [details]
Patch for landing.
Comment 13 WebKit Commit Bot 2017-02-03 17:03:02 PST
Attachment 300580 [details] did not pass style-queue:


ERROR: Tools/DumpRenderTree/mac/EventSendingController.mm:648:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Tools/WebKitTestRunner/mac/EventSenderProxy.mm:606:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
Total errors found: 2 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 14 WebKit Commit Bot 2017-02-03 19:05:07 PST
Comment on attachment 300580 [details]
Patch for landing.

Clearing flags on attachment: 300580

Committed r211663: <http://trac.webkit.org/changeset/211663>