<?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>210454</bug_id>
          
          <creation_ts>2020-04-13 13:36:40 -0700</creation_ts>
          <short_desc>Implement rAF-aligned Pointer/Mouse/Touch events</short_desc>
          <delta_ts>2025-02-12 07:46:11 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=264002</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dean Jackson">dino</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>709922234</cc>
    
    <cc>a_protyasha</cc>
    
    <cc>caleb</cc>
    
    <cc>daxpedda</cc>
    
    <cc>gsnedders</cc>
    
    <cc>juberti</cc>
    
    <cc>karlcow</cc>
    
    <cc>luke</cc>
    
    <cc>maggotfish</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1641077</commentid>
    <comment_count>0</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2020-04-13 13:36:40 -0700</bug_when>
    <thetext>Implement rAF-aligned UI events.


See 
- https://w3c.github.io/pointerevents/ and wording on coalescing and aligning
- https://www.chromestatus.com/feature/6192761317359616
- Firefox also implemented it even though the page above doesn&apos;t currently mention that</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1641078</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-04-13 13:37:02 -0700</bug_when>
    <thetext>&lt;rdar://problem/61734836&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1679793</commentid>
    <comment_count>2</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2020-08-12 13:00:11 -0700</bug_when>
    <thetext>I don&apos;t follow this. What is being coalesced and how?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1679804</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-08-12 13:34:06 -0700</bug_when>
    <thetext>You can coalesce multiple pointermove and pointerrawupdate events in the same event loop:
https://w3c.github.io/pointerevents/#dfn-coalesced-event-list</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1679806</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2020-08-12 13:37:52 -0700</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #3)
&gt; You can coalesce multiple pointermove and pointerrawupdate events in the
&gt; same event loop:
&gt; https://w3c.github.io/pointerevents/#dfn-coalesced-event-list

But how does this integrate with the event loop? The spec doesn&apos;t seem to say anything about how events are coalesced.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1679824</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-08-12 14:26:47 -0700</bug_when>
    <thetext>https://github.com/w3c/pointerevents/issues/328</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1819861</commentid>
    <comment_count>6</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2021-12-02 14:07:12 -0800</bug_when>
    <thetext>AIUI, there&apos;s no actual definition about how the coalescing happens. The spec has this because at least Android and iOS do this, and it&apos;s basically left down to the browser how often to actually fire events. Clearly, the browser can&apos;t fire events more often than it gets them from the OS.

In the iOS case, see https://developer.apple.com/documentation/uikit/touches_presses_and_gestures/handling_touches_in_your_view/getting_high-fidelity_input_with_coalesced_touches

In short:

&gt; UIKit usually delivers touches to your app at around 60 Hz, but some devices are capable of recording touch information at up to 240 Hz.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1988419</commentid>
    <comment_count>7</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-10-30 02:14:38 -0700</bug_when>
    <thetext>A section has been added about coalesced events
https://w3c.github.io/pointerevents/#coalesced-events

aka getCoalescedEvents()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2052780</commentid>
    <comment_count>8</comment_count>
    <who name="Abrar Rahman Protyasha">a_protyasha</who>
    <bug_when>2024-08-14 10:55:43 -0700</bug_when>
    <thetext>We&apos;ve landed `PointerEvent.getCoalescedEvents()` in 281520@main, but pointer events are not rAF-aligned still.

I&apos;ll retitle this bug so we don&apos;t conflate the two things.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>