Skip to content
Permalink
Browse files
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: https://svn.webkit.org/repository/webkit/trunk@295723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
graouts authored and webkit-commit-queue committed Jun 22, 2022
1 parent 4ca5e92 commit d53317910e70c7d716f4837bc8ac7ab29568fa9a
Showing 2 changed files with 1 addition and 7 deletions.
@@ -835,11 +835,7 @@ void KeyframeEffect::updateBlendingKeyframes(RenderStyle& elementStyle, const St
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 @@ void KeyframeEffect::computeCSSTransitionBlendingKeyframes(const RenderStyle* ol
Style::loadPendingResources(*toStyle, *document(), m_target.get());

KeyframeList keyframeList(m_keyframesName);
keyframeList.addProperty(property);

KeyframeValue fromKeyframeValue(0, RenderStyle::clonePtr(*oldStyle));
fromKeyframeValue.addProperty(property);
@@ -88,7 +88,6 @@ class KeyframeList {

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;

0 comments on commit d533179

Please sign in to comment.