Repository navigation
Conversation
…gap after a stall WebKit stamps each touch with its dispatch time, at the latest when it answers the dispatch. When a loaded runner held the driver or the page, the driver sent the steps behind the stall back to back. The page then read moves 0 to 1 ms apart, and the release filter read a fast finger. So the pager's slow-drag proof saw a settle that did not start from rest: maxError 6 to 72 px against under 1, in 67 of 110 runs under load. A step now leaves at its scripted time at the earliest, and no sooner than the script's gap, less 2 ms, after WebKit answered the step before. A stall stretches the drag instead, and no gap reaches the page more than 2 ms shorter than the script's. Under the same load the proof passed 50 of 50. A caller that watches each step (onEvent) keeps the old pacing, and Chromium keeps it too: its events carry scripted timestamps.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The pull request is a draft and its branch is in a fork, so once it is marked ready for review a maintainer adds the ci:run label so CI runs.
The new leaveAt rule keeps every WebKit gap no more than 2 ms short of the script after a stall, and its unit cases fail on main and with a different slack. Two optional suggestions:
- The WebKit pacing self-test passes
onEvent, so it now runs the old rule; a take withoutonEvent, on a page whosetouchmovelistener blocks once, would pin the new wiring in the WebKit driver. - The README engine-limits row and the
touch.tsheader could say that a caller passingonEventkeeps the scripted-time pacing.
[Automated review]
| | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | Trusted touch + pointer events, multi-touch | yes | yes (a `touchstart` lists only the fingers that landed in it; pointer events exact) | | ||
| | Page sees the scripted timestamps | yes, exactly | no: real dispatch time; pacing keeps velocities within ~1 ms on an idle runner, but a CPU-starved one sends some steps late, then back to back | | ||
| | Page sees the scripted timestamps | yes, exactly | no: real dispatch time; ~1 ms pacing on an idle runner; after a stall each step keeps its gap, less 2 ms, so the drag stretches | |
There was a problem hiding this comment.
Optional: a WebKit caller that passes onEvent (this harness's own pacing self-test, AlertDialog's highlight test) still sends late steps back to back. Consider adding "unless the caller passes onEvent" here and in the touch.ts header, which the SYNC note keeps equal to this row.
| // | ||
| // The pacing is bounded from above too. The harness waits only while it | ||
| // is ahead of the script and sends a late step at once, so a move it | ||
| // is ahead of the script and, as this take watches every step, sends a |
There was a problem hiding this comment.
Optional: because this take passes onEvent, it now exercises only the scripted-time rule, and no committed test reaches the gap-keeping path the WebKit driver turns on (touch.ts:272). A second take without onEvent, on a fixture whose touchmove listener blocks once for about 80 ms, could assert that no page timeStamp gap falls below the scripted gap less 2 ms (plus clock rounding).
… so no gap reaches the page short WebKit stamps a touch when it arrives, no later than it answers the dispatch. A paced play sent the next touch its interval after the one before left. So a touch the page took late, then answered quickly, could reach the page 1 to 3 ms before the next one, and the page read a bunched, far faster release. Each touch now also waits for its interval, less 2 ms, after WebKit answered the one before: under `pacing: 'spacing'`, and on a WebKit `'schedule'` play that does not watch each step. No gap reaches the page more than 2 ms short of the script's. A stall stretches the gesture, and a slow runner reads a slower release. This is meta#9887's rule, carried onto the paced play.
… so no gap reaches the page short WebKit stamps a touch when it arrives, no later than it answers the dispatch. A paced play sent the next touch its interval after the one before left. So a touch the page took late, then answered quickly, could reach the page 1 to 3 ms before the next one, and the page read a bunched, far faster release. Each touch now also waits for its interval, less 2 ms, after WebKit answered the one before: under `pacing: 'spacing'`, and on a WebKit `'schedule'` play that does not watch each step. No gap reaches the page more than 2 ms short of the script's. A stall stretches the gesture, and a slow runner reads a slower release. This is meta#9887's rule, carried onto the paced play.
|
Superseded by #9956. |
…ch step waits for each answer, so no gap reaches the page more than 2 ms short WebKit stamps a touch when it arrives, no later than it answers the dispatch. A paced play sent the next touch its interval after the one before left. So a touch the page took late, then answered quickly, could reach the page 1 to 3 ms before the next one, and the page read a bunched, far faster release. Each touch now also waits for its interval, less 2 ms, after WebKit answered the one before: under `pacing: 'spacing'`, and on a WebKit `'schedule'` play that does not watch each step (`onEvent`), which keeps its scripted times. No other gap reaches the page more than 2 ms short of the script's. A stall stretches the gesture, and a slow runner reads a slower release. This is meta#9887's rule, carried onto the paced play.
…ch step waits for each answer, so no gap reaches the page more than 2 ms short WebKit stamps a touch when it arrives, no later than it answers the dispatch. A paced play sent the next touch its interval after the one before left. So a touch the page took late, then answered quickly, could reach the page 1 to 3 ms before the next one, and the page read a bunched, far faster release. Each touch now also waits for its interval, less 2 ms, after WebKit answered the one before: under `pacing: 'spacing'`, and on a WebKit `'schedule'` play that does not watch each step (`onEvent`), which keeps its scripted times. No other gap reaches the page more than 2 ms short of the script's. A stall stretches the gesture, and a slow runner reads a slower release. This is meta#9887's rule, carried onto the paced play.
…ch step waits for each answer, so no gap reaches the page more than 2 ms short (#9956) test(interaction-harness): a WebKit touch play that does not watch each step waits for each answer, so no gap reaches the page more than 2 ms short WebKit stamps a touch when it arrives, no later than it answers the dispatch. A paced play sent the next touch its interval after the one before left. So a touch the page took late, then answered quickly, could reach the page 1 to 3 ms before the next one, and the page read a bunched, far faster release. Each touch now also waits for its interval, less 2 ms, after WebKit answered the one before: under `pacing: 'spacing'`, and on a WebKit `'schedule'` play that does not watch each step (`onEvent`), which keeps its scripted times. No other gap reaches the page more than 2 ms short of the script's. A stall stretches the gesture, and a slow runner reads a slower release. This is #9887's rule, carried onto the paced play.
Maintainer impact
The pager's slow-drag proof fails in WebKit on a loaded runner, with nothing wrong in the pager. It is "a slow drag past half a page, well under the 225 px/s floor, settles…". Under load it failed 67 of 110 runs, with maxError 6 to 72 px against a bound under 1.
Intended invariant
A touch script's velocity reaches the page as written. WebKit takes no timestamp: it stamps each touch with its dispatch time, no later than it answers the dispatch. The harness keeps velocities true by pacing the sends on the wall clock.
Change
playStepssent the steps behind it back to back. The release filter reads the last three samples, so it read a fast finger, and the settle did not start from rest.leaveAtintouch.ts). A stall then stretches the drag, and no gap reaches the page more than 2 ms short.onEvent) keeps the old pacing, as does Chromium, whose events carry scripted timestamps.touch.tsheader, the README's engine table and a self-test comment say so.Evidence
--cpus=4,CI=1,LP_NUM_THREADS=4), 3 workers, ten runs. A full node test run with 16 workers and other WebKit runs shared the machine.Scope
Testing
Local gates at 1d403e2, one commit on main 16a5397:
touch.pacing.test.ts: 3 cases, which fail on main (noleaveAt) and pass here. A 3 ms slack fails two of them. With the harness's other node units: 35 passed.tscon the harness, strict ESLint,pnpm lintand Prettier on the changed files, andpnpm review:pre(no findings): clean.