Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(620)

Side by Side Diff: Source/core/svg/SVGLengthList.cpp

Issue 302643004: [SVG2] Allow leading and trailing whitespace in svg attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@relax_todouble_wtf
Patch Set: split tests to combat slow xp trybots Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/svg/SVGLength.cpp ('k') | Source/core/svg/SVGNumber.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 return builder.toString(); 77 return builder.toString();
78 } 78 }
79 79
80 template <typename CharType> 80 template <typename CharType>
81 void SVGLengthList::parseInternal(const CharType*& ptr, const CharType* end, Exc eptionState& exceptionState) 81 void SVGLengthList::parseInternal(const CharType*& ptr, const CharType* end, Exc eptionState& exceptionState)
82 { 82 {
83 clear(); 83 clear();
84 while (ptr < end) { 84 while (ptr < end) {
85 const CharType* start = ptr; 85 const CharType* start = ptr;
86 while (ptr < end && *ptr != ',' && !isSVGSpace(*ptr)) 86 while (ptr < end && *ptr != ',' && !isHTMLSpace<CharType>(*ptr))
87 ptr++; 87 ptr++;
88 if (ptr == start) 88 if (ptr == start)
89 break; 89 break;
90 90
91 RefPtr<SVGLength> length = SVGLength::create(m_mode); 91 RefPtr<SVGLength> length = SVGLength::create(m_mode);
92 String valueString(start, ptr - start); 92 String valueString(start, ptr - start);
93 if (valueString.isEmpty()) 93 if (valueString.isEmpty())
94 return; 94 return;
95 length->setValueAsString(valueString, exceptionState); 95 length->setValueAsString(valueString, exceptionState);
96 if (exceptionState.hadException()) 96 if (exceptionState.hadException())
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 at(i)->setValue(animatedNumber, lengthContext, ASSERT_NO_EXCEPTION); 195 at(i)->setValue(animatedNumber, lengthContext, ASSERT_NO_EXCEPTION);
196 } 196 }
197 } 197 }
198 198
199 float SVGLengthList::calculateDistance(PassRefPtr<SVGPropertyBase> to, SVGElemen t*) 199 float SVGLengthList::calculateDistance(PassRefPtr<SVGPropertyBase> to, SVGElemen t*)
200 { 200 {
201 // FIXME: Distance calculation is not possible for SVGLengthList right now. We need the distance for every single value. 201 // FIXME: Distance calculation is not possible for SVGLengthList right now. We need the distance for every single value.
202 return -1; 202 return -1;
203 } 203 }
204 } 204 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGLength.cpp ('k') | Source/core/svg/SVGNumber.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698