2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
25 #ifndef KeyframeList_h
26 #define KeyframeList_h
28 #include "AtomicString.h"
29 #include <wtf/Vector.h>
30 #include <wtf/HashSet.h>
31 #include <wtf/RefPtr.h>
45 float key() const { return m_key
; }
46 const RenderStyle
* style() const { return m_style
.get(); }
49 RefPtr
<RenderStyle
> m_style
;
54 KeyframeList(RenderObject
* renderer
, const AtomicString
& animationName
)
55 : m_animationName(animationName
)
56 , m_renderer(renderer
)
63 bool operator==(const KeyframeList
& o
) const;
64 bool operator!=(const KeyframeList
& o
) const { return !(*this == o
); }
66 const AtomicString
& animationName() const { return m_animationName
; }
68 void insert(float key
, PassRefPtr
<RenderStyle
> style
);
70 void addProperty(int prop
) { m_properties
.add(prop
); }
71 bool containsProperty(int prop
) const { return m_properties
.contains(prop
); }
72 HashSet
<int>::const_iterator
beginProperties() const { return m_properties
.begin(); }
73 HashSet
<int>::const_iterator
endProperties() const { return m_properties
.end(); }
76 bool isEmpty() const { return m_keyframes
.isEmpty(); }
77 size_t size() const { return m_keyframes
.size(); }
78 Vector
<KeyframeValue
>::const_iterator
beginKeyframes() const { return m_keyframes
.begin(); }
79 Vector
<KeyframeValue
>::const_iterator
endKeyframes() const { return m_keyframes
.end(); }
82 AtomicString m_animationName
;
83 Vector
<KeyframeValue
> m_keyframes
;
84 HashSet
<int> m_properties
; // the properties being animated
85 RenderObject
* m_renderer
;
88 } // namespace WebCore
90 #endif // KeyframeList_h