OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org> | 2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org> |
3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 11 matching lines...) Expand all Loading... |
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 */ | 25 */ |
26 | 26 |
27 #include "config.h" | 27 #include "config.h" |
28 #include "core/xml/XPathResult.h" | 28 #include "core/xml/XPathResult.h" |
29 | 29 |
30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" |
31 #include "core/dom/ExceptionCode.h" | 31 #include "core/dom/ExceptionCode.h" |
32 #include "core/dom/Node.h" | |
33 #include "core/xml/XPathEvaluator.h" | 32 #include "core/xml/XPathEvaluator.h" |
34 #include "core/xml/XPathException.h" | 33 #include "core/xml/XPathException.h" |
35 | 34 |
36 namespace WebCore { | 35 namespace WebCore { |
37 | 36 |
38 using namespace XPath; | 37 using namespace XPath; |
39 | 38 |
40 XPathResult::XPathResult(Document* document, const Value& value) | 39 XPathResult::XPathResult(Document* document, const Value& value) |
41 : m_value(value) | 40 : m_value(value) |
42 , m_nodeSetPosition(0) | 41 , m_nodeSetPosition(0) |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 } | 208 } |
210 | 209 |
211 const NodeSet& nodes = m_value.toNodeSet(); | 210 const NodeSet& nodes = m_value.toNodeSet(); |
212 if (index >= nodes.size()) | 211 if (index >= nodes.size()) |
213 return 0; | 212 return 0; |
214 | 213 |
215 return nodes[index]; | 214 return nodes[index]; |
216 } | 215 } |
217 | 216 |
218 } | 217 } |
OLD | NEW |