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) | |
haraken
2014/05/08 06:22:37
This can be removed once we make querySelector ret
tkent
2014/05/08 07:39:30
Done.
| |
209 element = toContainerNode(m_private.get())->querySelector(tag, exception State).get(); | |
210 #else | |
208 element = toContainerNode(m_private.get())->querySelector(tag, exception State); | 211 element = toContainerNode(m_private.get())->querySelector(tag, exception State); |
212 #endif | |
213 } | |
209 ec = exceptionState.code(); | 214 ec = exceptionState.code(); |
210 return element; | 215 return element; |
211 } | 216 } |
212 | 217 |
213 WebElement WebNode::rootEditableElement() const | 218 WebElement WebNode::rootEditableElement() const |
214 { | 219 { |
215 return WebElement(m_private->rootEditableElement()); | 220 return WebElement(m_private->rootEditableElement()); |
216 } | 221 } |
217 | 222 |
218 bool WebNode::focused() const | 223 bool WebNode::focused() const |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
250 } | 255 } |
251 | 256 |
252 WebElement WebNode::shadowHost() const | 257 WebElement WebNode::shadowHost() const |
253 { | 258 { |
254 if (isNull()) | 259 if (isNull()) |
255 return WebElement(); | 260 return WebElement(); |
256 const Node* coreNode = constUnwrap<Node>(); | 261 const Node* coreNode = constUnwrap<Node>(); |
257 return WebElement(coreNode->shadowHost()); | 262 return WebElement(coreNode->shadowHost()); |
258 } | 263 } |
259 | 264 |
260 WebNode::WebNode(const PassRefPtr<Node>& node) | 265 WebNode::WebNode(const PassRefPtrWillBeRawPtr<Node>& node) |
261 : m_private(node) | 266 : m_private(node) |
262 { | 267 { |
263 } | 268 } |
264 | 269 |
265 WebNode& WebNode::operator=(const PassRefPtr<Node>& node) | 270 WebNode& WebNode::operator=(const PassRefPtrWillBeRawPtr<Node>& node) |
266 { | 271 { |
267 m_private = node; | 272 m_private = node; |
268 return *this; | 273 return *this; |
269 } | 274 } |
270 | 275 |
271 WebNode::operator PassRefPtr<Node>() const | 276 WebNode::operator PassRefPtrWillBeRawPtr<Node>() const |
272 { | 277 { |
273 return m_private.get(); | 278 return m_private.get(); |
274 } | 279 } |
275 | 280 |
276 } // namespace blink | 281 } // namespace blink |
OLD | NEW |