[webkit-changes] [WebKit/WebKit] 69ae89: [scroll-animations] update `AnimationTimeline.curr...

Antoine Quint noreply at github.com
Tue Sep 24 10:40:24 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 69ae8979bdae428fcc054bdfad5f193be97db508
      https://github.com/WebKit/WebKit/commit/69ae8979bdae428fcc054bdfad5f193be97db508
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2024-09-24 (Tue, 24 Sep 2024)

  Changed paths:
    M Source/WebCore/animation/AnimationTimeline.cpp
    M Source/WebCore/animation/AnimationTimeline.h
    M Source/WebCore/animation/AnimationTimeline.idl
    M Source/WebCore/animation/CSSNumberishTime.cpp
    M Source/WebCore/animation/CSSNumberishTime.h
    M Source/WebCore/animation/DocumentTimeline.cpp
    M Source/WebCore/animation/DocumentTimeline.h
    M Source/WebCore/style/Styleable.cpp

  Log Message:
  -----------
  [scroll-animations] update `AnimationTimeline.currentTime` to use `CSSNumberish`
https://bugs.webkit.org/show_bug.cgi?id=279730
rdar://136031154

Reviewed by Tim Nguyen.

The `AnimationTimeline.currentTime` property is changing to use `CSSNumberish` in order
to represent percentage values for `ScrollTimeline` and `ViewTimeline`. Before we do the
work to actually report a percentage `currentTime` on those timeline types, we modify
the existing API to use `CSSNumberishTime` to wrap the value through the API.

Some small refactoring was required as a result but also implementing some new `CSSNumberishTime`
operators.

* Source/WebCore/animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::bindingsCurrentTime): Deleted.
* Source/WebCore/animation/AnimationTimeline.h:
(WebCore::AnimationTimeline::currentTime):
* Source/WebCore/animation/AnimationTimeline.idl:
* Source/WebCore/animation/CSSNumberishTime.cpp:
(WebCore::CSSNumberishTime::operator+=):
(WebCore::CSSNumberishTime::operator-=):
(WebCore::CSSNumberishTime::operator== const):
* Source/WebCore/animation/CSSNumberishTime.h:
* Source/WebCore/animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::currentTime):
(WebCore::DocumentTimeline::removeReplacedAnimations):
* Source/WebCore/animation/DocumentTimeline.h:
* Source/WebCore/style/Styleable.cpp:
(WebCore::updateCSSTransitionsForStyleableAndProperty):

Canonical link: https://commits.webkit.org/284168@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