Skip to content

Commit

Permalink
Merge branch 'master' into feat-scroll-timeline-animation-range
Browse files Browse the repository at this point in the history
# Conflicts:
#	test/expected.txt
  • Loading branch information
bramus committed Jan 29, 2024
2 parents 9079a8e + 28c0118 commit daa55db
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
with:
submodules: recursive
- name: Setup Pages
if: ${{ !env.ACT }}
id: pages
uses: actions/configure-pages@v3
- name: Install Node.js dependencies
Expand All @@ -54,10 +55,13 @@ jobs:
run: "npm run test:wpt"
- name: Expected results
run: "npm run test:compare"
- name: Test results summary
run: echo "Passed $(grep -c '^PASS' ./test/report/summary.txt) of $(grep -c '^' ./test/report/summary.txt) tests" >> $GITHUB_STEP_SUMMARY
- name: Clean build files
run: "rm -rf node_modules test/wpt"
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
if: ${{ !env.ACT }}
with:
path: .

Expand Down
18 changes: 9 additions & 9 deletions src/proxy-animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ function playInternal(details, autoRewind) {
if (playbackRate == 0 && previousCurrentTime == null) {
details.holdTime = 0;
}
// 12. If has finite timeline and previous current time is unresolved:
// 7. If has finite timeline and previous current time is unresolved:
// Set the flag auto align start time to true.
// NOTE: If play is called for a CSS animation during style update, the animation’s start time cannot be reliably
// calculated until post layout since the start time is to align with the start or end of the animation range
Expand All @@ -581,21 +581,21 @@ function playInternal(details, autoRewind) {
details.autoAlignStartTime = true;
}

// 13. If animation's hold time is resolved, let its start time be
// 8. If animation's hold time is resolved, let its start time be
// unresolved.
if (details.holdTime) {
details.startTime = null;
}

// 14. If animation has a pending play task or a pending pause task,
// 8.1 Cancel that task.
// 8.2 Set has pending ready promise to true.
// 9. If animation has a pending play task or a pending pause task,
// 9.1 Cancel that task.
// 9.2 Set has pending ready promise to true.
if (details.pendingTask) {
details.pendingTask = null;
hasPendingReadyPromise = true;
}

// 15. If the following three conditions are all satisfied:
// 10. If the following three conditions are all satisfied:
// animation’s hold time is unresolved, and
// aborted pause is false, and
// animation does not have a pending playback rate,
Expand All @@ -607,7 +607,7 @@ function playInternal(details, autoRewind) {
!abortedPause && details.pendingPlaybackRate === null)
return;

// 16. If has pending ready promise is false, let animation’s current ready
// 11. If has pending ready promise is false, let animation’s current ready
// promise be a new promise in the relevant Realm of animation.
if (details.readyPromise && !hasPendingReadyPromise)
details.readyPromise = null;
Expand All @@ -616,7 +616,7 @@ function playInternal(details, autoRewind) {
// correct value for current time.
syncCurrentTime(details);

// 17. Schedule a task to run as soon as animation is ready.
// 12. Schedule a task to run as soon as animation is ready.
if (!details.readyPromise)
createReadyPromise(details);
details.pendingTask = 'play';
Expand All @@ -627,7 +627,7 @@ function playInternal(details, autoRewind) {
addAnimation(details.timeline, details.animation,
tickAnimation.bind(details.proxy));

// 18. Run the procedure to update an animation’s finished state for animation
// 13. Run the procedure to update an animation’s finished state for animation
// with the did seek flag set to false, and the synchronously notify flag
// set to false.
updateFinishedState(details, /* seek */ false, /* synchronous */ false);
Expand Down
1 change: 0 additions & 1 deletion test/expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1079,4 +1079,3 @@ FAIL /scroll-animations/view-timelines/view-timeline-sticky-block.html View time
FAIL /scroll-animations/view-timelines/view-timeline-sticky-inline.html View timeline with sticky target, block axis.
FAIL /scroll-animations/view-timelines/view-timeline-subject-size-changes.html View timeline with subject size change after the creation of the animation
FAIL /scroll-animations/view-timelines/zero-intrinsic-iteration-duration.tentative.html Intrinsic iteration duration is non-negative
Passed 449 of 1081 tests.
2 changes: 1 addition & 1 deletion test/setup/checkout-wpt.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (existsSync(checkoutDir)) {
exit(0);
}

execSync(`git clone ${repoUrl}`, {...execEnv, cwd: path.resolve(`${__dirname}/..`)});
execSync(`git clone --depth 1 --branch master --single-branch ${repoUrl}`, {...execEnv, cwd: path.resolve(`${__dirname}/..`)});
console.warn('Ensure that you setup wpt for local test runs per published instructions: https://web-platform-tests.org/running-tests/from-local-system.html');
console.log(`Checked out ${checkoutDir}`);

Expand Down
1 change: 0 additions & 1 deletion test/summarize-json.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ for (let result of results) {
}
}
}
console.log(`Passed ${passes} of ${fails + passes} tests.`);

0 comments on commit daa55db

Please sign in to comment.