| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1235 return ensureRareData().ensureNodeLists().addCacheWithAtomicName<RadioNodeLi
st>(this, RadioNodeListType, name); | 1235 return ensureRareData().ensureNodeLists().addCacheWithAtomicName<RadioNodeLi
st>(this, RadioNodeListType, name); |
| 1236 } | 1236 } |
| 1237 | 1237 |
| 1238 PassRefPtr<Element> Node::querySelector(const AtomicString& selectors, Exception
State& es) | 1238 PassRefPtr<Element> Node::querySelector(const AtomicString& selectors, Exception
State& es) |
| 1239 { | 1239 { |
| 1240 if (selectors.isEmpty()) { | 1240 if (selectors.isEmpty()) { |
| 1241 es.throwDOMException(SyntaxError, ExceptionMessages::failedToExecute("qu
erySelector", "Node", "The provided selector is empty.")); | 1241 es.throwDOMException(SyntaxError, ExceptionMessages::failedToExecute("qu
erySelector", "Node", "The provided selector is empty.")); |
| 1242 return 0; | 1242 return 0; |
| 1243 } | 1243 } |
| 1244 | 1244 |
| 1245 SelectorQuery* selectorQuery = document().selectorQueryCache()->add(selector
s, document(), es); | 1245 SelectorQuery* selectorQuery = document().selectorQueryCache().add(selectors
, document(), es); |
| 1246 if (!selectorQuery) | 1246 if (!selectorQuery) |
| 1247 return 0; | 1247 return 0; |
| 1248 return selectorQuery->queryFirst(this); | 1248 return selectorQuery->queryFirst(this); |
| 1249 } | 1249 } |
| 1250 | 1250 |
| 1251 PassRefPtr<NodeList> Node::querySelectorAll(const AtomicString& selectors, Excep
tionState& es) | 1251 PassRefPtr<NodeList> Node::querySelectorAll(const AtomicString& selectors, Excep
tionState& es) |
| 1252 { | 1252 { |
| 1253 if (selectors.isEmpty()) { | 1253 if (selectors.isEmpty()) { |
| 1254 es.throwDOMException(SyntaxError, ExceptionMessages::failedToExecute("qu
erySelectorAll", "Node", "The provided selector is empty.")); | 1254 es.throwDOMException(SyntaxError, ExceptionMessages::failedToExecute("qu
erySelectorAll", "Node", "The provided selector is empty.")); |
| 1255 return 0; | 1255 return 0; |
| 1256 } | 1256 } |
| 1257 | 1257 |
| 1258 SelectorQuery* selectorQuery = document().selectorQueryCache()->add(selector
s, document(), es); | 1258 SelectorQuery* selectorQuery = document().selectorQueryCache().add(selectors
, document(), es); |
| 1259 if (!selectorQuery) | 1259 if (!selectorQuery) |
| 1260 return 0; | 1260 return 0; |
| 1261 return selectorQuery->queryAll(this); | 1261 return selectorQuery->queryAll(this); |
| 1262 } | 1262 } |
| 1263 | 1263 |
| 1264 Document* Node::ownerDocument() const | 1264 Document* Node::ownerDocument() const |
| 1265 { | 1265 { |
| 1266 Document* doc = &document(); | 1266 Document* doc = &document(); |
| 1267 return doc == this ? 0 : doc; | 1267 return doc == this ? 0 : doc; |
| 1268 } | 1268 } |
| (...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2626 node->showTreeForThis(); | 2626 node->showTreeForThis(); |
| 2627 } | 2627 } |
| 2628 | 2628 |
| 2629 void showNodePath(const WebCore::Node* node) | 2629 void showNodePath(const WebCore::Node* node) |
| 2630 { | 2630 { |
| 2631 if (node) | 2631 if (node) |
| 2632 node->showNodePathForThis(); | 2632 node->showNodePathForThis(); |
| 2633 } | 2633 } |
| 2634 | 2634 |
| 2635 #endif | 2635 #endif |
| OLD | NEW |