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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 { | 197 { |
198 if (m_private->isContainerNode()) | 198 if (m_private->isContainerNode()) |
199 return WebElementCollection(toContainerNode(m_private.get())->getElement
sByTagName(tag)); | 199 return WebElementCollection(toContainerNode(m_private.get())->getElement
sByTagName(tag)); |
200 return WebElementCollection(); | 200 return WebElementCollection(); |
201 } | 201 } |
202 | 202 |
203 WebElement WebNode::querySelector(const WebString& tag, WebExceptionCode& ec) co
nst | 203 WebElement WebNode::querySelector(const WebString& tag, WebExceptionCode& ec) co
nst |
204 { | 204 { |
205 TrackExceptionState exceptionState; | 205 TrackExceptionState exceptionState; |
206 WebElement element; | 206 WebElement element; |
207 if (m_private->isContainerNode()) { | 207 if (m_private->isContainerNode()) |
208 #if ENABLE(OILPAN) | |
209 // FIXME: ContainerNode::querySelector should return an Element raw | |
210 // pointer. | |
211 element = toContainerNode(m_private.get())->querySelector(tag, exception
State).get(); | |
212 #else | |
213 element = toContainerNode(m_private.get())->querySelector(tag, exception
State); | 208 element = toContainerNode(m_private.get())->querySelector(tag, exception
State); |
214 #endif | |
215 } | |
216 ec = exceptionState.code(); | 209 ec = exceptionState.code(); |
217 return element; | 210 return element; |
218 } | 211 } |
219 | 212 |
220 WebElement WebNode::rootEditableElement() const | 213 WebElement WebNode::rootEditableElement() const |
221 { | 214 { |
222 return WebElement(m_private->rootEditableElement()); | 215 return WebElement(m_private->rootEditableElement()); |
223 } | 216 } |
224 | 217 |
225 bool WebNode::focused() const | 218 bool WebNode::focused() const |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 m_private = node; | 267 m_private = node; |
275 return *this; | 268 return *this; |
276 } | 269 } |
277 | 270 |
278 WebNode::operator PassRefPtrWillBeRawPtr<Node>() const | 271 WebNode::operator PassRefPtrWillBeRawPtr<Node>() const |
279 { | 272 { |
280 return m_private.get(); | 273 return m_private.get(); |
281 } | 274 } |
282 | 275 |
283 } // namespace blink | 276 } // namespace blink |
OLD | NEW |