| OLD | NEW |
| 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, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2012. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2012. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 { | 200 { |
| 201 clear(); | 201 clear(); |
| 202 | 202 |
| 203 const CharType* start = ptr; | 203 const CharType* start = ptr; |
| 204 bool delimParsed = false; | 204 bool delimParsed = false; |
| 205 while (skipOptionalSVGSpaces(ptr, end)) { | 205 while (skipOptionalSVGSpaces(ptr, end)) { |
| 206 delimParsed = false; | 206 delimParsed = false; |
| 207 | 207 |
| 208 SVGTransformType transformType = parseAndSkipTransformType(ptr, end); | 208 SVGTransformType transformType = parseAndSkipTransformType(ptr, end); |
| 209 if (transformType == SVG_TRANSFORM_UNKNOWN) | 209 if (transformType == SVG_TRANSFORM_UNKNOWN) |
| 210 return SVGParsingError(SVGParseStatus::ParsingFailed, ptr - start); | 210 return SVGParsingError(SVGParseStatus::ExpectedTransformFunction, pt
r - start); |
| 211 | 211 |
| 212 if (!skipOptionalSVGSpaces(ptr, end) || *ptr != '(') | 212 if (!skipOptionalSVGSpaces(ptr, end) || *ptr != '(') |
| 213 return SVGParsingError(SVGParseStatus::ParsingFailed, ptr - start); | 213 return SVGParsingError(SVGParseStatus::ExpectedStartOfArguments, ptr
- start); |
| 214 ptr++; | 214 ptr++; |
| 215 | 215 |
| 216 TransformArguments arguments; | 216 TransformArguments arguments; |
| 217 SVGParseStatus status = parseTransformArgumentsForType(transformType, pt
r, end, arguments); | 217 SVGParseStatus status = parseTransformArgumentsForType(transformType, pt
r, end, arguments); |
| 218 if (status != SVGParseStatus::NoError) | 218 if (status != SVGParseStatus::NoError) |
| 219 return SVGParsingError(status, ptr - start); | 219 return SVGParsingError(status, ptr - start); |
| 220 ASSERT(arguments.size() >= requiredValuesForType[transformType]); | 220 ASSERT(arguments.size() >= requiredValuesForType[transformType]); |
| 221 | 221 |
| 222 if (!skipOptionalSVGSpaces(ptr, end) || *ptr != ')') | 222 if (!skipOptionalSVGSpaces(ptr, end) || *ptr != ')') |
| 223 return SVGParsingError(SVGParseStatus::ExpectedEndOfArguments, ptr -
start); | 223 return SVGParsingError(SVGParseStatus::ExpectedEndOfArguments, ptr -
start); |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 if (at(0)->transformType() == toList->at(0)->transformType()) | 398 if (at(0)->transformType() == toList->at(0)->transformType()) |
| 399 return -1; | 399 return -1; |
| 400 | 400 |
| 401 // Spec: http://www.w3.org/TR/SVG/animate.html#complexDistances | 401 // Spec: http://www.w3.org/TR/SVG/animate.html#complexDistances |
| 402 // Paced animations assume a notion of distance between the various animatio
n values defined by the 'to', 'from', 'by' and 'values' attributes. | 402 // Paced animations assume a notion of distance between the various animatio
n values defined by the 'to', 'from', 'by' and 'values' attributes. |
| 403 // Distance is defined only for scalar types (such as <length>), colors and
the subset of transformation types that are supported by 'animateTransform'. | 403 // Distance is defined only for scalar types (such as <length>), colors and
the subset of transformation types that are supported by 'animateTransform'. |
| 404 return SVGTransformDistance(at(0), toList->at(0)).distance(); | 404 return SVGTransformDistance(at(0), toList->at(0)).distance(); |
| 405 } | 405 } |
| 406 | 406 |
| 407 } // namespace blink | 407 } // namespace blink |
| OLD | NEW |