OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 EventListenerWrapper* listenerWrapper = listener->createEventListenerWrapper
(eventType, useCapture, m_private.get()); | 177 EventListenerWrapper* listenerWrapper = listener->createEventListenerWrapper
(eventType, useCapture, m_private.get()); |
178 // The listenerWrapper is only referenced by the actual Node. Once it goes | 178 // The listenerWrapper is only referenced by the actual Node. Once it goes |
179 // away, the wrapper notifies the WebEventListener so it can clear its | 179 // away, the wrapper notifies the WebEventListener so it can clear its |
180 // pointer to it. | 180 // pointer to it. |
181 m_private->addEventListener(eventType, adoptRef(listenerWrapper), useCapture
); | 181 m_private->addEventListener(eventType, adoptRef(listenerWrapper), useCapture
); |
182 } | 182 } |
183 | 183 |
184 bool WebNode::dispatchEvent(const WebDOMEvent& event) | 184 bool WebNode::dispatchEvent(const WebDOMEvent& event) |
185 { | 185 { |
186 if (!event.isNull()) | 186 if (!event.isNull()) |
187 return m_private->dispatchEvent(event); | 187 return m_private->dispatchEvent(event.getValue()); |
188 return false; | 188 return false; |
189 } | 189 } |
190 | 190 |
191 void WebNode::simulateClick() | 191 void WebNode::simulateClick() |
192 { | 192 { |
193 m_private->dispatchSimulatedClick(0); | 193 m_private->dispatchSimulatedClick(0); |
194 } | 194 } |
195 | 195 |
196 WebElementCollection WebNode::getElementsByTagName(const WebString& tag) const | 196 WebElementCollection WebNode::getElementsByTagName(const WebString& tag) const |
197 { | 197 { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 m_private = node; | 267 m_private = node; |
268 return *this; | 268 return *this; |
269 } | 269 } |
270 | 270 |
271 WebNode::operator PassRefPtr<Node>() const | 271 WebNode::operator PassRefPtr<Node>() const |
272 { | 272 { |
273 return m_private.get(); | 273 return m_private.get(); |
274 } | 274 } |
275 | 275 |
276 } // namespace blink | 276 } // namespace blink |
OLD | NEW |