Skip to content

Commit a7ae89b

Browse files
committed
Bug 1999761 [wpt PR 56000] - Make scroll-timeline snapshotting tests align with spec and proposal, a=testonly
Automatic update from web-platform-tests Make scroll-timeline snapshotting tests align with spec and proposal According to the current spec, scroll-timelines are update after scroll events are dispatched, but before style and layout is updated for the frame update. With the proposed change[1] in the HTML specification, the scroll-timelines are updated after a first style/layout update in the resizeObserver loop. We modify the scroll-timeline-snapshotting tests to allow them to pass for both timings. This reveals an issue with the current Blink implementation not matching the current spec, as we snapshot the timelines before the scroll events are dispatched. WebKit implements the current spec and still pass the tests after modification. [1] whatwg/html#11613 Bug: 384523570 Change-Id: I03b29b1f85527f9e54d597586d0764fc53f7776b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7141779 Reviewed-by: Kevin Ellis <keverschromium.org> Commit-Queue: Rune Lillesveen <futharkchromium.org> Cr-Commit-Position: refs/heads/main{#1543753} -- wpt-commits: d702e50d6999b5ac1fdd815992887be83e49cbd7 wpt-pr: 56000 UltraBlame original commit: 494b53dbee4ab2d672692bb3f82b4421c2083a9c
1 parent f6e471c commit a7ae89b

File tree

1 file changed

+115
-28
lines changed

1 file changed

+115
-28
lines changed

testing/web-platform/tests/scroll-animations/scroll-timelines/scroll-timeline-snapshotting.html

Lines changed: 115 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,49 @@
3636
:
3737
/
3838
/
39-
wicg
39+
drafts
4040
.
41-
github
41+
csswg
4242
.
43-
io
43+
org
4444
/
4545
scroll
4646
-
4747
animations
48+
-
49+
1
4850
/
4951
#
50-
avoiding
52+
event
5153
-
52-
cycles
54+
loop
55+
"
56+
>
57+
<
58+
link
59+
rel
60+
=
61+
"
62+
help
63+
"
64+
href
65+
=
66+
"
67+
https
68+
:
69+
/
70+
/
71+
github
72+
.
73+
com
74+
/
75+
whatwg
76+
/
77+
html
78+
/
79+
pull
80+
/
81+
11613
5382
"
5483
>
5584
<
@@ -177,6 +206,31 @@
177206
script
178207
>
179208
<
209+
script
210+
src
211+
=
212+
"
213+
/
214+
css
215+
/
216+
css
217+
-
218+
scroll
219+
-
220+
snap
221+
/
222+
support
223+
/
224+
common
225+
.
226+
js
227+
"
228+
>
229+
<
230+
/
231+
script
232+
>
233+
<
180234
style
181235
>
182236
body
@@ -300,36 +354,56 @@
300354
to
301355
change
302356
.
303-
const
304-
startScroll
305-
=
306-
scroller
307-
.
308-
scrollTop
309-
;
310-
do
311-
{
312357
await
313-
waitForNextFrame
358+
waitForScrollEvent
314359
(
360+
document
315361
)
316362
;
317-
}
318-
while
319-
(
320-
scroller
363+
/
364+
/
365+
The
366+
next
367+
frame
368+
the
369+
scroll
370+
changes
371+
the
372+
scroll
373+
-
374+
timelines
375+
should
376+
not
377+
be
378+
/
379+
/
380+
updated
381+
before
382+
the
383+
scroll
384+
events
385+
are
386+
dispatched
321387
.
322-
scrollTop
323-
=
324-
=
325-
startScroll
326-
)
327-
;
328-
assert_percents_equal
329-
(
388+
Store
389+
the
390+
scroll
391+
position
392+
/
393+
/
394+
from
395+
the
396+
previous
397+
frame
398+
to
399+
compare
400+
the
330401
timeline
402+
to
331403
.
332-
currentTime
404+
let
405+
scroll_percentage
406+
=
333407
(
334408
scroller
335409
.
@@ -339,6 +413,19 @@
339413
)
340414
*
341415
100
416+
;
417+
await
418+
waitForScrollEvent
419+
(
420+
document
421+
)
422+
;
423+
assert_percents_equal
424+
(
425+
timeline
426+
.
427+
currentTime
428+
scroll_percentage
342429
'
343430
Scroll
344431
timeline

0 commit comments

Comments
 (0)