Title: [295723] trunk/Source/WebCore
Revision
295723
Author
[email protected]
Date
2022-06-21 23:25:54 -0700 (Tue, 21 Jun 2022)

Log Message

Remove KeyframeList::addProperty()
https://bugs.webkit.org/show_bug.cgi?id=241805

Patch by Antoine Quint <[email protected]> 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

Modified Paths

Diff

Modified: trunk/Source/WebCore/animation/KeyframeEffect.cpp (295722 => 295723)


--- trunk/Source/WebCore/animation/KeyframeEffect.cpp	2022-06-22 05:58:16 UTC (rev 295722)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp	2022-06-22 06:25:54 UTC (rev 295723)
@@ -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);

Modified: trunk/Source/WebCore/rendering/style/KeyframeList.h (295722 => 295723)


--- trunk/Source/WebCore/rendering/style/KeyframeList.h	2022-06-22 05:58:16 UTC (rev 295722)
+++ trunk/Source/WebCore/rendering/style/KeyframeList.h	2022-06-22 06:25:54 UTC (rev 295723)
@@ -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;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to