| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 using namespace XPath; | 37 using namespace XPath; |
| 38 | 38 |
| 39 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(XPathResult); | 39 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(XPathResult); |
| 40 | 40 |
| 41 XPathResult::XPathResult(EvaluationContext& context, const Value& value) | 41 XPathResult::XPathResult(EvaluationContext& context, const Value& value) |
| 42 : m_value(value) | 42 : m_value(value) |
| 43 , m_nodeSetPosition(0) | 43 , m_nodeSetPosition(0) |
| 44 , m_domTreeVersion(0) | 44 , m_domTreeVersion(0) |
| 45 { | 45 { |
| 46 switch (m_value.type()) { | 46 switch (m_value.getType()) { |
| 47 case Value::BooleanValue: | 47 case Value::BooleanValue: |
| 48 m_resultType = BOOLEAN_TYPE; | 48 m_resultType = BOOLEAN_TYPE; |
| 49 return; | 49 return; |
| 50 case Value::NumberValue: | 50 case Value::NumberValue: |
| 51 m_resultType = NUMBER_TYPE; | 51 m_resultType = NUMBER_TYPE; |
| 52 return; | 52 return; |
| 53 case Value::StringValue: | 53 case Value::StringValue: |
| 54 m_resultType = STRING_TYPE; | 54 m_resultType = STRING_TYPE; |
| 55 return; | 55 return; |
| 56 case Value::NodeSetValue: | 56 case Value::NodeSetValue: |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 } | 212 } |
| 213 | 213 |
| 214 const NodeSet& nodes = m_value.toNodeSet(0); | 214 const NodeSet& nodes = m_value.toNodeSet(0); |
| 215 if (index >= nodes.size()) | 215 if (index >= nodes.size()) |
| 216 return nullptr; | 216 return nullptr; |
| 217 | 217 |
| 218 return nodes[index]; | 218 return nodes[index]; |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace blink | 221 } // namespace blink |
| OLD | NEW |