Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for faster reversing of interrupted transitions #26540

Merged
merged 1 commit into from May 20, 2020

Conversation

@mrobinson
Copy link
Member

mrobinson commented May 15, 2020

This is described in the spec and allows interrupted transitions to
reverse in a more natural way. Unfortunately, most of the tests that
exercise this behavior use the WebAnimations API. This change adds a
test using our custom clock control API.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • There are tests for these changes
@highfive
Copy link

highfive commented May 15, 2020

Heads up! This PR modifies the following files:

  • @emilio: components/style/animation.rs
@atouchet atouchet changed the title Add support for faster reversing of interrupted transitiosn Add support for faster reversing of interrupted transitions May 15, 2020
@Manishearth
Copy link
Member

Manishearth commented May 18, 2020

@bors-servo r+

is there a reason that test is not in the main WPT folder?

@bors-servo
Copy link
Contributor

bors-servo commented May 18, 2020

📌 Commit 21e35a9 has been approved by Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented May 18, 2020

Testing commit 21e35a9 with merge a7e3ea2...

bors-servo added a commit that referenced this pull request May 18, 2020
…shearth

Add support for faster reversing of interrupted transitions

This is described in the spec and allows interrupted transitions to
reverse in a more natural way. Unfortunately, most of the tests that
exercise this behavior use the WebAnimations API. This change adds a
test using our custom clock control API.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented May 18, 2020

💔 Test failed - status-taskcluster

@CYBAI
Copy link
Collaborator

CYBAI commented May 19, 2020

  ▶ Unexpected subtest result in /_mozilla/css/animations/faster-reversing-of-transitions.html:
  │ FAIL [expected PASS] Reversed transitions are shortened proportionally
  │   → assert_equals: expected "40px" but got "110px"
  │ 
  │ @http://web-platform.test:8000/_mozilla/css/animations/faster-reversing-of-transitions.html:39:16
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1975:25
  │ test@http://web-platform.test:8000/resources/testharness.js:535:30
  └ @http://web-platform.test:8000/_mozilla/css/animations/faster-reversing-of-transitions.html:31:5
  ▶ Unexpected subtest result in /_mozilla/css/animations/faster-reversing-of-transitions.html:
  │ FAIL [expected PASS] Reversed already reversed transitions are shortened proportionally
  │   → assert_equals: expected "60px" but got "110px"
  │ 
  │ @http://web-platform.test:8000/_mozilla/css/animations/faster-reversing-of-transitions.html:59:16
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1975:25
  │ test@http://web-platform.test:8000/resources/testharness.js:535:30
  └ @http://web-platform.test:8000/_mozilla/css/animations/faster-reversing-of-transitions.html:51:5
  ▶ Unexpected subtest result in /_mozilla/css/animations/faster-reversing-of-transitions.html:
  │ FAIL [expected PASS] Non-reversed transition changes use the full transition-duration
  │   → assert_equals: expected "100px" but got "110px"
  │ 
  │ @http://web-platform.test:8000/_mozilla/css/animations/faster-reversing-of-transitions.html:87:16
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1975:25
  │ test@http://web-platform.test:8000/resources/testharness.js:535:30
  └ @http://web-platform.test:8000/_mozilla/css/animations/faster-reversing-of-transitions.html:79:5
@mrobinson
Copy link
Member Author

mrobinson commented May 19, 2020

This should be fixed once #26486 lands.

@mrobinson
Copy link
Member Author

mrobinson commented May 19, 2020

is there a reason that test is not in the main WPT folder?

Thanks for the review! WPT has minimal testing of this feature, but it seems to use the Web Animations API (which we don't support). I've added a test, but it uses our custom animation tick / time warp driver, so it isn't a good candidate for inclusion in WPT.

@mrobinson
Copy link
Member Author

mrobinson commented May 19, 2020

@bors-servo try=wpt-2020

@jdm
Copy link
Member

jdm commented May 19, 2020

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented May 19, 2020

Trying commit 21e35a9 with merge 1d45199...

bors-servo added a commit that referenced this pull request May 19, 2020
Add support for faster reversing of interrupted transitions

This is described in the spec and allows interrupted transitions to
reverse in a more natural way. Unfortunately, most of the tests that
exercise this behavior use the WebAnimations API. This change adds a
test using our custom clock control API.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@mrobinson mrobinson force-pushed the mrobinson:transition-shortening-factor branch from 21e35a9 to 984d20e May 19, 2020
@mrobinson mrobinson force-pushed the mrobinson:transition-shortening-factor branch from 984d20e to 1bf1b8e May 19, 2020
@jdm
Copy link
Member

jdm commented May 19, 2020

@bors-servo try=wpt-2020

@bors-servo
Copy link
Contributor

bors-servo commented May 19, 2020

Trying commit 1bf1b8e with merge 6478066...

bors-servo added a commit that referenced this pull request May 19, 2020
Add support for faster reversing of interrupted transitions

This is described in the spec and allows interrupted transitions to
reverse in a more natural way. Unfortunately, most of the tests that
exercise this behavior use the WebAnimations API. This change adds a
test using our custom clock control API.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented May 19, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented May 19, 2020

  ▶ Unexpected subtest result in /_mozilla/css/animations/faster-reversing-of-transitions.html:
  │ FAIL [expected PASS] Reversed already reversed transitions are shortened proportionally
  │   → assert_equals: expected "55px" but got "55.0022px"
  │ 
  │ @http://web-platform.test:8000/_mozilla/css/animations/faster-reversing-of-transitions.html:71:16
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1975:25
  │ test@http://web-platform.test:8000/resources/testharness.js:535:30
  └ @http://web-platform.test:8000/_mozilla/css/animations/faster-reversing-of-transitions.html:51:5
  ▶ Unexpected subtest result in /_mozilla/css/animations/faster-reversing-of-transitions.html:
  │ FAIL [expected PASS] Reversed transitions are shortened proportionally
  │   → assert_equals: expected "40px" but got "40.0009px"
  │ 
  │ @http://web-platform.test:8000/_mozilla/css/animations/faster-reversing-of-transitions.html:39:16
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1975:25
  │ test@http://web-platform.test:8000/resources/testharness.js:535:30
  └ @http://web-platform.test:8000/_mozilla/css/animations/faster-reversing-of-transitions.html:31:5
  ▶ Unexpected subtest result in /_mozilla/css/animations/faster-reversing-of-transitions.html:
  │ FAIL [expected PASS] Non-reversed transition changes use the full transition-duration
  │   → assert_equals: expected "100px" but got "99.9991px"
  │ 
  │ @http://web-platform.test:8000/_mozilla/css/animations/faster-reversing-of-transitions.html:87:16
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1975:25
  │ test@http://web-platform.test:8000/resources/testharness.js:535:30
  └ @http://web-platform.test:8000/_mozilla/css/animations/faster-reversing-of-transitions.html:79:5
@mrobinson
Copy link
Member Author

mrobinson commented May 19, 2020

Oof. Looks like I'll need to do an approximate check for the expected value in this test.

This is described in the spec and allows interrupted transitions to
reverse in a more natural way. Unfortunately, most of the tests that
exercise this behavior use the WebAnimations API. This change adds a
test using our custom clock control API.
@mrobinson mrobinson force-pushed the mrobinson:transition-shortening-factor branch from 1bf1b8e to 4ba15c3 May 20, 2020
@mrobinson
Copy link
Member Author

mrobinson commented May 20, 2020

Okay. I've posted a new version of this branch that uses approximate (±1 pixel) checks everywhere. I think we are bumping into issues where layout_2020 is calculating a slightly different value for widths.

@jdm
Copy link
Member

jdm commented May 20, 2020

@bors-servo try=wpt-2020

@bors-servo
Copy link
Contributor

bors-servo commented May 20, 2020

Trying commit 4ba15c3 with merge 53d904a...

bors-servo added a commit that referenced this pull request May 20, 2020
Add support for faster reversing of interrupted transitions

This is described in the spec and allows interrupted transitions to
reverse in a more natural way. Unfortunately, most of the tests that
exercise this behavior use the WebAnimations API. This change adds a
test using our custom clock control API.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented May 20, 2020

☀️ Test successful - status-taskcluster
State: approved= try=True

@jdm
Copy link
Member

jdm commented May 20, 2020

@bors-servo r=Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented May 20, 2020

📌 Commit 4ba15c3 has been approved by Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented May 20, 2020

Testing commit 4ba15c3 with merge 344fe49...

@bors-servo
Copy link
Contributor

bors-servo commented May 20, 2020

☀️ Test successful - status-taskcluster
Approved by: Manishearth
Pushing 344fe49 to master...

@bors-servo bors-servo merged commit 344fe49 into servo:master May 20, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
@mrobinson mrobinson deleted the mrobinson:transition-shortening-factor branch May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.