OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 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) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 result.clear(); | 77 result.clear(); |
78 return false; | 78 return false; |
79 } | 79 } |
80 | 80 |
81 static bool parseKeyTimes(const String& string, Vector<float>& result, bool veri
fyOrder) | 81 static bool parseKeyTimes(const String& string, Vector<float>& result, bool veri
fyOrder) |
82 { | 82 { |
83 result.clear(); | 83 result.clear(); |
84 Vector<String> parseList; | 84 Vector<String> parseList; |
85 string.split(';', true, parseList); | 85 string.split(';', true, parseList); |
86 for (unsigned n = 0; n < parseList.size(); ++n) { | 86 for (unsigned n = 0; n < parseList.size(); ++n) { |
87 String timeString = parseList[n]; | 87 String timeString = parseList[n].stripWhiteSpace(); |
88 bool ok; | 88 bool ok; |
89 float time = timeString.toFloat(&ok); | 89 float time = timeString.toFloat(&ok); |
90 if (!ok || time < 0 || time > 1) | 90 if (!ok || time < 0 || time > 1) |
91 goto fail; | 91 goto fail; |
92 if (verifyOrder) { | 92 if (verifyOrder) { |
93 if (!n) { | 93 if (!n) { |
94 if (time) | 94 if (time) |
95 goto fail; | 95 goto fail; |
96 } else if (time < result.last()) | 96 } else if (time < result.last()) |
97 goto fail; | 97 goto fail; |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 if (!hasInvalidCSSAttributeType) | 726 if (!hasInvalidCSSAttributeType) |
727 schedule(); | 727 schedule(); |
728 } | 728 } |
729 | 729 |
730 // Clear values that may depend on the previous target. | 730 // Clear values that may depend on the previous target. |
731 if (targetElement()) | 731 if (targetElement()) |
732 clearAnimatedType(); | 732 clearAnimatedType(); |
733 } | 733 } |
734 | 734 |
735 } | 735 } |
OLD | NEW |