| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (timeline_->IsMonotonicallyIncreasing()) {Worth adding a comment here. Historically, OnValidateSnapshot was for scroll timelines, and now we have separate logic for scroll triggering with a monotonic timeline (though most of the logic is consistent).
Documentation for this method in the header file only mentions scroll timelines. Suggesting that we update the comment in the header file, and add a note here where we have the branching logic.
animations.erase(animation);We are effectively forcing the hashset to be copied just so we can remove elements from the map. AnimationTimeline::GetAnimations returns a const ref.
An SDA animation will be doing extra work here. because of the potential for animation triggers. Instead can we do the following:
```
const HeapHashSet<WeakMember<Animation>>& animations = GetAnimations();
if (Runtime...) {
...
for (auto& [animation, behaviors] : trigger-BehaviorMap()) {
DCHECK(...);
// Avoid superfluous snapshot validation, by skipping the call if it will
// be invoked in the loop below.
if (!animations.Contains(animation)) {
animation->OnValidateSnapshot(true);
}
}
}
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (timeline_->IsMonotonicallyIncreasing()) {Worth adding a comment here. Historically, OnValidateSnapshot was for scroll timelines, and now we have separate logic for scroll triggering with a monotonic timeline (though most of the logic is consistent).
Documentation for this method in the header file only mentions scroll timelines. Suggesting that we update the comment in the header file, and add a note here where we have the branching logic.
Done
animations.erase(animation);We are effectively forcing the hashset to be copied just so we can remove elements from the map. AnimationTimeline::GetAnimations returns a const ref.
An SDA animation will be doing extra work here. because of the potential for animation triggers. Instead can we do the following:
```
const HeapHashSet<WeakMember<Animation>>& animations = GetAnimations();
if (Runtime...) {
...
for (auto& [animation, behaviors] : trigger-BehaviorMap()) {
DCHECK(...);
// Avoid superfluous snapshot validation, by skipping the call if it will
// be invoked in the loop below.
if (!animations.Contains(animation)) {
animation->OnValidateSnapshot(true);
}
}
}
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
if (timeline_->IsMonotonicallyIncreasing()) {David AwogbemilaWorth adding a comment here. Historically, OnValidateSnapshot was for scroll timelines, and now we have separate logic for scroll triggering with a monotonic timeline (though most of the logic is consistent).
Documentation for this method in the header file only mentions scroll timelines. Suggesting that we update the comment in the header file, and add a note here where we have the branching logic.
David AwogbemilaDone
Done
animations.erase(animation);David AwogbemilaWe are effectively forcing the hashset to be copied just so we can remove elements from the map. AnimationTimeline::GetAnimations returns a const ref.
An SDA animation will be doing extra work here. because of the potential for animation triggers. Instead can we do the following:
```
const HeapHashSet<WeakMember<Animation>>& animations = GetAnimations();
if (Runtime...) {
...
for (auto& [animation, behaviors] : trigger-BehaviorMap()) {
DCHECK(...);
// Avoid superfluous snapshot validation, by skipping the call if it will
// be invoked in the loop below.
if (!animations.Contains(animation)) {
animation->OnValidateSnapshot(true);
}
}
}
```
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[animation-trigger] Ensure first frame reflects triggered animation
This change allows Blink to not only detect that an animation is
triggered based on the output of the style and layout phases but also
ensure that the triggered animation is reflected in the computed style
of the animating element in the same frame as the trigger detection.
As the trigger state update and the animations update are now done at
the same time, there is no need to separate the UpdateState and
UpdateAnimation functions, so they are combined.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/57126
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |