RemoteRWHVMac: Mirror TextSelection and CompositionRangeInfo in NSView
Whenever the TextInputManager::TextSelection or the TextInputManager::CompositionRangeInfo properties of the RWHVMac change, forward them to the RWHVCocoa. This is in contrast to the previous behavior where we would do a synchronous IPC back to the RWHVMac to query their value. This is motivated by the attributedSubstringForProposedRange method in RWHVMac, which would be complicated to implement by a synchronous IPC. Remove RWHVCocoa's selectedRange_ member because it is now fully redundant to the cached copy of the selected range. Leave RWHVCocoa's markedRange_ member because it is not always equal to the cached copy of the composition range. While converting attributedSubstringForProposedRange, fix an overflow bug, and remove some roll-your-own NSString<->base::string16 conversions. Rename ClearMarkedText to CancelComposition. Bug: 821651 Change-Id: Ieace82d061f15c510762d37e110c70b10eeb2bde Reviewed-on: https://chromium-review.googlesource.com/1007981 Commit-Queue: ccameron <ccameron@chromium.org> Reviewed-by:Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/master@{#550545}
Showing
Please register or sign in to comment