| Index: third_party/WebKit/Source/core/svg/SVGLengthList.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGLengthList.cpp b/third_party/WebKit/Source/core/svg/SVGLengthList.cpp
|
| index 40f422a5e60412b20afc27c739ccd99b158b2570..206b3a8ab51ad8cdfd92616c3ac2467bdc598a60 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGLengthList.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGLengthList.cpp
|
| @@ -71,7 +71,7 @@ String SVGLengthList::valueAsString() const
|
| template <typename CharType>
|
| SVGParsingError SVGLengthList::parseInternal(const CharType*& ptr, const CharType* end)
|
| {
|
| - clear();
|
| + const CharType* listStart = ptr;
|
| while (ptr < end) {
|
| const CharType* start = ptr;
|
| while (ptr < end && *ptr != ',' && !isHTMLSpace<CharType>(*ptr))
|
| @@ -85,7 +85,7 @@ SVGParsingError SVGLengthList::parseInternal(const CharType*& ptr, const CharTyp
|
| RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create(m_mode);
|
| SVGParsingError lengthParseStatus = length->setValueAsString(valueString);
|
| if (lengthParseStatus != SVGParseStatus::NoError)
|
| - return lengthParseStatus;
|
| + return lengthParseStatus.offsetWith(start - listStart);
|
| append(length);
|
| skipOptionalSVGSpacesOrDelimiter(ptr, end);
|
| }
|
| @@ -94,22 +94,19 @@ SVGParsingError SVGLengthList::parseInternal(const CharType*& ptr, const CharTyp
|
|
|
| SVGParsingError SVGLengthList::setValueAsString(const String& value)
|
| {
|
| - if (value.isEmpty()) {
|
| - clear();
|
| + clear();
|
| +
|
| + if (value.isEmpty())
|
| return SVGParseStatus::NoError;
|
| - }
|
|
|
| - SVGParsingError parseStatus;
|
| if (value.is8Bit()) {
|
| const LChar* ptr = value.characters8();
|
| const LChar* end = ptr + value.length();
|
| - parseStatus = parseInternal(ptr, end);
|
| - } else {
|
| - const UChar* ptr = value.characters16();
|
| - const UChar* end = ptr + value.length();
|
| - parseStatus = parseInternal(ptr, end);
|
| + return parseInternal(ptr, end);
|
| }
|
| - return parseStatus;
|
| + const UChar* ptr = value.characters16();
|
| + const UChar* end = ptr + value.length();
|
| + return parseInternal(ptr, end);
|
| }
|
|
|
| void SVGLengthList::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement* contextElement)
|
|
|