| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 TrackExceptionState exceptionState; | 241 TrackExceptionState exceptionState; |
| 242 WebElement element = toContainerNode(m_private.get())->querySelector(selecto
r, exceptionState); | 242 WebElement element = toContainerNode(m_private.get())->querySelector(selecto
r, exceptionState); |
| 243 ec = exceptionState.code(); | 243 ec = exceptionState.code(); |
| 244 return element; | 244 return element; |
| 245 } | 245 } |
| 246 | 246 |
| 247 WebElement WebNode::querySelector(const WebString& selector) const | 247 WebElement WebNode::querySelector(const WebString& selector) const |
| 248 { | 248 { |
| 249 WebExceptionCode ec = 0; | 249 WebExceptionCode ec = 0; |
| 250 WebElement element = querySelector(selector, ec); | 250 WebElement element = querySelector(selector, ec); |
| 251 ASSERT(!ec); | 251 DCHECK(!ec); |
| 252 return element; | 252 return element; |
| 253 } | 253 } |
| 254 | 254 |
| 255 void WebNode::querySelectorAll(const WebString& selector, WebVector<WebElement>&
results, WebExceptionCode& ec) const | 255 void WebNode::querySelectorAll(const WebString& selector, WebVector<WebElement>&
results, WebExceptionCode& ec) const |
| 256 { | 256 { |
| 257 if (!m_private->isContainerNode()) | 257 if (!m_private->isContainerNode()) |
| 258 return; | 258 return; |
| 259 TrackExceptionState exceptionState; | 259 TrackExceptionState exceptionState; |
| 260 RawPtr<StaticElementList> elements = toContainerNode(m_private.get())->query
SelectorAll(selector, exceptionState); | 260 RawPtr<StaticElementList> elements = toContainerNode(m_private.get())->query
SelectorAll(selector, exceptionState); |
| 261 ec = exceptionState.code(); | 261 ec = exceptionState.code(); |
| 262 if (exceptionState.hadException()) | 262 if (exceptionState.hadException()) |
| 263 return; | 263 return; |
| 264 Vector<WebElement> temp; | 264 Vector<WebElement> temp; |
| 265 temp.reserveCapacity(elements->length()); | 265 temp.reserveCapacity(elements->length()); |
| 266 for (unsigned i = 0; i < elements->length(); ++i) | 266 for (unsigned i = 0; i < elements->length(); ++i) |
| 267 temp.append(WebElement(elements->item(i))); | 267 temp.append(WebElement(elements->item(i))); |
| 268 results.assign(temp); | 268 results.assign(temp); |
| 269 } | 269 } |
| 270 | 270 |
| 271 void WebNode::querySelectorAll(const WebString& selector, WebVector<WebElement>&
results) const | 271 void WebNode::querySelectorAll(const WebString& selector, WebVector<WebElement>&
results) const |
| 272 { | 272 { |
| 273 WebExceptionCode ec = 0; | 273 WebExceptionCode ec = 0; |
| 274 querySelectorAll(selector, results, ec); | 274 querySelectorAll(selector, results, ec); |
| 275 ASSERT(!ec); | 275 DCHECK(!ec); |
| 276 } | 276 } |
| 277 | 277 |
| 278 bool WebNode::focused() const | 278 bool WebNode::focused() const |
| 279 { | 279 { |
| 280 return m_private->focused(); | 280 return m_private->focused(); |
| 281 } | 281 } |
| 282 | 282 |
| 283 WebPluginContainer* WebNode::pluginContainer() const | 283 WebPluginContainer* WebNode::pluginContainer() const |
| 284 { | 284 { |
| 285 if (isNull()) | 285 if (isNull()) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 315 m_private = node; | 315 m_private = node; |
| 316 return *this; | 316 return *this; |
| 317 } | 317 } |
| 318 | 318 |
| 319 WebNode::operator RawPtr<Node>() const | 319 WebNode::operator RawPtr<Node>() const |
| 320 { | 320 { |
| 321 return m_private.get(); | 321 return m_private.get(); |
| 322 } | 322 } |
| 323 | 323 |
| 324 } // namespace blink | 324 } // namespace blink |
| OLD | NEW |