[webkit-changes] [WebKit/WebKit] 7e5538: [web-animations] refactor animation code related t...

Antoine Quint noreply at github.com
Wed Dec 20 04:17:31 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7e5538996fd3d99a2cf32c081881e9e8778d461a
      https://github.com/WebKit/WebKit/commit/7e5538996fd3d99a2cf32c081881e9e8778d461a
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2023-12-20 (Wed, 20 Dec 2023)

  Changed paths:
    M Source/WebCore/animation/BlendingKeyframes.cpp
    M Source/WebCore/animation/BlendingKeyframes.h
    M Source/WebCore/animation/KeyframeEffect.cpp
    M Source/WebCore/animation/KeyframeEffect.h

  Log Message:
  -----------
  [web-animations] refactor animation code related to explicitly inherited properties in keyframes
https://bugs.webkit.org/show_bug.cgi?id=266687
rdar://119921171

Reviewed by Antti Koivisto.

We still have several functions called under `KeyframeEffect::setBlendingKeyframes()` that iterate
over blending keyframes to determine various conditions. We need to refactor more of those in the
way we have in 272325 at main so that we have fewer iterations and also move code over to `BlendingKeyframes`
for better encapsulation.

One such function is `Keyframe::computeHasExplicitlyInheritedKeyframeProperty()` which does nothing
but check styles on the blending keyframes. We move that logic over to `BlendingKeyframes::analyzeKeyframe()`.

* Source/WebCore/animation/BlendingKeyframes.cpp:
(WebCore::BlendingKeyframes::analyzeKeyframe):
* Source/WebCore/animation/BlendingKeyframes.h:
(WebCore::BlendingKeyframes::BlendingKeyframes):
(WebCore::BlendingKeyframes::hasExplicitlyInheritedKeyframeProperty const):
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setBlendingKeyframes):
(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):
(WebCore::KeyframeEffect::computeHasKeyframeComposingAcceleratedProperty):
(WebCore::KeyframeEffect::computeHasExplicitlyInheritedKeyframeProperty): Deleted.
* Source/WebCore/animation/KeyframeEffect.h:

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




More information about the webkit-changes mailing list