Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd support for canceling CSS transitions #26244
Conversation
highfive
commented
Apr 21, 2020
|
Heads up! This PR modifies the following files:
|
|
@bors-servo try=wpt |
Add support for canceling CSS transitions This change adds support for canceling CSS transitions when a property is no longer transitionable. Support for canceling and replacing CSS transitions when the end value changes is still pending. This change also takes advantage of updating the constellation message to fix a bug where transition events could be sent for closed pipelines. Fixes #15079. <!-- 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] These changes fix #15079. <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
|
|
|
Since this exposes a new DOM event, it seems surprising that no tests demonstrate a change in behaviour. Maybe add a test that shows that these changes are working? |
|
Opened new PR for upstreamable changes. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#23166. |
|
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#23166. |
|
It seems like the web-platform-tests have a few tests which detect transitioncancel when an element becomes
The rest of the tests that test I'm not sure what the procedure is when adding new WPT tests, but I'm happy to work through that. (the @servo-wpt-sync bot is really cool!) |
|
@bors-servo try=wpt |
Add support for canceling CSS transitions This change adds support for canceling CSS transitions when a property is no longer transitionable. Support for canceling and replacing CSS transitions when the end value changes is still pending. This change also takes advantage of updating the constellation message to fix a bug where transition events could be sent for closed pipelines. Fixes #15079. <!-- 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] These changes fix #15079. <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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. -->
|
|
|
|
looks good! don't forget to run |
| getComputedStyle(div).backgroundColor; | ||
|
|
||
| // Remove the transitioning property from transition-property asynchronously. | ||
| setTimeout(() => { div.style.transitionProperty = 'none'; }, 0); |
This comment has been minimized.
This comment has been minimized.
| await eventWatcher.wait_for('transitioncancel'); | ||
|
|
||
| // There should be no transitionend events received. | ||
| await new Promise(resolve => setTimeout(resolve, 300)); |
This comment has been minimized.
This comment has been minimized.
| // Attach event listeners | ||
| const eventWatcher = new EventWatcher(t, div, ['transitioncancel']); | ||
| div.addEventListener('transitionend', t.step_func((event) => { | ||
| console.log(event); |
This comment has been minimized.
This comment has been minimized.
|
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#23166. |
|
@bors-servo r+ |
|
|
Add support for canceling CSS transitions This change adds support for canceling CSS transitions when a property is no longer transitionable. Support for canceling and replacing CSS transitions when the end value changes is still pending. This change also takes advantage of updating the constellation message to fix a bug where transition events could be sent for closed pipelines. Fixes #15079. <!-- 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] These changes fix #15079. <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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 retry |
Add support for canceling CSS transitions This change adds support for canceling CSS transitions when a property is no longer transitionable. Support for canceling and replacing CSS transitions when the end value changes is still pending. This change also takes advantage of updating the constellation message to fix a bug where transition events could be sent for closed pipelines. Fixes #15079. <!-- 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] These changes fix #15079. <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- 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 retry |
|
|
This change adds support for canceling CSS transitions when a property is no longer transitionable or when an element becomes styled with display:none. Support for canceling and replacing CSS transitions when the end value changes is still pending. This change also takes advantage of updating the constellation message to fix a bug where transition events could be sent for closed pipelines. Cherry-picked from servo/servo#26244 (though this is not part of the Gecko build).
This change adds support for canceling CSS transitions when a property is no longer transitionable or when an element becomes styled with display:none. Support for canceling and replacing CSS transitions when the end value changes is still pending. This change also takes advantage of updating the constellation message to fix a bug where transition events could be sent for closed pipelines. Cherry-picked from servo/servo#26244 (though this is not part of the Gecko build).
This change adds support for canceling CSS transitions when a property is no longer transitionable or when an element becomes styled with display:none. Support for canceling and replacing CSS transitions when the end value changes is still pending. This change also takes advantage of updating the constellation message to fix a bug where transition events could be sent for closed pipelines. Cherry-picked from servo/servo#26244 (though this is not part of the Gecko build). UltraBlame original commit: 612b48f120bac79925d232386e6fe12bb833b027
This change adds support for canceling CSS transitions when a property is no longer transitionable or when an element becomes styled with display:none. Support for canceling and replacing CSS transitions when the end value changes is still pending. This change also takes advantage of updating the constellation message to fix a bug where transition events could be sent for closed pipelines. Cherry-picked from servo/servo#26244 (though this is not part of the Gecko build). UltraBlame original commit: 612b48f120bac79925d232386e6fe12bb833b027
This change adds support for canceling CSS transitions when a property is no longer transitionable or when an element becomes styled with display:none. Support for canceling and replacing CSS transitions when the end value changes is still pending. This change also takes advantage of updating the constellation message to fix a bug where transition events could be sent for closed pipelines. Cherry-picked from servo/servo#26244 (though this is not part of the Gecko build). UltraBlame original commit: 612b48f120bac79925d232386e6fe12bb833b027
mrobinson commentedApr 21, 2020
This change adds support for canceling CSS transitions when a property is
no longer transitionable. Support for canceling and replacing CSS
transitions when the end value changes is still pending. This change
also takes advantage of updating the constellation message to fix a bug
where transition events could be sent for closed pipelines.
Fixes #15079.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors