OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2005 Frerich Raabe <raabe@kde.org> | 2 * Copyright 2005 Frerich Raabe <raabe@kde.org> |
3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 { | 46 { |
47 visitor->trace(m_data); | 47 visitor->trace(m_data); |
48 } | 48 } |
49 | 49 |
50 const NodeSet& Value::toNodeSet(EvaluationContext* context) const | 50 const NodeSet& Value::toNodeSet(EvaluationContext* context) const |
51 { | 51 { |
52 if (!isNodeSet() && context) | 52 if (!isNodeSet() && context) |
53 context->hadTypeConversionError = true; | 53 context->hadTypeConversionError = true; |
54 | 54 |
55 if (!m_data) { | 55 if (!m_data) { |
56 DEFINE_STATIC_LOCAL(Persistent<NodeSet>, emptyNodeSet, (NodeSet::create(
))); | 56 DEFINE_STATIC_LOCAL(NodeSet, emptyNodeSet, (NodeSet::create())); |
57 return *emptyNodeSet; | 57 return emptyNodeSet; |
58 } | 58 } |
59 | 59 |
60 return m_data->nodeSet(); | 60 return m_data->nodeSet(); |
61 } | 61 } |
62 | 62 |
63 NodeSet& Value::modifiableNodeSet(EvaluationContext& context) | 63 NodeSet& Value::modifiableNodeSet(EvaluationContext& context) |
64 { | 64 { |
65 if (!isNodeSet()) | 65 if (!isNodeSet()) |
66 context.hadTypeConversionError = true; | 66 context.hadTypeConversionError = true; |
67 | 67 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 return String::number(m_number); | 139 return String::number(m_number); |
140 case BooleanValue: | 140 case BooleanValue: |
141 return m_bool ? "true" : "false"; | 141 return m_bool ? "true" : "false"; |
142 } | 142 } |
143 ASSERT_NOT_REACHED(); | 143 ASSERT_NOT_REACHED(); |
144 return String(); | 144 return String(); |
145 } | 145 } |
146 | 146 |
147 } // namespace XPath | 147 } // namespace XPath |
148 } // namespace blink | 148 } // namespace blink |
OLD | NEW |