Repository navigation
Commit d658a05
committed
test(interaction-harness): a hold the page arms itself takes a short animation on its first frame
`holdAnimations` reaches the page after a round trip, and on a loaded
runner a short animation can end before it arrives: main's own holding
and storyboard self-tests fail that way (a second hold, a held
transition the page retargets), on a two-core pin with CPU-bound
processes on the same cores too, and component proofs that hold a 200 ms
press release miss it the same way.
`await armHold(page, scope)` arms the page before the action; it holds
every running animation under the scope as soon as one of them runs (or
`count` of them, for parts that start apart; with `newOnly`, only
animations that start after the arm, so a turn that starts mid-motion is
held while the motion goes on), and `held()` after the action returns
what it held. It holds through the same in-page body as
`holdAnimations`, installed in the evaluate that installs the curve end
so a hold costs no extra round trip, and into the same held set, so
`seekAnimations`, `sampleCurve` and `releaseAnimations` read it
unchanged, and a later hold adds to it. It looks on every frame callback
and every 4 ms between them: on a cold page WebKit can deliver no frame
callback for 260 to 300 ms while it first composites a newly animated
layer, while its timers run and its animations advance. The busy-window
control never counts (an unscoped hold still pauses it, as it takes
every running animation), and `held()` rejects when nothing under the
scope ran before the timeout. `animationStoryboard` films what an armed
hold took (`held`) instead of holding after the action. The holding,
curve-sampling and storyboard self-tests that hold a short animation an
action starts arm their holds. Three that hold after a wait or a watch,
or hold two runners started 100 ms apart (which an armed hold would take
one at a time), run their animations for 6 to 10 s instead of 0.6 to 1 s
at the same speed. The two-runner test also makes its second runner once
the first has started, so a loaded engine cannot give both one first
frame, and seeks 150 ms past the second start, however late that came.
The staggered-starts filmstrip sets its second start 83 ms after the
first on the document timeline rather than with a timer, and the page
holds all three runs once the second move runs (`count: 3`). Three new
self-tests cover the armed hold: a 120 ms run held on its first frames,
a turn held mid-motion with `newOnly` (both read only after the run
would have ended), and a rejection when nothing starts.
Red first: on main the holding and storyboard describes fail under the
CI WebKit lane's command (a container capped at 4 CPUs, one worker), the
two holds above among them, and the holding describe fails in Chromium
under the load above; with the armed holds they pass there.1 parent 6224efd commit d658a05
4 files changed
Lines changed: 495 additions & 137 deletions
File tree
- internal/interaction-harness
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
0 commit comments