| 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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #ifndef SVGSMILElement_h | 26 #ifndef SVGSMILElement_h |
| 27 #define SVGSMILElement_h | 27 #define SVGSMILElement_h |
| 28 #if ENABLE(SVG) | 28 #if ENABLE(SVG) |
| 29 #include "SMILTime.h" | 29 #include "SMILTime.h" |
| 30 #include "SVGElement.h" | 30 #include "SVGElement.h" |
| 31 | 31 |
| 32 #include <wtf/HashMap.h> | 32 #include <wtf/HashMap.h> |
| 33 | 33 |
| 34 namespace WebCore { | 34 namespace WebCore { |
| 35 | 35 |
| 36 enum ResolveTarget { DoNotResolveNewTarget, ResolveNewTarget }; |
| 37 |
| 36 class ConditionEventListener; | 38 class ConditionEventListener; |
| 37 class SMILTimeContainer; | 39 class SMILTimeContainer; |
| 38 | 40 |
| 39 // This class implements SMIL interval timing model as needed for SVG animation. | 41 // This class implements SMIL interval timing model as needed for SVG animation. |
| 40 class SVGSMILElement : public SVGElement { | 42 class SVGSMILElement : public SVGElement { |
| 41 public: | 43 public: |
| 42 SVGSMILElement(const QualifiedName&, Document*); | 44 SVGSMILElement(const QualifiedName&, Document*); |
| 43 virtual ~SVGSMILElement(); | 45 virtual ~SVGSMILElement(); |
| 44 | 46 |
| 45 static bool isSMILElement(Node*); | 47 static bool isSMILElement(Node*); |
| 46 | 48 |
| 47 bool isSupportedAttribute(const QualifiedName&); | 49 bool isSupportedAttribute(const QualifiedName&); |
| 48 virtual void parseAttribute(const Attribute&) OVERRIDE; | 50 virtual void parseAttribute(const Attribute&) OVERRIDE; |
| 49 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; | 51 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; |
| 50 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 52 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
| 51 virtual void removedFrom(ContainerNode*) OVERRIDE; | 53 virtual void removedFrom(ContainerNode*) OVERRIDE; |
| 52 | 54 |
| 53 virtual bool hasValidAttributeType() = 0; | 55 virtual bool hasValidAttributeType() = 0; |
| 56 virtual bool hasValidAttributeName(); |
| 54 virtual void animationAttributeChanged() = 0; | 57 virtual void animationAttributeChanged() = 0; |
| 55 | 58 |
| 56 SMILTimeContainer* timeContainer() const { return m_timeContainer.get(); } | 59 SMILTimeContainer* timeContainer() const { return m_timeContainer.get(); } |
| 57 | 60 |
| 58 SVGElement* targetElement(); | 61 SVGElement* targetElement(); |
| 59 void resetTargetElement(); | 62 void resetTargetElement(ResolveTarget = ResolveNewTarget); |
| 60 const QualifiedName& attributeName() const { return m_attributeName; } | 63 const QualifiedName& attributeName() const { return m_attributeName; } |
| 61 | 64 |
| 62 void beginByLinkActivation(); | 65 void beginByLinkActivation(); |
| 63 | 66 |
| 64 enum Restart { | 67 enum Restart { |
| 65 RestartAlways, | 68 RestartAlways, |
| 66 RestartWhenNotActive, | 69 RestartWhenNotActive, |
| 67 RestartNever | 70 RestartNever |
| 68 }; | 71 }; |
| 69 | 72 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 134 |
| 132 SMILTime findInstanceTime(BeginOrEnd, SMILTime minimumTime, bool equalsMinim
umOK) const; | 135 SMILTime findInstanceTime(BeginOrEnd, SMILTime minimumTime, bool equalsMinim
umOK) const; |
| 133 void resolveFirstInterval(); | 136 void resolveFirstInterval(); |
| 134 void resolveNextInterval(bool notifyDependents); | 137 void resolveNextInterval(bool notifyDependents); |
| 135 void resolveInterval(bool first, SMILTime& beginResult, SMILTime& endResult)
const; | 138 void resolveInterval(bool first, SMILTime& beginResult, SMILTime& endResult)
const; |
| 136 SMILTime resolveActiveEnd(SMILTime resolvedBegin, SMILTime resolvedEnd) cons
t; | 139 SMILTime resolveActiveEnd(SMILTime resolvedBegin, SMILTime resolvedEnd) cons
t; |
| 137 SMILTime repeatingDuration() const; | 140 SMILTime repeatingDuration() const; |
| 138 void checkRestart(SMILTime elapsed); | 141 void checkRestart(SMILTime elapsed); |
| 139 void beginListChanged(SMILTime eventTime); | 142 void beginListChanged(SMILTime eventTime); |
| 140 void endListChanged(SMILTime eventTime); | 143 void endListChanged(SMILTime eventTime); |
| 141 void reschedule(); | 144 |
| 145 void setAttributeName(const QualifiedName&); |
| 142 | 146 |
| 143 // This represents conditions on elements begin or end list that need to be
resolved on runtime | 147 // This represents conditions on elements begin or end list that need to be
resolved on runtime |
| 144 // for example <animate begin="otherElement.begin + 8s; button.click" ... /> | 148 // for example <animate begin="otherElement.begin + 8s; button.click" ... /> |
| 145 struct Condition { | 149 struct Condition { |
| 146 enum Type { | 150 enum Type { |
| 147 EventBase, | 151 EventBase, |
| 148 Syncbase, | 152 Syncbase, |
| 149 AccessKey | 153 AccessKey |
| 150 }; | 154 }; |
| 151 | 155 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 mutable SMILTime m_cachedMin; | 232 mutable SMILTime m_cachedMin; |
| 229 mutable SMILTime m_cachedMax; | 233 mutable SMILTime m_cachedMax; |
| 230 | 234 |
| 231 friend class ConditionEventListener; | 235 friend class ConditionEventListener; |
| 232 }; | 236 }; |
| 233 | 237 |
| 234 } | 238 } |
| 235 | 239 |
| 236 #endif // ENABLE(SVG) | 240 #endif // ENABLE(SVG) |
| 237 #endif // SVGSMILElement_h | 241 #endif // SVGSMILElement_h |
| OLD | NEW |