[webkit-changes] [WebKit/WebKit] ea7b39: [web-animations] add an AnimatableProperty type to...

Antoine Quint noreply at github.com
Sat Dec 17 03:13:26 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ea7b3989b369d140fcf55e9962380d663a79d905
      https://github.com/WebKit/WebKit/commit/ea7b3989b369d140fcf55e9962380d663a79d905
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2022-12-17 (Sat, 17 Dec 2022)

  Changed paths:
    M Source/WebCore/animation/WebAnimationTypes.h

  Log Message:
  -----------
  [web-animations] add an AnimatableProperty type to encapsulate either a standard or custom property
https://bugs.webkit.org/show_bug.cgi?id=249498

Reviewed by Darin Adler.

The animation code is currently heavily biased towards dealing with "standard" CSS properties, represented
by the CSSPropertyID enum. However, with the work to add interpolation support for custom properties (see
bug 249293) and to support CSS Transitions for custom properties (see bug 249399), we really need to deal
with both custom properties and standard properties everywhere we currently deal with only standard
properties.

In this patch we're adding a new type, AnimatableProperty, which is an std::variant<CSSPropertyID, AtomString>.
We currently use CSSPropertyID as a value for property lists which are HashSet<> and as keys to HashMap<>,
so we must add the relevant traits to support this use for AnimatableProperty.

* Source/WebCore/animation/WebAnimationTypes.h:
(WTF::DefaultHash<WebCore::AnimatableProperty>::hash):
(WTF::DefaultHash<WebCore::AnimatableProperty>::equal):
(WTF::HashTraits<WebCore::AnimatableProperty>::constructDeletedValue):
(WTF::HashTraits<WebCore::AnimatableProperty>::isDeletedValue):

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




More information about the webkit-changes mailing list