From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- ...imeline-current-time-vertical-rl.tentative.html | 97 +++++++ ...block-view-timeline-current-time.tentative.html | 205 ++++++++++++++ ...ock-view-timeline-nested-subject.tentative.html | 113 ++++++++ .../change-animation-range-updates-play-state.html | 77 ++++++ .../get-keyframes-with-timeline-offset.html | 203 ++++++++++++++ ...nline-view-timeline-current-time.tentative.html | 301 +++++++++++++++++++++ .../scroll-animations/view-timelines/testcommon.js | 145 ++++++++++ .../timeline-offset-in-keyframe.html | 263 ++++++++++++++++++ .../view-timeline-get-current-time-range-name.html | 148 ++++++++++ .../view-timeline-get-set-range.html | 120 ++++++++ .../view-timelines/view-timeline-inset.html | 226 ++++++++++++++++ .../view-timeline-missing-subject.html | 54 ++++ .../view-timeline-on-display-none-element.html | 59 ++++ .../view-timeline-range-large-subject.html | 105 +++++++ .../view-timelines/view-timeline-range.html | 198 ++++++++++++++ .../view-timelines/view-timeline-root-source.html | 41 +++ .../view-timelines/view-timeline-snapport.html | 58 ++++ .../view-timeline-source.tentative.html | 94 +++++++ .../view-timeline-subject-size-changes.html | 81 ++++++ ...ero-intrinsic-iteration-duration.tentative.html | 106 ++++++++ 20 files changed, 2694 insertions(+) create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/block-view-timeline-current-time-vertical-rl.tentative.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/block-view-timeline-current-time.tentative.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/block-view-timeline-nested-subject.tentative.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/change-animation-range-updates-play-state.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/get-keyframes-with-timeline-offset.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/inline-view-timeline-current-time.tentative.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/testcommon.js create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/timeline-offset-in-keyframe.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-get-current-time-range-name.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-get-set-range.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-inset.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-missing-subject.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-on-display-none-element.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-range-large-subject.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-range.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-root-source.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-snapport.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-source.tentative.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-subject-size-changes.html create mode 100644 testing/web-platform/tests/scroll-animations/view-timelines/zero-intrinsic-iteration-duration.tentative.html (limited to 'testing/web-platform/tests/scroll-animations/view-timelines') diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/block-view-timeline-current-time-vertical-rl.tentative.html b/testing/web-platform/tests/scroll-animations/view-timelines/block-view-timeline-current-time-vertical-rl.tentative.html new file mode 100644 index 0000000000..5bc4598452 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/block-view-timeline-current-time-vertical-rl.tentative.html @@ -0,0 +1,97 @@ + + + +View timeline current-time with vertical-rl writing mode + + + + + + + + +
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/block-view-timeline-current-time.tentative.html b/testing/web-platform/tests/scroll-animations/view-timelines/block-view-timeline-current-time.tentative.html new file mode 100644 index 0000000000..a6530f6631 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/block-view-timeline-current-time.tentative.html @@ -0,0 +1,205 @@ + + + +View timeline current-time + + + + + + + + +
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/block-view-timeline-nested-subject.tentative.html b/testing/web-platform/tests/scroll-animations/view-timelines/block-view-timeline-nested-subject.tentative.html new file mode 100644 index 0000000000..2cc8af882f --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/block-view-timeline-nested-subject.tentative.html @@ -0,0 +1,113 @@ + + + +View timeline nested subject + + + + + + + + +
+
+
+
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/change-animation-range-updates-play-state.html b/testing/web-platform/tests/scroll-animations/view-timelines/change-animation-range-updates-play-state.html new file mode 100644 index 0000000000..53330d32f1 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/change-animation-range-updates-play-state.html @@ -0,0 +1,77 @@ + + + + + + + + + + + +Animation range updates play state + + + +
+
+
+ + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/get-keyframes-with-timeline-offset.html b/testing/web-platform/tests/scroll-animations/view-timelines/get-keyframes-with-timeline-offset.html new file mode 100644 index 0000000000..02f910d04e --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/get-keyframes-with-timeline-offset.html @@ -0,0 +1,203 @@ + + + + + + + + + + +Reported keyframes containing timeline offset + + + +
+
+
+ + + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/inline-view-timeline-current-time.tentative.html b/testing/web-platform/tests/scroll-animations/view-timelines/inline-view-timeline-current-time.tentative.html new file mode 100644 index 0000000000..5b37798fe8 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/inline-view-timeline-current-time.tentative.html @@ -0,0 +1,301 @@ + + + +View timeline current-time + + + + + + + + +
+
+
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/testcommon.js b/testing/web-platform/tests/scroll-animations/view-timelines/testcommon.js new file mode 100644 index 0000000000..65301215c4 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/testcommon.js @@ -0,0 +1,145 @@ +'use strict'; + +function assert_px_equals(observed, expected, description) { + assert_equals(observed.unit, 'px', + `Unexpected unit type for '${description}'`); + assert_approx_equals(observed.value, expected, 0.0001, + `Unexpected value for ${description}`); +} + +function CreateViewTimelineOpacityAnimation(test, target, options) { + const timeline_options = { + subject: target, + axis: 'block' + }; + if (options && 'timeline' in options) { + for (let key in options.timeline) { + timeline_options[key] = options.timeline[key]; + } + } + const animation_options = { + timeline: new ViewTimeline(timeline_options) + }; + if (options && 'animation' in options) { + for (let key in options.animation) { + animation_options[key] = options.animation[key]; + } + } + + const anim = + target.animate({ opacity: [0.3, 0.7] }, animation_options); + test.add_cleanup(() => { + anim.cancel(); + }); + return anim; +} + +// Verify that range specified in the options aligns with the active range of +// the animation. +// +// Sample call: +// await runTimelineBoundsTest(t, { +// timeline: { inset: [ CSS.percent(0), CSS.percent(20)] }, +// timing: { fill: 'both' } +// startOffset: 600, +// endOffset: 900 +// }); +async function runTimelineBoundsTest(t, options, message) { + container.scrollLeft = 0; + await waitForNextFrame(); + + const anim = + options.anim || + CreateViewTimelineOpacityAnimation(t, target, options); + if (options.timing) + anim.effect.updateTiming(options.timing); + + const timeline = anim.timeline; + await anim.ready; + + // Advance to the start offset, which triggers entry to the active phase. + container.scrollLeft = options.startOffset; + await waitForNextFrame(); + assert_equals(getComputedStyle(target).opacity, '0.3', + `Effect at the start of the active phase: ${message}`); + + // Advance to the midpoint of the animation. + container.scrollLeft = (options.startOffset + options.endOffset) / 2; + await waitForNextFrame(); + assert_equals(getComputedStyle(target).opacity,'0.5', + `Effect at the midpoint of the active range: ${message}`); + + // Advance to the end of the animation. + container.scrollLeft = options.endOffset; + await waitForNextFrame(); + assert_equals(getComputedStyle(target).opacity, '0.7', + `Effect is in the active phase at effect end time: ${message}`); + + // Return the animation so that we can continue testing with the same object. + return anim; +} + +// Sets the start and end range for a view timeline and ensures that the +// range aligns with expected values. +// +// Sample call: +// await runTimelineRangeTest(t, { +// rangeStart: { rangeName: 'cover', offset: CSS.percent(0) } , +// rangeEnd: { rangeName: 'cover', offset: CSS.percent(100) }, +// startOffset: 600, +// endOffset: 900 +// }); +async function runTimelineRangeTest(t, options) { + const rangeToString = range => { + const parts = []; + if (range.rangeName) + parts.push(range.rangeName); + if (range.offset) + parts.push(`${range.offset.value}%`); + return parts.join(' '); + }; + const range = + `${rangeToString(options.rangeStart)} to ` + + `${rangeToString(options.rangeEnd)}`; + + options.timeline = { + axis: 'inline' + }; + options.animation = { + rangeStart: options.rangeStart, + rangeEnd: options.rangeEnd, + }; + options.timing = { + // Set fill to accommodate floating point precision errors at the + // endpoints. + fill: 'both' + }; + + return runTimelineBoundsTest(t, options, range); +} + +// Sets the Inset for a view timeline and ensures that the range aligns with +// expected values. +// +// Sample call: +// await runTimelineInsetTest(t, { +// inset: [ CSS.px(20), CSS.px(40) ] +// startOffset: 600, +// endOffset: 900 +// }); +async function runTimelineInsetTest(t, options) { + options.timeline = { + axis: 'inline', + inset: options.inset + }; + options.timing = { + // Set fill to accommodate floating point precision errors at the + // endpoints. + fill: 'both' + } + const length = options.inset.length; + const range = + (options.inset instanceof Array) ? options.inset.join(' ') + : options.inset; + return runTimelineBoundsTest(t, options, range); +} diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/timeline-offset-in-keyframe.html b/testing/web-platform/tests/scroll-animations/view-timelines/timeline-offset-in-keyframe.html new file mode 100644 index 0000000000..62a8d1387d --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/timeline-offset-in-keyframe.html @@ -0,0 +1,263 @@ + + + + + + + + + +Animation range and delay + + + +
+
+
+ + + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-get-current-time-range-name.html b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-get-current-time-range-name.html new file mode 100644 index 0000000000..25e477e1a9 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-get-current-time-range-name.html @@ -0,0 +1,148 @@ + + + +View timeline delay + + + + + + + + +
+
+
+
+
+
+
+ + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-get-set-range.html b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-get-set-range.html new file mode 100644 index 0000000000..6de2d84df7 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-get-set-range.html @@ -0,0 +1,120 @@ + + + +View timeline delay + + + + + + + + + +
+
+
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-inset.html b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-inset.html new file mode 100644 index 0000000000..357d8558f9 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-inset.html @@ -0,0 +1,226 @@ + + + +View timeline delay + + + + + + + + + +
+
+
+
+
+
+
+ + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-missing-subject.html b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-missing-subject.html new file mode 100644 index 0000000000..01ca021524 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-missing-subject.html @@ -0,0 +1,54 @@ + + + + +ViewTimeline with missing subject + + + + + + +
+
+
+
+ + + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-on-display-none-element.html b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-on-display-none-element.html new file mode 100644 index 0000000000..1cc23fe626 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-on-display-none-element.html @@ -0,0 +1,59 @@ + + +View timeline on element with display:none + + + + + + + + + + +
+
+
+
+
+
+
+ + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-range-large-subject.html b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-range-large-subject.html new file mode 100644 index 0000000000..f87a57584e --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-range-large-subject.html @@ -0,0 +1,105 @@ + + + +View timeline delay + + + + + + + + +
+
+
+
+
+
+
+ + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-range.html b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-range.html new file mode 100644 index 0000000000..5042c6c2a0 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-range.html @@ -0,0 +1,198 @@ + + + +View timeline delay + + + + + + + + +
+
+
+
+
+
+
+ + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-root-source.html b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-root-source.html new file mode 100644 index 0000000000..20ac9c5464 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-root-source.html @@ -0,0 +1,41 @@ + + + +View timeline delay + + + + + + + + +
+ + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-snapport.html b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-snapport.html new file mode 100644 index 0000000000..5d68d37037 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-snapport.html @@ -0,0 +1,58 @@ + +ViewTimeline vs. scroll-padding-* + + + + + + + + + +
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-source.tentative.html b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-source.tentative.html new file mode 100644 index 0000000000..f8aabc8bdd --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-source.tentative.html @@ -0,0 +1,94 @@ + + + +View timeline source + + + + + + +
+
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-subject-size-changes.html b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-subject-size-changes.html new file mode 100644 index 0000000000..9ae4b1df77 --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/view-timeline-subject-size-changes.html @@ -0,0 +1,81 @@ + + + +View timeline Subject size changes after creation of Animation + + + + + + + + +
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/scroll-animations/view-timelines/zero-intrinsic-iteration-duration.tentative.html b/testing/web-platform/tests/scroll-animations/view-timelines/zero-intrinsic-iteration-duration.tentative.html new file mode 100644 index 0000000000..e77cf4629c --- /dev/null +++ b/testing/web-platform/tests/scroll-animations/view-timelines/zero-intrinsic-iteration-duration.tentative.html @@ -0,0 +1,106 @@ + + + + + + + + + + + +Animation range updates play state + + + +
+
+
+ + -- cgit v1.2.3