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 upHave animations more closely match the HTML spec #26407
Conversation
highfive
commented
May 4, 2020
|
Heads up! This PR modifies the following files:
|
highfive
commented
May 4, 2020
|
@bors-servo try=wpt |
[RFC] Use a restyle for animation ticks This change corrects synchronization issues with animations, by reworking the animation processing model to do a quick restyle and incremental layout when ticking animations. While this change adds overhead to animation ticks, the idea is that this will be the fallback when synchronous behavior is required to fulfill specification requirements. In the optimistic case, many animations could be updated and applied off-the-main-thread and then resynchronized when style information is queried by script. Fixes #13865. <!-- 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 - [ ] These changes fix #13865 <!-- 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. -->
|
|
|
Should this PR enable the disabled tests, or are there other prerequisites? |
|
@jdm, yep. Currently, I think there are only two disabled:
These are enabled by removing the ini files which were disabling them. Could it be that there are more disabled in another directory? |
04d8e27
to
8131ee3
|
@bors-servo try=wpt Removing two expectations for newly passing tests. |
[RFC] Use a restyle for animation ticks This change corrects synchronization issues with animations, by reworking the animation processing model to do a quick restyle and incremental layout when ticking animations. While this change adds overhead to animation ticks, the idea is that this will be the fallback when synchronous behavior is required to fulfill specification requirements. In the optimistic case, many animations could be updated and applied off-the-main-thread and then resynchronized when style information is queried by script. Fixes #13865. <!-- 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 - [ ] These changes fix #13865 <!-- 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. -->
|
What about the animation-related test directories skipped in include.ini? |
|
|
|
I wasn't sure if it was better to unskip intermittent tests later, but I'm happy to give it a shot in this change. |
|
It looks like there is more required to eliminate the flakiness from animations and transitions tests. My suspicion is that this is #19242 and perhaps, in addition, making sure that transition and animation events arrive to the script thread before the next animation tick is triggered. I'll start taking a look at this tomorrow. It seems like it would be good to have this all sorted out before going too much further. |
| const CLICK_IN_PROGRESS = 1 << 2; | ||
| const CLICK_IN_PROGRESS = 1 << 3; | ||
|
|
||
| #[doc = "Specifies whether this node is focusable and whether it is supposed \ | ||
| to be reachable with using sequential focus navigation."] | ||
| const SEQUENTIALLY_FOCUSABLE = 1 << 3; | ||
| const SEQUENTIALLY_FOCUSABLE = 1 << 4; | ||
|
|
||
| // There are two free bits here. | ||
| // There is one bit free here. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
mrobinson
May 4, 2020
Author
Member
Whoops. This is left over from a previous version of this change where I added NodeFlags::HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS. It turns out that isn't necessary for this change, so I'll remove these changes as well.
8131ee3
to
84b5f97
This change corrects synchronization issues with animations, by reworking the animation processing model to do a quick restyle and incremental layout when ticking animations. While this change adds overhead to animation ticks, the idea is that this will be the fallback when synchronous behavior is required to fulfill specification requirements. In the optimistic case, many animations could be updated and applied off-the-main-thread and then resynchronized when style information is queried by script. Fixes #13865.
84b5f97
to
7ff8900
|
@bors-servo try=wpt |
This is a small step toward fixing #19242. The main idea is that the clock for animations should advance as the event loop ticks. We accomplish this by moving the clock from layout and naming it the "animation timeline" which is the spec language. This should fix flakiness with animations and transitions tests where a reflow could move animations forward while script was running. This change also starts to break out transition and animation events into their own data structure, because it's quite likely that the next step in fixing #19242 is to no longer send these events through a channel.
3f3171e
to
3a74013
|
@bors-servo try=wpt |
[RFC] Have animations more closely match the HTML spec These two commits do two major things: **Have animations ticks trigger a restyle**: This corrects synchronization issues with animations, where the values used in layout are out of sync with what is returned by `getComputedStyle`. **Tick the animation timer in script according to spec**: This greatly reduces the flakiness of animation and transitions tests. Fixes #13865. <!-- 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 - [ ] These changes fix #13865 <!-- 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 try=wpt-mac |
|
@bors-servo retry |
[RFC] Have animations more closely match the HTML spec These two commits do two major things: **Have animations ticks trigger a restyle**: This corrects synchronization issues with animations, where the values used in layout are out of sync with what is returned by `getComputedStyle`. **Tick the animation timer in script according to spec**: This greatly reduces the flakiness of animation and transitions tests. Fixes #13865. <!-- 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 - [ ] These changes fix #13865 <!-- 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 r=jdm |
|
|
|
|
mrobinson commentedMay 4, 2020
•
edited
These two commits do two major things:
Have animations ticks trigger a restyle: This corrects synchronization issues with animations,
where the values used in layout are out of sync with what is returned by
getComputedStyle.Tick the animation timer in script according to spec: This greatly reduces the flakiness of
animation and transitions tests.
Fixes #13865.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors