Chromium Code Reviews| Index: Source/core/dom/Event.h |
| diff --git a/Source/core/dom/Event.h b/Source/core/dom/Event.h |
| index 56dd5f96892cca8d5181c6b3694df0575342cb26..f91e4268e573b3a417e0e103b8e8746968fcbf99 100644 |
| --- a/Source/core/dom/Event.h |
| +++ b/Source/core/dom/Event.h |
| @@ -179,6 +179,8 @@ public: |
| bool isBeingDispatched() const { return eventPhase(); } |
| + virtual int repeat() const { return -1; } |
|
pdr.
2013/09/17 22:40:01
I don't think this is necessary and I'd prefer to
|
| + |
| protected: |
| Event(); |
| Event(const AtomicString& type, bool canBubble, bool cancelable); |
| @@ -206,6 +208,26 @@ private: |
| EventPath m_eventPath; |
| }; |
| +class RepeatEvent : public Event { |
|
pdr.
2013/09/17 22:40:01
Can this be placed in SVGSMILElement?
|
| +public: |
| + static PassRefPtr<RepeatEvent> create(const AtomicString& type, int repeat) |
| + { |
| + return adoptRef(new RepeatEvent(type, false, false, repeat)); |
| + } |
| + |
| + ~RepeatEvent() { } |
| + |
| + int repeat() const { return m_repeat; } |
| +protected: |
| + RepeatEvent(const AtomicString& type, bool canBubble, bool cancelable, int repeat = -1) |
| + : Event(type, canBubble, cancelable) |
| + , m_repeat(repeat) |
| + { |
| + } |
| +private: |
| + int m_repeat; |
| +}; |
| + |
| } // namespace WebCore |
| #endif // Event_h |