WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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-
Details
Formatted Diff
Diff
Patch
(92.21 KB, patch)
2021-05-09 14:27 PDT
,
Darin Adler
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(92.21 KB, patch)
2021-05-09 14:37 PDT
,
Darin Adler
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(92.21 KB, patch)
2021-05-09 15:02 PDT
,
Darin Adler
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(92.22 KB, patch)
2021-05-09 15:43 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(92.23 KB, patch)
2021-05-09 16:26 PDT
,
Darin Adler
sam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2021-05-09 14:07:58 PDT
Comment hidden (obsolete)
Created
attachment 428134
[details]
Patch
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
<
rdar://problem/77719686
>
Darin Adler
Comment 4
2021-05-09 14:27:25 PDT
Comment hidden (obsolete)
Created
attachment 428136
[details]
Patch
Darin Adler
Comment 5
2021-05-09 14:37:48 PDT
Comment hidden (obsolete)
Created
attachment 428139
[details]
Patch
Darin Adler
Comment 6
2021-05-09 15:02:45 PDT
Comment hidden (obsolete)
Created
attachment 428140
[details]
Patch
Darin Adler
Comment 7
2021-05-09 15:43:43 PDT
Comment hidden (obsolete)
Created
attachment 428141
[details]
Patch
Darin Adler
Comment 8
2021-05-09 16:26:56 PDT
Created
attachment 428143
[details]
Patch
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)
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.
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
Committed
r277269
(
237536@main
): <
https://commits.webkit.org/237536@main
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug