[webkit-changes] [WebKit/WebKit] eee690: [web-animations] adopt AnimatableProperty in more ...
Antoine Quint
noreply at github.com
Mon Dec 19 01:55:39 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: eee69004092ae8ec6127d7a22449f326e0070060
https://github.com/WebKit/WebKit/commit/eee69004092ae8ec6127d7a22449f326e0070060
Author: Antoine Quint <graouts at apple.com>
Date: 2022-12-19 (Mon, 19 Dec 2022)
Changed paths:
M Source/WebCore/animation/CSSPropertyAnimation.cpp
M Source/WebCore/animation/CSSPropertyAnimation.h
M Source/WebCore/animation/DocumentTimeline.cpp
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/animation/KeyframeEffect.h
M Source/WebCore/animation/WebAnimation.cpp
M Source/WebCore/inspector/agents/InspectorAnimationAgent.cpp
M Source/WebCore/rendering/style/KeyframeList.cpp
M Source/WebCore/rendering/style/KeyframeList.h
M Source/WebCore/style/StyleResolver.cpp
Log Message:
-----------
[web-animations] adopt AnimatableProperty in more places
https://bugs.webkit.org/show_bug.cgi?id=249541
Reviewed by Antti Koivisto.
We continue the adoption of the new AnimatableProperty types which holds either a
CSSPropertyID for standard CSS properties or an AtomString for custom CSS properties.
We start with KeyframeValue and KeyframeList which is the central place we store
properties. We remove the two separate property lists to have a single
HashSet<AnimatableProperty> and make all remaining methods relying on CSSPropertyID
now make no assumption on the property type it's dealing with.
We also ensure we never pass in CSSPropertyCustom as a CSSPropertyID, changing
Style::Resolver::styleForKeyframe() to have separate KeyframeValue::addKeyframe()
calls, one for custom properties and one for standard properties.
The rest of this change is pretty straightforward refactoring to deal with
AnimatableProperty where we'd previously only deal with CSSPropertyID.
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimation::isPropertyAnimatable):
(WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
* Source/WebCore/animation/CSSPropertyAnimation.h:
* Source/WebCore/animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::animationCanBeRemoved):
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::getKeyframes):
(WebCore::KeyframeEffect::processKeyframes):
(WebCore::KeyframeEffect::animatedProperties):
(WebCore::KeyframeEffect::setBlendingKeyframes):
(WebCore::KeyframeEffect::computeStackingContextImpact):
(WebCore::KeyframeEffect::computeAcceleratedPropertiesState):
(WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):
(WebCore::KeyframeEffect::computeHasImplicitKeyframeForAcceleratedProperty):
(WebCore::KeyframeEffect::animatedCustomProperties): Deleted.
* Source/WebCore/animation/KeyframeEffect.h:
* Source/WebCore/animation/WebAnimation.cpp:
(WebCore::WebAnimation::commitStyles):
* Source/WebCore/inspector/agents/InspectorAnimationAgent.cpp:
(WebCore::buildObjectForKeyframes):
* Source/WebCore/rendering/style/KeyframeList.cpp:
(WebCore::KeyframeList::insert):
(WebCore::KeyframeList::copyKeyframes):
(WebCore::KeyframeList::fillImplicitKeyframes):
(WebCore::KeyframeList::containsAnimatableProperty const):
(WebCore::KeyframeList::addProperty):
(WebCore::KeyframeList::containsProperty const):
(WebCore::KeyframeValue::addProperty):
(WebCore::KeyframeValue::containsProperty const):
* Source/WebCore/rendering/style/KeyframeList.h:
(WebCore::KeyframeValue::properties const):
(WebCore::KeyframeList::properties const):
(WebCore::KeyframeValue::addProperty): Deleted.
(WebCore::KeyframeValue::containsProperty const): Deleted.
(WebCore::KeyframeValue::addCustomProperty): Deleted.
(WebCore::KeyframeValue::containsCustomProperty const): Deleted.
(WebCore::KeyframeValue::customProperties const): Deleted.
(WebCore::KeyframeList::containsProperty const): Deleted.
(WebCore::KeyframeList::addCustomProperty): Deleted.
(WebCore::KeyframeList::containsCustomProperty const): Deleted.
(WebCore::KeyframeList::customProperties const): Deleted.
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::styleForKeyframe):
Canonical link: https://commits.webkit.org/258075@main
More information about the webkit-changes
mailing list