| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 unsigned propertyCount = propertySet->propertyCount(); | 35 unsigned propertyCount = propertySet->propertyCount(); |
| 36 for (unsigned i = 0; i < propertyCount; ++i) { | 36 for (unsigned i = 0; i < propertyCount; ++i) { |
| 37 CSSPropertyID property = propertySet->propertyAt(i).id(); | 37 CSSPropertyID property = propertySet->propertyAt(i).id(); |
| 38 // Timing-function within keyframes is special, because it is not animat
ed; it just | 38 // Timing-function within keyframes is special, because it is not animat
ed; it just |
| 39 // describes the timing function between this keyframe and the next. | 39 // describes the timing function between this keyframe and the next. |
| 40 if (property != CSSPropertyWebkitAnimationTimingFunction && property !=
CSSPropertyAnimationTimingFunction) | 40 if (property != CSSPropertyWebkitAnimationTimingFunction && property !=
CSSPropertyAnimationTimingFunction) |
| 41 addProperty(property); | 41 addProperty(property); |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 | 44 |
| 45 TimingFunction* KeyframeValue::timingFunction(const RenderStyle* keyframeStyle,
const AtomicString& name) | 45 TimingFunction* KeyframeValue::timingFunction(const RenderStyle& keyframeStyle) |
| 46 { | 46 { |
| 47 ASSERT(keyframeStyle && keyframeStyle->animations()); | 47 const CSSAnimationDataList* animations = keyframeStyle.animations(); |
| 48 for (size_t i = 0; i < keyframeStyle->animations()->size(); i++) { | 48 ASSERT(animations && !animations->isEmpty()); |
| 49 if (name == keyframeStyle->animations()->animation(i)->name()) | 49 return animations->animation(0)->timingFunction(); |
| 50 return keyframeStyle->animations()->animation(i)->timingFunction(); | |
| 51 } | |
| 52 ASSERT_NOT_REACHED(); | |
| 53 return 0; | |
| 54 } | 50 } |
| 55 | 51 |
| 56 KeyframeList::~KeyframeList() | 52 KeyframeList::~KeyframeList() |
| 57 { | 53 { |
| 58 clear(); | 54 clear(); |
| 59 } | 55 } |
| 60 | 56 |
| 61 void KeyframeList::clear() | 57 void KeyframeList::clear() |
| 62 { | 58 { |
| 63 m_keyframes.clear(); | 59 m_keyframes.clear(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 for (HashSet<CSSPropertyID>::const_iterator it = currKeyframe.proper
ties().begin(); it != currKeyframe.properties().end(); ++it) | 93 for (HashSet<CSSPropertyID>::const_iterator it = currKeyframe.proper
ties().begin(); it != currKeyframe.properties().end(); ++it) |
| 98 m_properties.add(*it); | 94 m_properties.add(*it); |
| 99 } | 95 } |
| 100 } else { | 96 } else { |
| 101 for (HashSet<CSSPropertyID>::const_iterator it = keyframe.properties().b
egin(); it != keyframe.properties().end(); ++it) | 97 for (HashSet<CSSPropertyID>::const_iterator it = keyframe.properties().b
egin(); it != keyframe.properties().end(); ++it) |
| 102 m_properties.add(*it); | 98 m_properties.add(*it); |
| 103 } | 99 } |
| 104 } | 100 } |
| 105 | 101 |
| 106 } // namespace WebCore | 102 } // namespace WebCore |
| OLD | NEW |