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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "WebNode.h" | 32 #include "WebNode.h" |
33 | 33 |
34 #include "EventListenerWrapper.h" | 34 #include "EventListenerWrapper.h" |
35 #include "FrameLoaderClientImpl.h" | 35 #include "FrameLoaderClientImpl.h" |
36 #include "WebDOMEvent.h" | 36 #include "WebDOMEvent.h" |
37 #include "WebDOMEventListener.h" | 37 #include "WebDOMEventListener.h" |
38 #include "WebDocument.h" | 38 #include "WebDocument.h" |
39 #include "WebElement.h" | 39 #include "WebElement.h" |
| 40 #include "WebElementCollection.h" |
40 #include "WebFrameImpl.h" | 41 #include "WebFrameImpl.h" |
41 #include "WebNodeCollection.h" | |
42 #include "WebNodeList.h" | 42 #include "WebNodeList.h" |
43 #include "WebPluginContainer.h" | 43 #include "WebPluginContainer.h" |
44 #include "WebPluginContainerImpl.h" | 44 #include "WebPluginContainerImpl.h" |
45 #include "bindings/v8/ExceptionState.h" | 45 #include "bindings/v8/ExceptionState.h" |
46 #include "core/dom/Document.h" | 46 #include "core/dom/Document.h" |
47 #include "core/dom/Element.h" | 47 #include "core/dom/Element.h" |
48 #include "core/dom/Node.h" | 48 #include "core/dom/Node.h" |
49 #include "core/dom/NodeList.h" | 49 #include "core/dom/NodeList.h" |
50 #include "core/editing/markup.h" | 50 #include "core/editing/markup.h" |
51 #include "core/events/Event.h" | 51 #include "core/events/Event.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 if (!event.isNull()) | 185 if (!event.isNull()) |
186 return m_private->dispatchEvent(event); | 186 return m_private->dispatchEvent(event); |
187 return false; | 187 return false; |
188 } | 188 } |
189 | 189 |
190 void WebNode::simulateClick() | 190 void WebNode::simulateClick() |
191 { | 191 { |
192 m_private->dispatchSimulatedClick(0); | 192 m_private->dispatchSimulatedClick(0); |
193 } | 193 } |
194 | 194 |
195 WebNodeCollection WebNode::getElementsByTagName(const WebString& tag) const | 195 WebElementCollection WebNode::getElementsByTagName(const WebString& tag) const |
196 { | 196 { |
197 if (m_private->isContainerNode()) | 197 if (m_private->isContainerNode()) |
198 return WebNodeCollection(toContainerNode(m_private.get())->getElementsBy
TagName(tag)); | 198 return WebElementCollection(toContainerNode(m_private.get())->getElement
sByTagName(tag)); |
199 return WebNodeCollection(); | 199 return WebElementCollection(); |
200 } | 200 } |
201 | 201 |
202 WebElement WebNode::querySelector(const WebString& tag, WebExceptionCode& ec) co
nst | 202 WebElement WebNode::querySelector(const WebString& tag, WebExceptionCode& ec) co
nst |
203 { | 203 { |
204 TrackExceptionState exceptionState; | 204 TrackExceptionState exceptionState; |
205 WebElement element; | 205 WebElement element; |
206 if (m_private->isContainerNode()) | 206 if (m_private->isContainerNode()) |
207 element = toContainerNode(m_private.get())->querySelector(tag, exception
State); | 207 element = toContainerNode(m_private.get())->querySelector(tag, exception
State); |
208 ec = exceptionState.code(); | 208 ec = exceptionState.code(); |
209 return element; | 209 return element; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 m_private = node; | 266 m_private = node; |
267 return *this; | 267 return *this; |
268 } | 268 } |
269 | 269 |
270 WebNode::operator PassRefPtr<Node>() const | 270 WebNode::operator PassRefPtr<Node>() const |
271 { | 271 { |
272 return m_private.get(); | 272 return m_private.get(); |
273 } | 273 } |
274 | 274 |
275 } // namespace blink | 275 } // namespace blink |
OLD | NEW |