DescriptionExpand TextCheckingParagraph::OffsetTo() into SelectionController::MarkAndReplaceFor()
This patch expands |TextCheckingParagraph::OffsetTo()| into
|SelectionController::MarkAndReplaceFor()| with optimizations, see below,
because it is called once for improving code health.
Since |TextCheckingParagraph| object |paragraph| holds single range
|checking_range|, we can hold
|TextCheckingParagraph::OffsetAsRange().StartPosition()| to
|checking_range.StartPosition()|.
When |caret_position < paragraph_start|, we don't need to consider it, because of
caret is placed before checked range.
This patch is a preparation of patch[1].
[1] http://crrev.com/2912053002: Call TextIterator constructor with proper range
BUG=727537
TEST=n/a; no behavior changes
Review-Url: https://codereview.chromium.org/2909923005
Cr-Commit-Position: refs/heads/master@{#475718}
Committed: https://chromium.googlesource.com/chromium/src/+/9a241f0157e83c8defd3ee25b06232f6688bf86b
Patch Set 1 : 2017-05-30T18:40:32 #Patch Set 2 : 2017-05-30T18:54:14 #
Messages
Total messages: 23 (19 generated)
|