| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 m_resultType = UNORDERED_NODE_ITERATOR_TYPE; | 58 m_resultType = UNORDERED_NODE_ITERATOR_TYPE; |
| 59 m_nodeSetPosition = 0; | 59 m_nodeSetPosition = 0; |
| 60 m_nodeSet = NodeSet::create(m_value.toNodeSet(&context)); | 60 m_nodeSet = NodeSet::create(m_value.toNodeSet(&context)); |
| 61 m_document = &context.node->document(); | 61 m_document = &context.node->document(); |
| 62 m_domTreeVersion = m_document->domTreeVersion(); | 62 m_domTreeVersion = m_document->domTreeVersion(); |
| 63 return; | 63 return; |
| 64 } | 64 } |
| 65 ASSERT_NOT_REACHED(); | 65 ASSERT_NOT_REACHED(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void XPathResult::trace(Visitor* visitor) | 68 DEFINE_TRACE(XPathResult) |
| 69 { | 69 { |
| 70 visitor->trace(m_value); | 70 visitor->trace(m_value); |
| 71 visitor->trace(m_nodeSet); | 71 visitor->trace(m_nodeSet); |
| 72 visitor->trace(m_document); | 72 visitor->trace(m_document); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void XPathResult::convertTo(unsigned short type, ExceptionState& exceptionState) | 75 void XPathResult::convertTo(unsigned short type, ExceptionState& exceptionState) |
| 76 { | 76 { |
| 77 switch (type) { | 77 switch (type) { |
| 78 case ANY_TYPE: | 78 case ANY_TYPE: |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 } | 213 } |
| 214 | 214 |
| 215 const NodeSet& nodes = m_value.toNodeSet(0); | 215 const NodeSet& nodes = m_value.toNodeSet(0); |
| 216 if (index >= nodes.size()) | 216 if (index >= nodes.size()) |
| 217 return 0; | 217 return 0; |
| 218 | 218 |
| 219 return nodes[index]; | 219 return nodes[index]; |
| 220 } | 220 } |
| 221 | 221 |
| 222 } | 222 } |
| OLD | NEW |