summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/style/KeyframeList.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/style/KeyframeList.h')
-rw-r--r--Source/WebCore/rendering/style/KeyframeList.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/WebCore/rendering/style/KeyframeList.h b/Source/WebCore/rendering/style/KeyframeList.h
index 6b8c7f323..8ba0ac76b 100644
--- a/Source/WebCore/rendering/style/KeyframeList.h
+++ b/Source/WebCore/rendering/style/KeyframeList.h
@@ -22,8 +22,7 @@
*
*/
-#ifndef KeyframeList_h
-#define KeyframeList_h
+#pragma once
#include "CSSPropertyNames.h"
#include "StyleInheritedData.h"
@@ -35,12 +34,13 @@
namespace WebCore {
class RenderStyle;
+class TimingFunction;
class KeyframeValue {
public:
- KeyframeValue(double key, PassRefPtr<RenderStyle> style)
+ KeyframeValue(double key, std::unique_ptr<RenderStyle> style)
: m_key(key)
- , m_style(style)
+ , m_style(WTFMove(style))
{
}
@@ -52,12 +52,14 @@ public:
void setKey(double key) { m_key = key; }
const RenderStyle* style() const { return m_style.get(); }
- void setStyle(PassRefPtr<RenderStyle> style) { m_style = style; }
+ void setStyle(std::unique_ptr<RenderStyle> style) { m_style = WTFMove(style); }
+
+ TimingFunction* timingFunction(const AtomicString& name) const;
private:
double m_key;
HashSet<CSSPropertyID> m_properties; // The properties specified in this keyframe.
- RefPtr<RenderStyle> m_style;
+ std::unique_ptr<RenderStyle> m_style;
};
class KeyframeList {
@@ -75,17 +77,17 @@ public:
const AtomicString& animationName() const { return m_animationName; }
- void insert(const KeyframeValue& keyframe);
+ void insert(KeyframeValue&&);
void addProperty(CSSPropertyID prop) { m_properties.add(prop); }
bool containsProperty(CSSPropertyID prop) const { return m_properties.contains(prop); }
- HashSet<CSSPropertyID>::const_iterator beginProperties() const { return m_properties.begin(); }
- HashSet<CSSPropertyID>::const_iterator endProperties() const { return m_properties.end(); }
+ const HashSet<CSSPropertyID>& properties() const { return m_properties; }
void clear();
bool isEmpty() const { return m_keyframes.isEmpty(); }
size_t size() const { return m_keyframes.size(); }
const KeyframeValue& operator[](size_t index) const { return m_keyframes[index]; }
+ const Vector<KeyframeValue>& keyframes() const { return m_keyframes; }
private:
AtomicString m_animationName;
@@ -94,5 +96,3 @@ private:
};
} // namespace WebCore
-
-#endif // KeyframeList_h