OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "config.h" | 21 #include "config.h" |
22 #include "core/svg/SVGStringList.h" | 22 #include "core/svg/SVGStringList.h" |
23 | 23 |
24 #include "core/svg/SVGElement.h" | 24 #include "core/svg/SVGElement.h" |
25 #include "core/svg/SVGParserUtilities.h" | 25 #include "core/svg/SVGParserUtilities.h" |
26 #include "wtf/text/StringBuilder.h" | 26 #include "wtf/text/StringBuilder.h" |
27 | 27 |
28 namespace WebCore { | 28 namespace WebCore { |
29 | 29 |
30 SVGStringList::SVGStringList() | 30 SVGStringList::SVGStringList() |
31 : NewSVGPropertyBase(classType()) | 31 : SVGPropertyBase(classType()) |
32 { | 32 { |
33 } | 33 } |
34 | 34 |
35 SVGStringList::~SVGStringList() | 35 SVGStringList::~SVGStringList() |
36 { | 36 { |
37 } | 37 } |
38 | 38 |
39 void SVGStringList::initialize(const String& item) | 39 void SVGStringList::initialize(const String& item) |
40 { | 40 { |
41 m_values.clear(); | 41 m_values.clear(); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 const LChar* ptr = data.characters8(); | 118 const LChar* ptr = data.characters8(); |
119 const LChar* end = ptr + data.length(); | 119 const LChar* end = ptr + data.length(); |
120 parseInternal(ptr, end); | 120 parseInternal(ptr, end); |
121 } else { | 121 } else { |
122 const UChar* ptr = data.characters16(); | 122 const UChar* ptr = data.characters16(); |
123 const UChar* end = ptr + data.length(); | 123 const UChar* end = ptr + data.length(); |
124 parseInternal(ptr, end); | 124 parseInternal(ptr, end); |
125 } | 125 } |
126 } | 126 } |
127 | 127 |
128 PassRefPtr<NewSVGPropertyBase> SVGStringList::cloneForAnimation(const String& st
ring) const | 128 PassRefPtr<SVGPropertyBase> SVGStringList::cloneForAnimation(const String& strin
g) const |
129 { | 129 { |
130 RefPtr<SVGStringList> svgStringList = create(); | 130 RefPtr<SVGStringList> svgStringList = create(); |
131 svgStringList->setValueAsString(string, IGNORE_EXCEPTION); | 131 svgStringList->setValueAsString(string, IGNORE_EXCEPTION); |
132 return svgStringList.release(); | 132 return svgStringList.release(); |
133 } | 133 } |
134 | 134 |
135 String SVGStringList::valueAsString() const | 135 String SVGStringList::valueAsString() const |
136 { | 136 { |
137 StringBuilder builder; | 137 StringBuilder builder; |
138 | 138 |
(...skipping 15 matching lines...) Expand all Loading... |
154 bool SVGStringList::checkIndexBound(size_t index, ExceptionState& exceptionState
) | 154 bool SVGStringList::checkIndexBound(size_t index, ExceptionState& exceptionState
) |
155 { | 155 { |
156 if (index >= m_values.size()) { | 156 if (index >= m_values.size()) { |
157 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde
xExceedsMaximumBound("index", index, m_values.size())); | 157 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde
xExceedsMaximumBound("index", index, m_values.size())); |
158 return false; | 158 return false; |
159 } | 159 } |
160 | 160 |
161 return true; | 161 return true; |
162 } | 162 } |
163 | 163 |
164 void SVGStringList::add(PassRefPtr<NewSVGPropertyBase> other, SVGElement* contex
tElement) | 164 void SVGStringList::add(PassRefPtr<SVGPropertyBase> other, SVGElement* contextEl
ement) |
165 { | 165 { |
166 // SVGStringList is never animated. | 166 // SVGStringList is never animated. |
167 ASSERT_NOT_REACHED(); | 167 ASSERT_NOT_REACHED(); |
168 } | 168 } |
169 | 169 |
170 void SVGStringList::calculateAnimatedValue(SVGAnimationElement*, float, unsigned
, PassRefPtr<NewSVGPropertyBase>, PassRefPtr<NewSVGPropertyBase>, PassRefPtr<New
SVGPropertyBase>, SVGElement*) | 170 void SVGStringList::calculateAnimatedValue(SVGAnimationElement*, float, unsigned
, PassRefPtr<SVGPropertyBase>, PassRefPtr<SVGPropertyBase>, PassRefPtr<SVGProper
tyBase>, SVGElement*) |
171 { | 171 { |
172 // SVGStringList is never animated. | 172 // SVGStringList is never animated. |
173 ASSERT_NOT_REACHED(); | 173 ASSERT_NOT_REACHED(); |
174 } | 174 } |
175 | 175 |
176 float SVGStringList::calculateDistance(PassRefPtr<NewSVGPropertyBase>, SVGElemen
t*) | 176 float SVGStringList::calculateDistance(PassRefPtr<SVGPropertyBase>, SVGElement*) |
177 { | 177 { |
178 // SVGStringList is never animated. | 178 // SVGStringList is never animated. |
179 ASSERT_NOT_REACHED(); | 179 ASSERT_NOT_REACHED(); |
180 | 180 |
181 return -1.0f; | 181 return -1.0f; |
182 } | 182 } |
183 | 183 |
184 } | 184 } |
OLD | NEW |