Remove KeyframeList::addProperty()
https://bugs.webkit.org/show_bug.cgi?id=241805
Patch by Antoine Quint <graouts@apple.com> on 2022-06-21
Reviewed by Dean Jackson.
This method is not needed since KeyframeList::insert() already adds the properties
of the newly inserted keyframe to KeyframeList::m_properties.
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::updateBlendingKeyframes):
(WebCore::KeyframeEffect::computeCSSTransitionBlendingKeyframes):
* Source/WebCore/rendering/style/KeyframeList.h:
(WebCore::KeyframeList::addProperty): Deleted.
Canonical link: https://commits.webkit.org/251728@main
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@295723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/animation/KeyframeEffect.cpp b/Source/WebCore/animation/KeyframeEffect.cpp
index 173e219..e962c80 100644
--- a/Source/WebCore/animation/KeyframeEffect.cpp
+++ b/Source/WebCore/animation/KeyframeEffect.cpp
@@ -835,11 +835,7 @@
break;
}
- auto styleProperties = keyframe.style->immutableCopyIfNeeded();
- for (unsigned i = 0; i < styleProperties->propertyCount(); ++i)
- keyframeList.addProperty(styleProperties->propertyAt(i).id());
-
- auto keyframeRule = StyleRuleKeyframe::create(WTFMove(styleProperties));
+ auto keyframeRule = StyleRuleKeyframe::create(keyframe.style->immutableCopyIfNeeded());
keyframeValue.setStyle(styleResolver.styleForKeyframe(*m_target, elementStyle, resolutionContext, keyframeRule.get(), keyframeValue));
keyframeList.insert(WTFMove(keyframeValue));
}
@@ -1043,7 +1039,6 @@
Style::loadPendingResources(*toStyle, *document(), m_target.get());
KeyframeList keyframeList(m_keyframesName);
- keyframeList.addProperty(property);
KeyframeValue fromKeyframeValue(0, RenderStyle::clonePtr(*oldStyle));
fromKeyframeValue.addProperty(property);
diff --git a/Source/WebCore/rendering/style/KeyframeList.h b/Source/WebCore/rendering/style/KeyframeList.h
index ad87796..46ccf0a 100644
--- a/Source/WebCore/rendering/style/KeyframeList.h
+++ b/Source/WebCore/rendering/style/KeyframeList.h
@@ -88,7 +88,6 @@
void insert(KeyframeValue&&);
- void addProperty(CSSPropertyID prop) { m_properties.add(prop); }
bool containsProperty(CSSPropertyID prop) const { return m_properties.contains(prop); }
const HashSet<CSSPropertyID>& properties() const { return m_properties; }
bool containsAnimatableProperty() const;