Closed Bug 794725 Opened 12 years ago Closed 12 years ago

Pointer movement should be reported as (0,0) when re-entering browser window

Categories

(Core :: DOM: Events, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The pointer lock's specification of MouseEvent.movement{X,Y} [ http://www.w3.org/TR/pointerlock/#attributes-1 ] says: "When unlocked, the system cursor can exit and re-enter the user agent window. If it does so and the user agent was not the target of operating system mouse move events then the most recent pointer position will be unknown to the user agent and movementX/Y can not be computed and must be set to zero." We don't do this. We should do this. Steps to reproduce: 1. Go to http://people.mozilla.org/~eakhgari/pointerlock.html 2. Open the web console (CTRL + SHIFT + K) 3. Move the mouse outside of the browser window. 4. Move the mouse back inside the browser window at a different place than where it moved out of the browser window. Note the large movement reported in the web console log. Expected result: No large movement, we should report (0,0) movement for the move that enters the browser window.
Invalidate nsEventStateManager::sLastRefPoint when the pointer leaves the window, detect that, and cause mouse movement to be 0 upon the next movement.
Attachment #665253 - Flags: review?(bugs)
Blocks: gecko-games
Attachment #665253 - Flags: review?(bugs) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: