| Summary: | Remove all remaining uses of the String::toInt family of functions | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Darin Adler <darin> | ||||||||||||||
| Component: | WebCore Misc. | Assignee: | Darin Adler <darin> | ||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||
| Severity: | Normal | CC: | aboxhall, alecflett, apinheiro, beidson, calvaris, cdumez, cfleizach, cgarcia, changseok, dbarton, dino, dmazzoni, esprehn+autocc, ews-watchlist, fmalita, fred.wang, galpeter, glenn, gustavo, gyuyoung.kim, hi, japhet, jcraig, jdiggs, joepeck, jsbell, macpherson, menard, mifenton, mkwst, pdr, pnormand, sabouhallawa, samuel_white, sam, schenney, sergio, toyoshim, vjaquez, webkit-bug-importer, yutak | ||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||||
| Hardware: | All | ||||||||||||||||
| OS: | All | ||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Darin Adler
2021-05-09 12:57:18 PDT
Created attachment 428134 [details]
Patch
Patch got a little bigger because I revisited HTML attributes and made them use parseHTMLInteger instead of parseInteger<>. Created attachment 428136 [details]
Patch
Created attachment 428139 [details]
Patch
Created attachment 428140 [details]
Patch
Created attachment 428141 [details]
Patch
Created attachment 428143 [details]
Patch
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. 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. 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. 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. Committed r277269 (237536@main): <https://commits.webkit.org/237536@main> |