Bug 308304
| Summary: | [threaded-animations] failed assertion`ASSERT(timeline)` in `RemoteLayerTreeNode::setAcceleratedEffectsAndBaseValues()` | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Antoine Quint <graouts> |
| Component: | Animations | Assignee: | Antoine Quint <graouts> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | graouts, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Antoine Quint
We have reports of `ASSERT(timeline)` in `ScrollTimeline::computeProgressResolutionData()` failing.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Antoine Quint
rdar://170600376
Antoine Quint
I've found one way to reproduce such a crash with content like so:
```
<style>
#container {
position: absolute;
width: 400px;
height: 400px;
overflow: scroll;
}
@keyframes grow {
from { scale: 0 1 }
to { scale: 1 1 }
}
#progress {
position: absolute;
width: 100%;
height: 2000px;
background-color: black;
transform-origin: top left;
animation: grow auto;
animation-timeline: scroll();
}
</style>
<div id="container">
<div id="progress"></div>
</div>
```
In this example, `#container` is composited, but once the animation applying to `#progress` is accounted for, `#container` no longer is. This will cause the accelerated timeline to be removed, but the accelerated animation is not, causing the disconnect in the remote layer tree.
I think we need to do two things here:
1. ensure a scrolling container that is the source of a timeline targeted by accelerated animations is composted,
2. harden our code such that the animations pending upload to the remote layer tree are pruned if we find out their accelerated timeline representation has been removed since their addition.
Antoine Quint
In the end we merely need to call to `Document::runPostRenderingUpdateAnimationTasks()` inside `Page::doAfterUpdateRendering()` so that it's done after `layoutIfNeeded(LayoutOptions::UpdateCompositingLayers)`.
Antoine Quint
Pull request: https://github.com/WebKit/WebKit/pull/59168
EWS
Committed 307993@main (a5afe56ab689): <https://commits.webkit.org/307993@main>
Reviewed commits have been landed. Closing PR #59168 and removing active labels.
EWS
Committed 305413.372@safari-7624-branch (69bda0f8ed7d): <https://commits.webkit.org/305413.372@safari-7624-branch>
Reviewed commits have been landed. Closing PR #4564 and removing active labels.