<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>235116</bug_id>
          
          <creation_ts>2022-01-12 08:56:41 -0800</creation_ts>
          <short_desc>Summing up all movementX of mousemove events does not give the total difference in position</short_desc>
          <delta_ts>2022-01-21 17:46:58 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>UI Events</component>
          <version>Safari 15</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Guillaume">guillaume.brunerie</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>graouts</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1830149</commentid>
    <comment_count>0</comment_count>
    <who name="Guillaume">guillaume.brunerie</who>
    <bug_when>2022-01-12 08:56:41 -0800</bug_when>
    <thetext>The specification of the MouseEvent.movementX/Y properties says that

&gt; All motion data must be delivered via mousemove events such that between any two mouse events earlierEvent and currentEvent the value of currentEvent.screenX-earlierEvent.screenX is equivalent to the sum of all movementX movementY/code&gt; events after earlierEvent, with the exception of when screenX can not be updated because the pointer is clipped by the user agent screen boundaries.
(see https://w3c.github.io/pointerlock/#dom-mouseevent-movementx)

It works perfectly fine in Chrome but does not seem to work as expected in Safari, as soon as I move the mouse I get differences of several hundreds of pixels.
See the following CodePen: https://codepen.io/Latcarf/pen/YzrRvZE

Tested with Safari Version 15.1 (15612.2.9.1.30, 15612), on MacOS Catalina version 10.15.7 (19H1615).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1832048</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-01-19 08:57:15 -0800</bug_when>
    <thetext>&lt;rdar://problem/87773443&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1832949</commentid>
    <comment_count>2</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2022-01-21 17:46:58 -0800</bug_when>
    <thetext>`WebPageProxy::handleMouseEvent` drops unhandled platform mousemove events on macOS if the mouse event queue is too backed up…

Maybe that is what&apos;s causing this behavior?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>