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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGAngle.cpp ('k') | Source/core/svg/SVGLocatable.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, 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 return; 239 return;
240 240
241 float convertedNumber = 0; 241 float convertedNumber = 0;
242 SVGLengthType type = LengthTypeUnknown; 242 SVGLengthType type = LengthTypeUnknown;
243 243
244 bool success = string.is8Bit() ? 244 bool success = string.is8Bit() ?
245 parseValueInternal<LChar>(string, convertedNumber, type) : 245 parseValueInternal<LChar>(string, convertedNumber, type) :
246 parseValueInternal<UChar>(string, convertedNumber, type); 246 parseValueInternal<UChar>(string, convertedNumber, type);
247 247
248 if (!success) { 248 if (!success) {
249 ec = SYNTAX_ERR; 249 ec = SyntaxError;
250 return; 250 return;
251 } 251 }
252 252
253 m_unit = storeUnit(extractMode(m_unit), type); 253 m_unit = storeUnit(extractMode(m_unit), type);
254 m_valueInSpecifiedUnits = convertedNumber; 254 m_valueInSpecifiedUnits = convertedNumber;
255 } 255 }
256 256
257 String SVGLength::valueAsString() const 257 String SVGLength::valueAsString() const
258 { 258 {
259 return String::number(m_valueInSpecifiedUnits) + lengthTypeToString(extractT ype(m_unit)); 259 return String::number(m_valueInSpecifiedUnits) + lengthTypeToString(extractT ype(m_unit));
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 s_lengthModeMap.set(SVGNames::startOffsetAttr, LengthModeWidth); 415 s_lengthModeMap.set(SVGNames::startOffsetAttr, LengthModeWidth);
416 } 416 }
417 417
418 if (s_lengthModeMap.contains(attrName)) 418 if (s_lengthModeMap.contains(attrName))
419 return s_lengthModeMap.get(attrName); 419 return s_lengthModeMap.get(attrName);
420 420
421 return LengthModeOther; 421 return LengthModeOther;
422 } 422 }
423 423
424 } 424 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAngle.cpp ('k') | Source/core/svg/SVGLocatable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698