OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/animation/css/CSSAnimationData.h" | 5 #include "core/animation/css/CSSAnimationData.h" |
6 | 6 |
7 #include "core/animation/Timing.h" | 7 #include "core/animation/Timing.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 , m_nameList(other.m_nameList) | 22 , m_nameList(other.m_nameList) |
23 , m_iterationCountList(other.m_iterationCountList) | 23 , m_iterationCountList(other.m_iterationCountList) |
24 , m_directionList(other.m_directionList) | 24 , m_directionList(other.m_directionList) |
25 , m_fillModeList(other.m_fillModeList) | 25 , m_fillModeList(other.m_fillModeList) |
26 , m_playStateList(other.m_playStateList) | 26 , m_playStateList(other.m_playStateList) |
27 { | 27 { |
28 } | 28 } |
29 | 29 |
30 const AtomicString& CSSAnimationData::initialName() | 30 const AtomicString& CSSAnimationData::initialName() |
31 { | 31 { |
32 DEFINE_STATIC_LOCAL(const AtomicString, name, ("none", AtomicString::Constru
ctFromLiteral)); | 32 DEFINE_STATIC_LOCAL(const AtomicString, name, ("none")); |
33 return name; | 33 return name; |
34 } | 34 } |
35 | 35 |
36 bool CSSAnimationData::animationsMatchForStyleRecalc(const CSSAnimationData& oth
er) const | 36 bool CSSAnimationData::animationsMatchForStyleRecalc(const CSSAnimationData& oth
er) const |
37 { | 37 { |
38 return m_nameList == other.m_nameList && m_playStateList == other.m_playStat
eList | 38 return m_nameList == other.m_nameList && m_playStateList == other.m_playStat
eList |
39 && m_iterationCountList == other.m_iterationCountList | 39 && m_iterationCountList == other.m_iterationCountList |
40 && m_directionList == other.m_directionList | 40 && m_directionList == other.m_directionList |
41 && m_fillModeList == other.m_fillModeList | 41 && m_fillModeList == other.m_fillModeList |
42 && delayList() == other.delayList() | 42 && delayList() == other.delayList() |
43 && durationList() == other.durationList(); | 43 && durationList() == other.durationList(); |
44 } | 44 } |
45 | 45 |
46 Timing CSSAnimationData::convertToTiming(size_t index) const | 46 Timing CSSAnimationData::convertToTiming(size_t index) const |
47 { | 47 { |
48 ASSERT(index < m_nameList.size()); | 48 ASSERT(index < m_nameList.size()); |
49 Timing timing = CSSTimingData::convertToTiming(index); | 49 Timing timing = CSSTimingData::convertToTiming(index); |
50 | 50 |
51 timing.iterationCount = getRepeated(m_iterationCountList, index); | 51 timing.iterationCount = getRepeated(m_iterationCountList, index); |
52 timing.direction = getRepeated(m_directionList, index); | 52 timing.direction = getRepeated(m_directionList, index); |
53 timing.fillMode = getRepeated(m_fillModeList, index); | 53 timing.fillMode = getRepeated(m_fillModeList, index); |
54 timing.assertValid(); | 54 timing.assertValid(); |
55 return timing; | 55 return timing; |
56 } | 56 } |
57 | 57 |
58 } // namespace blink | 58 } // namespace blink |
OLD | NEW |