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

Side by Side Diff: third_party/WebKit/Source/wtf/text/WTFString.cpp

Issue 1636333003: Implement specced parsing algorithm for <area coords> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/Source/wtf/text/WTFString.h ('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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007-2009 Torch Mobile, Inc. 4 * Copyright (C) 2007-2009 Torch Mobile, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 size_t parsedLength; 1132 size_t parsedLength;
1133 return toDoubleType<LChar, DisallowTrailingJunk>(data, length, ok, parsedLen gth); 1133 return toDoubleType<LChar, DisallowTrailingJunk>(data, length, ok, parsedLen gth);
1134 } 1134 }
1135 1135
1136 double charactersToDouble(const UChar* data, size_t length, bool* ok) 1136 double charactersToDouble(const UChar* data, size_t length, bool* ok)
1137 { 1137 {
1138 size_t parsedLength; 1138 size_t parsedLength;
1139 return toDoubleType<UChar, DisallowTrailingJunk>(data, length, ok, parsedLen gth); 1139 return toDoubleType<UChar, DisallowTrailingJunk>(data, length, ok, parsedLen gth);
1140 } 1140 }
1141 1141
1142 double charactersToDouble(const LChar* data, size_t length, size_t& parsedLength )
1143 {
1144 return toDoubleType<LChar, AllowTrailingJunk>(data, length, nullptr, parsedL ength);
1145 }
1146
1147 double charactersToDouble(const UChar* data, size_t length, size_t& parsedLength )
1148 {
1149 return toDoubleType<UChar, AllowTrailingJunk>(data, length, nullptr, parsedL ength);
1150 }
1151
1142 float charactersToFloat(const LChar* data, size_t length, bool* ok) 1152 float charactersToFloat(const LChar* data, size_t length, bool* ok)
1143 { 1153 {
1144 // FIXME: This will return ok even when the string fits into a double but 1154 // FIXME: This will return ok even when the string fits into a double but
1145 // not a float. 1155 // not a float.
1146 size_t parsedLength; 1156 size_t parsedLength;
1147 return static_cast<float>(toDoubleType<LChar, DisallowTrailingJunk>(data, le ngth, ok, parsedLength)); 1157 return static_cast<float>(toDoubleType<LChar, DisallowTrailingJunk>(data, le ngth, ok, parsedLength));
1148 } 1158 }
1149 1159
1150 float charactersToFloat(const UChar* data, size_t length, bool* ok) 1160 float charactersToFloat(const UChar* data, size_t length, bool* ok)
1151 { 1161 {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 buffer.append('\0'); 1231 buffer.append('\0');
1222 return buffer; 1232 return buffer;
1223 } 1233 }
1224 1234
1225 Vector<char> asciiDebug(String& string) 1235 Vector<char> asciiDebug(String& string)
1226 { 1236 {
1227 return asciiDebug(string.impl()); 1237 return asciiDebug(string.impl());
1228 } 1238 }
1229 1239
1230 #endif 1240 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/WTFString.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698