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

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

Issue 2807193003: Strip only ASCII spaces from SMIL 'values' attributes (Closed)
Patch Set: Created 3 years, 8 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 | « third_party/WebKit/LayoutTests/svg/animations/animate-values-whitespace.html ('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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 result.Clear(); 52 result.Clear();
53 Vector<String> parse_list; 53 Vector<String> parse_list;
54 value.Split(';', true, parse_list); 54 value.Split(';', true, parse_list);
55 unsigned last = parse_list.size() - 1; 55 unsigned last = parse_list.size() - 1;
56 for (unsigned i = 0; i <= last; ++i) { 56 for (unsigned i = 0; i <= last; ++i) {
57 if (parse_list[i].IsEmpty()) { 57 if (parse_list[i].IsEmpty()) {
58 // Tolerate trailing ';' 58 // Tolerate trailing ';'
59 if (i < last) 59 if (i < last)
60 goto fail; 60 goto fail;
61 } else { 61 } else {
62 parse_list[i] = parse_list[i].StripWhiteSpace(); 62 parse_list[i] = parse_list[i].StripWhiteSpace(IsHTMLSpace<UChar>);
63 result.push_back(parse_list[i]); 63 result.push_back(parse_list[i]);
64 } 64 }
65 } 65 }
66 66
67 return true; 67 return true;
68 fail: 68 fail:
69 result.Clear(); 69 result.Clear();
70 return false; 70 return false;
71 } 71 }
72 72
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 CalculatePercentForSpline(percent, CalculateKeyTimesIndex(percent)); 618 CalculatePercentForSpline(percent, CalculateKeyTimesIndex(percent));
619 else if (animation_mode == kFromToAnimation || animation_mode == kToAnimation) 619 else if (animation_mode == kFromToAnimation || animation_mode == kToAnimation)
620 effective_percent = CalculatePercentForFromTo(percent); 620 effective_percent = CalculatePercentForFromTo(percent);
621 else 621 else
622 effective_percent = percent; 622 effective_percent = percent;
623 623
624 CalculateAnimatedValue(effective_percent, repeat_count, result_element); 624 CalculateAnimatedValue(effective_percent, repeat_count, result_element);
625 } 625 }
626 626
627 } // namespace blink 627 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/animations/animate-values-whitespace.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698