isASCIISpace is not renamed in some locations |
||
Issue description
isASCIISpace (and IsASCIIAlpha, IsASCIIDigit, etc.) is renamed in some locations but not in others.
Example compile error:
../../third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp:42:22: error: use of undeclared identifier 'isASCIISpace'; did you mean 'IsASCIISpace'?
skipWhile<UChar, isASCIISpace>(position, end);
^~~~~~~~~~~~
IsASCIISpace
../../third_party/WebKit/Source/wtf/ASCIICType.h:175:12: note: 'IsASCIISpace' declared here
using WTF::IsASCIISpace;
^
Example where isASCIISpace got renamed - platform/network/HTTPParsers.cpp:
bool ParseSuboriginHeader(const String& header,
Suborigin* suborigin,
WTF::Vector<String>& messages) {
...
Vector<UChar> characters;
headers[0].AppendTo(characters);
const UChar* position = characters.Data();
const UChar* end = position + characters.Size();
skipWhile<UChar, IsASCIISpace>(position, end);
Example where isASCIISpace did not get renamed - core/frame/csp/MediaListDirective.cpp:
void MediaListDirective::Parse(const UChar* begin, const UChar* end) {
...
while (position < end) {
// _____ OR _____mime1/mime1
// ^ ^
skipWhile<UChar, isASCIISpace>(position, end);
,
Jan 28 2017
FWIW, I think we can just use sed to fixup things after the rename:
find third_party/WebKit/Source -type f \
| xargs grep -l '\bisASCII' \
| xargs -n 1 sed -i -e 's/\bisASCII/IsASCII/g'
git commit -a -m "Renaming isASCII* function templates to IsASCII*"
I've added the above to the step-by-step doc.
,
Feb 1 2017
I've used a bit safer regex for those replacements 's/\<isASCII/\u&/g' which uppercases the first character of the match. It also is easily generalizable for iterating over multiple patterns, which can be generated by a script.
,
Feb 6 2017
This can be quite accurately fixed via "sed" after executing the big rename. I've added appropriate instructions to the step-by-step document. |
||
►
Sign in to add a comment |
||
Comment 1 by lukasza@chromium.org
, Jan 24 2017