OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) |
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 bool bubbles() const { return m_canBubble; } | 105 bool bubbles() const { return m_canBubble; } |
106 bool cancelable() const { return m_cancelable; } | 106 bool cancelable() const { return m_cancelable; } |
107 DOMTimeStamp timeStamp() const { return m_createTime; } | 107 DOMTimeStamp timeStamp() const { return m_createTime; } |
108 | 108 |
109 void stopPropagation() { m_propagationStopped = true; } | 109 void stopPropagation() { m_propagationStopped = true; } |
110 void stopImmediatePropagation() { m_immediatePropagationStopped = true; } | 110 void stopImmediatePropagation() { m_immediatePropagationStopped = true; } |
111 | 111 |
112 // IE Extensions | 112 // IE Extensions |
113 EventTarget* srcElement() const { return target(); } // MSIE extension - "th
e object that fired the event" | 113 EventTarget* srcElement() const { return target(); } // MSIE extension - "th
e object that fired the event" |
114 | 114 |
115 bool returnValue() const { return !defaultPrevented(); } | |
116 void setReturnValue(bool returnValue) { setDefaultPrevented(!returnValue); } | |
117 | |
118 Clipboard* clipboardData() const { return isClipboardEvent() ? clipboard() :
0; } | 115 Clipboard* clipboardData() const { return isClipboardEvent() ? clipboard() :
0; } |
119 | 116 |
120 virtual const AtomicString& interfaceName() const; | 117 virtual const AtomicString& interfaceName() const; |
121 bool hasInterface(const AtomicString&) const; | 118 bool hasInterface(const AtomicString&) const; |
122 | 119 |
123 // These events are general classes of events. | 120 // These events are general classes of events. |
124 virtual bool isUIEvent() const; | 121 virtual bool isUIEvent() const; |
125 virtual bool isMouseEvent() const; | 122 virtual bool isMouseEvent() const; |
126 virtual bool isFocusEvent() const; | 123 virtual bool isFocusEvent() const; |
127 virtual bool isKeyboardEvent() const; | 124 virtual bool isKeyboardEvent() const; |
(...skipping 22 matching lines...) Expand all Loading... |
150 | 147 |
151 bool cancelBubble() const { return m_cancelBubble; } | 148 bool cancelBubble() const { return m_cancelBubble; } |
152 void setCancelBubble(bool cancel) { m_cancelBubble = cancel; } | 149 void setCancelBubble(bool cancel) { m_cancelBubble = cancel; } |
153 | 150 |
154 Event* underlyingEvent() const { return m_underlyingEvent.get(); } | 151 Event* underlyingEvent() const { return m_underlyingEvent.get(); } |
155 void setUnderlyingEvent(PassRefPtr<Event>); | 152 void setUnderlyingEvent(PassRefPtr<Event>); |
156 | 153 |
157 EventPath& eventPath() { return m_eventPath; } | 154 EventPath& eventPath() { return m_eventPath; } |
158 PassRefPtr<NodeList> path() const; | 155 PassRefPtr<NodeList> path() const; |
159 | 156 |
160 virtual bool storesResultAsString() const; | |
161 virtual void storeResult(const String&); | |
162 | |
163 virtual Clipboard* clipboard() const { return 0; } | 157 virtual Clipboard* clipboard() const { return 0; } |
164 | 158 |
165 bool isBeingDispatched() const { return eventPhase(); } | 159 bool isBeingDispatched() const { return eventPhase(); } |
166 | 160 |
167 protected: | 161 protected: |
168 Event(); | 162 Event(); |
169 Event(const AtomicString& type, bool canBubble, bool cancelable); | 163 Event(const AtomicString& type, bool canBubble, bool cancelable); |
170 Event(const AtomicString& type, const EventInit&); | 164 Event(const AtomicString& type, const EventInit&); |
171 | 165 |
172 virtual void receivedTarget(); | 166 virtual void receivedTarget(); |
(...skipping 14 matching lines...) Expand all Loading... |
187 EventTarget* m_currentTarget; | 181 EventTarget* m_currentTarget; |
188 RefPtr<EventTarget> m_target; | 182 RefPtr<EventTarget> m_target; |
189 DOMTimeStamp m_createTime; | 183 DOMTimeStamp m_createTime; |
190 RefPtr<Event> m_underlyingEvent; | 184 RefPtr<Event> m_underlyingEvent; |
191 EventPath m_eventPath; | 185 EventPath m_eventPath; |
192 }; | 186 }; |
193 | 187 |
194 } // namespace WebCore | 188 } // namespace WebCore |
195 | 189 |
196 #endif // Event_h | 190 #endif // Event_h |
OLD | NEW |