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

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

Issue 2390773004: reflow comments in core/svg/ (Closed)
Patch Set: comments (heh!) Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2010, 2012. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010, 2012. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 SVGPathParser::parsePath(source, builder); 55 SVGPathParser::parsePath(source, builder);
56 return builder.result(); 56 return builder.result();
57 } 57 }
58 58
59 SVGParsingError buildByteStreamFromString(const String& d, 59 SVGParsingError buildByteStreamFromString(const String& d,
60 SVGPathByteStream& result) { 60 SVGPathByteStream& result) {
61 result.clear(); 61 result.clear();
62 if (d.isEmpty()) 62 if (d.isEmpty())
63 return SVGParseStatus::NoError; 63 return SVGParseStatus::NoError;
64 64
65 // The string length is typically a minor overestimate of eventual byte stream size, so it avoids us a lot of reallocs. 65 // The string length is typically a minor overestimate of eventual byte stream
66 // size, so it avoids us a lot of reallocs.
66 result.reserveInitialCapacity(d.length()); 67 result.reserveInitialCapacity(d.length());
67 68
68 SVGPathByteStreamBuilder builder(result); 69 SVGPathByteStreamBuilder builder(result);
69 SVGPathStringSource source(d); 70 SVGPathStringSource source(d);
70 SVGPathParser::parsePath(source, builder); 71 SVGPathParser::parsePath(source, builder);
71 result.shrinkToFit(); 72 result.shrinkToFit();
72 return source.parseError(); 73 return source.parseError();
73 } 74 }
74 75
75 } // namespace blink 76 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathQuery.cpp ('k') | third_party/WebKit/Source/core/svg/SVGPatternElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698