OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2002, 2003 The Karbon Developers | 2 * Copyright (C) 2002, 2003 The Karbon Developers |
3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> | 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> |
4 * Copyright (C) 2006, 2007 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2006, 2007 Rob Buis <buis@kde.org> |
5 * Copyright (C) 2007, 2009, 2013 Apple Inc. All rights reserved. | 5 * Copyright (C) 2007, 2009, 2013 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 if (string.is8Bit()) { | 256 if (string.is8Bit()) { |
257 const LChar* ptr = string.characters8(); | 257 const LChar* ptr = string.characters8(); |
258 const LChar* end = ptr + string.length(); | 258 const LChar* end = ptr + string.length(); |
259 return genericParseNumberOrPercentage(ptr, end, number); | 259 return genericParseNumberOrPercentage(ptr, end, number); |
260 } | 260 } |
261 const UChar* ptr = string.characters16(); | 261 const UChar* ptr = string.characters16(); |
262 const UChar* end = ptr + string.length(); | 262 const UChar* end = ptr + string.length(); |
263 return genericParseNumberOrPercentage(ptr, end, number); | 263 return genericParseNumberOrPercentage(ptr, end, number); |
264 } | 264 } |
265 | 265 |
| 266 #if ENABLE(SVG_FONTS) |
266 template<typename CharType> | 267 template<typename CharType> |
267 static bool parseGlyphName(const CharType*& ptr, const CharType* end, HashSet<St
ring>& values) | 268 static bool parseGlyphName(const CharType*& ptr, const CharType* end, HashSet<St
ring>& values) |
268 { | 269 { |
269 skipOptionalSVGSpaces(ptr, end); | 270 skipOptionalSVGSpaces(ptr, end); |
270 | 271 |
271 while (ptr < end) { | 272 while (ptr < end) { |
272 // Leading and trailing white space, and white space before and after se
parators, will be ignored. | 273 // Leading and trailing white space, and white space before and after se
parators, will be ignored. |
273 const CharType* inputStart = ptr; | 274 const CharType* inputStart = ptr; |
274 while (ptr < end && *ptr != ',') | 275 while (ptr < end && *ptr != ',') |
275 ++ptr; | 276 ++ptr; |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 return Vector<String>(); | 448 return Vector<String>(); |
448 if (input.is8Bit()) { | 449 if (input.is8Bit()) { |
449 const LChar* ptr = input.characters8(); | 450 const LChar* ptr = input.characters8(); |
450 const LChar* end = ptr + input.length(); | 451 const LChar* end = ptr + input.length(); |
451 return genericParseDelimitedString(ptr, end, seperator); | 452 return genericParseDelimitedString(ptr, end, seperator); |
452 } | 453 } |
453 const UChar* ptr = input.characters16(); | 454 const UChar* ptr = input.characters16(); |
454 const UChar* end = ptr + input.length(); | 455 const UChar* end = ptr + input.length(); |
455 return genericParseDelimitedString(ptr, end, seperator); | 456 return genericParseDelimitedString(ptr, end, seperator); |
456 } | 457 } |
| 458 #endif |
457 | 459 |
458 template <typename CharType> | 460 template <typename CharType> |
459 bool parseFloatPoint(const CharType*& current, const CharType* end, FloatPoint&
point) | 461 bool parseFloatPoint(const CharType*& current, const CharType* end, FloatPoint&
point) |
460 { | 462 { |
461 float x; | 463 float x; |
462 float y; | 464 float y; |
463 if (!parseNumber(current, end, x) | 465 if (!parseNumber(current, end, x) |
464 || !parseNumber(current, end, y)) | 466 || !parseNumber(current, end, y)) |
465 return false; | 467 return false; |
466 point = FloatPoint(x, y); | 468 point = FloatPoint(x, y); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 parseAndSkipTransformType(ptr, end, type); | 565 parseAndSkipTransformType(ptr, end, type); |
564 } else { | 566 } else { |
565 const UChar* ptr = string.characters16(); | 567 const UChar* ptr = string.characters16(); |
566 const UChar* end = ptr + string.length(); | 568 const UChar* end = ptr + string.length(); |
567 parseAndSkipTransformType(ptr, end, type); | 569 parseAndSkipTransformType(ptr, end, type); |
568 } | 570 } |
569 return type; | 571 return type; |
570 } | 572 } |
571 | 573 |
572 } | 574 } |
OLD | NEW |