[webkit-changes] [WebKit/WebKit] 89612b: [scroll-animations] update effect `phase` and `act...

Antoine Quint noreply at github.com
Fri Oct 11 14:15:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 89612b5ede18dd364afff3070f3b09aa04b20211
      https://github.com/WebKit/WebKit/commit/89612b5ede18dd364afff3070f3b09aa04b20211
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2024-10-11 (Fri, 11 Oct 2024)

  Changed paths:
    M Source/WebCore/animation/AnimationEffect.cpp
    M Source/WebCore/animation/AnimationEffect.h
    M Source/WebCore/animation/AnimationEffectTiming.cpp
    M Source/WebCore/animation/AnimationEffectTiming.h
    M Source/WebCore/animation/CSSNumberishTime.cpp
    M Source/WebCore/animation/CSSNumberishTime.h
    M Source/WebCore/platform/animation/AcceleratedEffect.cpp

  Log Message:
  -----------
  [scroll-animations] update effect `phase` and `activeTime` computation to account for percentage values
https://bugs.webkit.org/show_bug.cgi?id=281217
rdar://137668682

Reviewed by Simon Fraser.

In order to compute the phases of Scroll-driven Animations we update the `phase` and `activeTime`
computations under `AnimationEffectTiming::getBasicTiming()` to work with percentage time values
by adopting the latest version of their computation procedure as defined by Web Animations Level 2.

Since additional data is needed by `AnimationEffectTiming` to compute those, namely the associated
animation's associated timeline's current time and duration, we introduce a new data structure to
pass to `AnimationEffectTiming::getBasicTiming()` and `AnimationEffectTiming::resolve()`.

* Source/WebCore/animation/AnimationEffect.cpp:
(WebCore::AnimationEffect::resolutionData const):
(WebCore::AnimationEffect::getBasicTiming const):
(WebCore::AnimationEffect::getComputedTiming const):
(WebCore::AnimationEffect::localTime const): Deleted.
(WebCore::AnimationEffect::playbackRate const): Deleted.
* Source/WebCore/animation/AnimationEffect.h:
* Source/WebCore/animation/AnimationEffectTiming.cpp:
(WebCore::AnimationEffectTiming::getBasicTiming const):
(WebCore::AnimationEffectTiming::resolve const):
* Source/WebCore/animation/AnimationEffectTiming.h:
* Source/WebCore/animation/CSSNumberishTime.cpp:
(WebCore::CSSNumberishTime::matchingZero const):
(WebCore::CSSNumberishTime::approximatelyLessThan const):
(WebCore::CSSNumberishTime::approximatelyGreaterThan const):
* Source/WebCore/animation/CSSNumberishTime.h:
* Source/WebCore/platform/animation/AcceleratedEffect.cpp:
(WebCore::AcceleratedEffect::apply):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list