| 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 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 | 931 |
| 932 Node* ContainerNode::traverseToChildAt(unsigned index) const | 932 Node* ContainerNode::traverseToChildAt(unsigned index) const |
| 933 { | 933 { |
| 934 unsigned i; | 934 unsigned i; |
| 935 Node *n = firstChild(); | 935 Node *n = firstChild(); |
| 936 for (i = 0; n != 0 && i < index; i++) | 936 for (i = 0; n != 0 && i < index; i++) |
| 937 n = n->nextSibling(); | 937 n = n->nextSibling(); |
| 938 return n; | 938 return n; |
| 939 } | 939 } |
| 940 | 940 |
| 941 PassRefPtr<Element> ContainerNode::querySelector(const AtomicString& selectors,
ExceptionState& exceptionState) | 941 PassRefPtrWillBeRawPtr<Element> ContainerNode::querySelector(const AtomicString&
selectors, ExceptionState& exceptionState) |
| 942 { | 942 { |
| 943 if (selectors.isEmpty()) { | 943 if (selectors.isEmpty()) { |
| 944 exceptionState.throwDOMException(SyntaxError, "The provided selector is
empty."); | 944 exceptionState.throwDOMException(SyntaxError, "The provided selector is
empty."); |
| 945 return nullptr; | 945 return nullptr; |
| 946 } | 946 } |
| 947 | 947 |
| 948 SelectorQuery* selectorQuery = document().selectorQueryCache().add(selectors
, document(), exceptionState); | 948 SelectorQuery* selectorQuery = document().selectorQueryCache().add(selectors
, document(), exceptionState); |
| 949 if (!selectorQuery) | 949 if (!selectorQuery) |
| 950 return nullptr; | 950 return nullptr; |
| 951 return selectorQuery->queryFirst(*this); | 951 return selectorQuery->queryFirst(*this); |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 return true; | 1218 return true; |
| 1219 | 1219 |
| 1220 if (node->isElementNode() && toElement(node)->shadow()) | 1220 if (node->isElementNode() && toElement(node)->shadow()) |
| 1221 return true; | 1221 return true; |
| 1222 | 1222 |
| 1223 return false; | 1223 return false; |
| 1224 } | 1224 } |
| 1225 #endif | 1225 #endif |
| 1226 | 1226 |
| 1227 } // namespace WebCore | 1227 } // namespace WebCore |
| OLD | NEW |