Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a992cac852a73024d23bf831adbff1cb2cc7fe2e
      
https://github.com/WebKit/WebKit/commit/a992cac852a73024d23bf831adbff1cb2cc7fe2e
  Author: Antoine Quint <[email protected]>
  Date:   2025-10-17 (Fri, 17 Oct 2025)

  Changed paths:
    M Source/WebCore/animation/AnimationEffectTiming.h
    M Source/WebCore/platform/animation/AcceleratedEffect.cpp
    M Source/WebCore/platform/animation/AcceleratedEffect.h
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  [threaded-animation-resolution] fix decoding of `AcceleratedEffectTiming`
https://bugs.webkit.org/show_bug.cgi?id=300979
rdar://problem/162856767

Reviewed by Anne van Kesteren.

In 287181@main we differentiated between specified values for animation effect
timing properties `iterationDuration`, `startDelay` and `endDelay` and their
resolved values. While we updated the serialization for the affected class,
`AcceleratedEffectTiming`, we did not respect the order in which these 
properties
are encoded and decoded. This was not apparent because the various properties 
that
were switched around have types that can bridge between them 
(`WebAnimationTime`,
`double` and `Seconds`) but it led to some issues when decoding the values since
the wrong properties were being restored.

This was picked up while bringing up scroll-driven animations support in the 
remote
layer tree since time-based and percentage-based values were swapped, which was 
not
previously visible with only time-based animations.

Additionally, since the resolved values are now encoded, it's no longer 
necessary
to recompute them when decoding an `AcceleratedEffect`, so we remove the call to
`AnimationEffectTiming::updateComputedProperties()` from within the 
`AcceleratedEffect`
decoding constructor.

Finally, we also make a drive-by fix to the type returned by 
`AcceleratedEffect::timing()`
to return a reference rather than a copy.

* Source/WebCore/animation/AnimationEffectTiming.h:
* Source/WebCore/platform/animation/AcceleratedEffect.cpp:
(WebCore::AcceleratedEffect::AcceleratedEffect):
* Source/WebCore/platform/animation/AcceleratedEffect.h:
(WebCore::AcceleratedEffect::timing const):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/301703@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to