Summary: | Remove more functions that implicitly use composed tree | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Darin Adler <darin> | ||||||
Component: | DOM | Assignee: | Darin Adler <darin> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ajuma, cdumez, changseok, esprehn+autocc, ews-watchlist, glenn, kangil.han, kondapallykalyan, mifenton, pdr, rniwa, sam, webkit-bug-importer, wenson_hsieh | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | 218424 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Darin Adler
2020-11-03 16:21:39 PST
Created attachment 413121 [details]
Patch
Created attachment 413124 [details]
Patch
Comment on attachment 413124 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413124&action=review > Source/WebCore/editing/VisiblePosition.cpp:828 > + auto midpoint = checkedSum<uint64_t>(characterRange.location, characterRange.length / 2); > + if (midpoint.hasOverflowed()) > + return { }; Since these are actual computed sizes of a document already in memory, I don’t see any way we’d actually need checked arithmetic, so this should probably be changed to normal arithmetic. (In reply to Darin Adler from comment #3) > Since these are actual computed sizes of a document already in memory, I > don’t see any way we’d actually need checked arithmetic, so this should > probably be changed to normal arithmetic. Or I can write a separate midpoint function that takes a CharacterRange, and clamps end to the maximum value of uint64_t rather than treating it as an error. Should be safe/practical for our uses. Committed r269442: <https://trac.webkit.org/changeset/269442> *** Bug 217313 has been marked as a duplicate of this bug. *** |