| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 // This represents conditions on elements begin or end list that need to be
resolved on runtime | 156 // This represents conditions on elements begin or end list that need to be
resolved on runtime |
| 157 // for example <animate begin="otherElement.begin + 8s; button.click" ... /> | 157 // for example <animate begin="otherElement.begin + 8s; button.click" ... /> |
| 158 struct Condition { | 158 struct Condition { |
| 159 enum Type { | 159 enum Type { |
| 160 EventBase, | 160 EventBase, |
| 161 Syncbase, | 161 Syncbase, |
| 162 AccessKey | 162 AccessKey |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 Condition(Type, BeginOrEnd, const String& baseID, const String& name, SM
ILTime offset, int repeats = -1); | 165 Condition(Type, BeginOrEnd, const String& baseID, const String& name, SM
ILTime offset); |
| 166 Type m_type; | 166 Type m_type; |
| 167 BeginOrEnd m_beginOrEnd; | 167 BeginOrEnd m_beginOrEnd; |
| 168 String m_baseID; | 168 String m_baseID; |
| 169 String m_name; | 169 String m_name; |
| 170 SMILTime m_offset; | 170 SMILTime m_offset; |
| 171 int m_repeats; | |
| 172 RefPtr<Element> m_syncbase; | 171 RefPtr<Element> m_syncbase; |
| 173 RefPtr<ConditionEventListener> m_eventListener; | 172 RefPtr<ConditionEventListener> m_eventListener; |
| 174 }; | 173 }; |
| 175 bool parseCondition(const String&, BeginOrEnd beginOrEnd); | 174 bool parseCondition(const String&, BeginOrEnd beginOrEnd); |
| 176 void parseBeginOrEnd(const String&, BeginOrEnd beginOrEnd); | 175 void parseBeginOrEnd(const String&, BeginOrEnd beginOrEnd); |
| 177 Element* eventBaseFor(const Condition&); | 176 Element* eventBaseFor(const Condition&); |
| 178 | 177 |
| 179 void disconnectConditions(); | 178 void disconnectConditions(); |
| 180 | 179 |
| 181 // Event base timing | 180 // Event base timing |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 226 |
| 228 ActiveState m_activeState; | 227 ActiveState m_activeState; |
| 229 float m_lastPercent; | 228 float m_lastPercent; |
| 230 unsigned m_lastRepeat; | 229 unsigned m_lastRepeat; |
| 231 | 230 |
| 232 SMILTime m_nextProgressTime; | 231 SMILTime m_nextProgressTime; |
| 233 | 232 |
| 234 RefPtr<SMILTimeContainer> m_timeContainer; | 233 RefPtr<SMILTimeContainer> m_timeContainer; |
| 235 unsigned m_documentOrderIndex; | 234 unsigned m_documentOrderIndex; |
| 236 | 235 |
| 236 Vector<unsigned> m_repeatEventCountList; |
| 237 |
| 237 mutable SMILTime m_cachedDur; | 238 mutable SMILTime m_cachedDur; |
| 238 mutable SMILTime m_cachedRepeatDur; | 239 mutable SMILTime m_cachedRepeatDur; |
| 239 mutable SMILTime m_cachedRepeatCount; | 240 mutable SMILTime m_cachedRepeatCount; |
| 240 mutable SMILTime m_cachedMin; | 241 mutable SMILTime m_cachedMin; |
| 241 mutable SMILTime m_cachedMax; | 242 mutable SMILTime m_cachedMax; |
| 242 | 243 |
| 243 friend class ConditionEventListener; | 244 friend class ConditionEventListener; |
| 244 }; | 245 }; |
| 245 | 246 |
| 246 inline SVGSMILElement* toSVGSMILElement(Element* element) | 247 inline SVGSMILElement* toSVGSMILElement(Element* element) |
| 247 { | 248 { |
| 248 ASSERT_WITH_SECURITY_IMPLICATION(!element || SVGSMILElement::isSMILElement(e
lement)); | 249 ASSERT_WITH_SECURITY_IMPLICATION(!element || SVGSMILElement::isSMILElement(e
lement)); |
| 249 return static_cast<SVGSMILElement*>(element); | 250 return static_cast<SVGSMILElement*>(element); |
| 250 } | 251 } |
| 251 | 252 |
| 252 } | 253 } |
| 253 | 254 |
| 254 #endif // SVGSMILElement_h | 255 #endif // SVGSMILElement_h |
| OLD | NEW |