X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=WebCore%2Fsvg%2FSVGStringList.cpp;h=3eb392ae661194c85828580471cab30f4cfc12aa;hb=28040489d744e0c5d475a88663056c9040ed5320;hp=9f4809f2135a9bbea57c5e082a27b6b84e9ed7a3;hpb=eff9be92c41913c92fb1d3b7983c071f3e718678;p=android-x86%2Fexternal-webkit.git diff --git a/WebCore/svg/SVGStringList.cpp b/WebCore/svg/SVGStringList.cpp index 9f4809f21..3eb392ae6 100644 --- a/WebCore/svg/SVGStringList.cpp +++ b/WebCore/svg/SVGStringList.cpp @@ -23,29 +23,31 @@ #if ENABLE(SVG) #include "SVGStringList.h" +#include "SVGElement.h" #include "SVGParserUtilities.h" namespace WebCore { -SVGStringList::SVGStringList(const QualifiedName& attributeName) - : SVGList(attributeName) +void SVGStringList::commitChange(SVGElement* contextElement) { + ASSERT(contextElement); + contextElement->invalidateSVGAttributes(); + contextElement->svgAttributeChanged(m_attributeName); } -void SVGStringList::reset(const String& str) +void SVGStringList::reset(const String& string) { - ExceptionCode ec = 0; + parse(string, ' '); - parse(str, ' '); - if (numberOfItems() == 0) - appendItem(String(""), ec); // Create empty string... + // Add empty string, if list is empty. + if (isEmpty()) + append(String("")); } void SVGStringList::parse(const String& data, UChar delimiter) { // TODO : more error checking/reporting - ExceptionCode ec = 0; - clear(ec); + clear(); const UChar* ptr = data.characters(); const UChar* end = ptr + data.length(); @@ -55,7 +57,7 @@ void SVGStringList::parse(const String& data, UChar delimiter) ptr++; if (ptr == start) break; - appendItem(String(start, ptr - start), ec); + append(String(start, ptr - start)); skipOptionalSpacesOrDelimiter(ptr, end, delimiter); } }