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

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

Issue 1007843002: [svg] 'keyTimes' values should allow surrounding whitespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 | « LayoutTests/svg/animations/script-tests/animate-keySplines.js ('k') | no next file » | 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 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
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
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 }
OLDNEW
« no previous file with comments | « LayoutTests/svg/animations/script-tests/animate-keySplines.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698