RESOLVED FIXED 225580
Remove all remaining uses of the String::toInt family of functions
https://bugs.webkit.org/show_bug.cgi?id=225580
Summary Remove all remaining uses of the String::toInt family of functions
Darin Adler
Reported 2021-05-09 12:57:18 PDT
Remove all remaining uses of the String::toInt family of functions
Attachments
Patch (92.10 KB, patch)
2021-05-09 14:07 PDT, Darin Adler
ews-feeder: commit-queue-
Patch (92.21 KB, patch)
2021-05-09 14:27 PDT, Darin Adler
ews-feeder: commit-queue-
Patch (92.21 KB, patch)
2021-05-09 14:37 PDT, Darin Adler
ews-feeder: commit-queue-
Patch (92.21 KB, patch)
2021-05-09 15:02 PDT, Darin Adler
ews-feeder: commit-queue-
Patch (92.22 KB, patch)
2021-05-09 15:43 PDT, Darin Adler
no flags
Patch (92.23 KB, patch)
2021-05-09 16:26 PDT, Darin Adler
sam: review+
Darin Adler
Comment 1 2021-05-09 14:07:58 PDT Comment hidden (obsolete)
Darin Adler
Comment 2 2021-05-09 14:08:57 PDT
Patch got a little bigger because I revisited HTML attributes and made them use parseHTMLInteger instead of parseInteger<>.
Radar WebKit Bug Importer
Comment 3 2021-05-09 14:27:17 PDT
Darin Adler
Comment 4 2021-05-09 14:27:25 PDT Comment hidden (obsolete)
Darin Adler
Comment 5 2021-05-09 14:37:48 PDT Comment hidden (obsolete)
Darin Adler
Comment 6 2021-05-09 15:02:45 PDT Comment hidden (obsolete)
Darin Adler
Comment 7 2021-05-09 15:43:43 PDT Comment hidden (obsolete)
Darin Adler
Comment 8 2021-05-09 16:26:56 PDT
Darin Adler
Comment 9 2021-05-09 18:23:47 PDT
Comment on attachment 428143 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428143&action=review > Source/WebCore/editing/cocoa/DataDetection.mm:210 > + if (++indexIterator != resultIndices.end()) { Oops this should just be a while loop; I will fix that.
Darin Adler
Comment 10 2021-05-09 18:23:50 PDT Comment hidden (obsolete)
Sam Weinig
Comment 11 2021-05-10 08:53:07 PDT
Comment on attachment 428143 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428143&action=review > Source/WebCore/html/HTMLLIElement.cpp:122 > + Optional<int> explicitValue; > + if (auto parsedValue = parseHTMLInteger(value)) > + explicitValue = *parsedValue; If we have this pattern more (convert Expected<T, *> to Optional<T> we should consider adding a makeOptional() or convertToOptional() that takes an Expected.
Darin Adler
Comment 12 2021-05-10 09:14:45 PDT
Comment on attachment 428143 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428143&action=review >> Source/WebCore/html/HTMLLIElement.cpp:122 >> + explicitValue = *parsedValue; > > If we have this pattern more (convert Expected<T, *> to Optional<T> we should consider adding a makeOptional() or convertToOptional() that takes an Expected. Or maybe that should be an implicit conversion defined in the Expected class template.
Darin Adler
Comment 13 2021-05-10 09:57:14 PDT
Note You need to log in before you can comment on or make changes to this bug.