[webkit-changes] [WebKit/WebKit] 24ceea: [web-animations] Refactor CSSPropertyAnimation::bl...
Antoine Quint
noreply at github.com
Thu Dec 15 03:24:11 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 24ceea27a0d54229a64fa1339438b7890c98e63f
https://github.com/WebKit/WebKit/commit/24ceea27a0d54229a64fa1339438b7890c98e63f
Author: Antoine Quint <graouts at apple.com>
Date: 2022-12-15 (Thu, 15 Dec 2022)
Changed paths:
M Source/WebCore/animation/CSSPropertyAnimation.cpp
M Source/WebCore/animation/CSSPropertyAnimation.h
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/WebAnimation.cpp
M Source/WebCore/rendering/style/KeyframeList.cpp
Log Message:
-----------
[web-animations] Refactor CSSPropertyAnimation::blendProperties()
https://bugs.webkit.org/show_bug.cgi?id=249320
Reviewed by Antti Koivisto.
As we are getting ready to call CSSPropertyAnimation::blendCustomProperty() from more places
to support additivity for custom properties, we first refactor things a bit to have a single
CSSPropertyAnimation::blendProperty() method which takes in a CSSPropertyAnimation::Property
argument which is a variant for either a standard property or a custom property.
This will greatly reduce the need at call sites to use WTF::switchOn to deal with the two
types of CSS properties.
Additionally, we start using CSSPropertyBlendingClient references instead of pointers since
those values were never nullptr, at least not for a good reason.
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyBlendingContext::CSSPropertyBlendingContext):
(WebCore::blendFunc):
(WebCore::blendStandardProperty):
(WebCore::blendCustomProperty):
(WebCore::CSSPropertyAnimation::blendProperty):
(WebCore::CSSPropertyAnimation::blendProperties): Deleted.
(WebCore::CSSPropertyAnimation::blendCustomProperty): Deleted.
* Source/WebCore/animation/CSSPropertyAnimation.h:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):
* Source/WebCore/animation/WebAnimation.cpp:
(WebCore::WebAnimation::commitStyles):
* Source/WebCore/rendering/style/KeyframeList.cpp:
(WebCore::KeyframeList::fillImplicitKeyframes):
Canonical link: https://commits.webkit.org/257910@main
More information about the webkit-changes
mailing list