Selection Bounds Out of Range in Text Suggestions Touch Bar |
|||
Issue descriptionIt's possible for TextSuggestionsTouchBarController's -updateTextSelection:range:offset: to receive selection bounds that are out of range.
,
Sep 6
,
Sep 11
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/034357d76db26da2445dfc18960e0e6a1cfebe92 commit 034357d76db26da2445dfc18960e0e6a1cfebe92 Author: spqchan <spqchan@chromium.org> Date: Tue Sep 11 15:16:59 2018 [Mac] Fix Text Suggestions Touch Bar Out of Range Issue It's possible for the TextSuggestionsTouchBarController to receive a selection range that is out of the text bounds. This CL fixes the issue by replacing the range with an empty one if it is out of bounds. This CL also makes sure that gfx::Range::ToNSRange() gets used, since gfx::Range() can potentially be reversed. Bug: 880642 , 872929 Change-Id: I4acc63b80cdf107de2ba340bb277e3e38084ff52 Reviewed-on: https://chromium-review.googlesource.com/1207575 Commit-Queue: Sarah Chan <spqchan@chromium.org> Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#589247}(cherry picked from commit 21d97ebaaa07d93da8d32889c673ffa21f734139) Reviewed-on: https://chromium-review.googlesource.com/1219946 Cr-Commit-Position: refs/branch-heads/3538@{#271} Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811} [modify] https://crrev.com/034357d76db26da2445dfc18960e0e6a1cfebe92/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller.mm [modify] https://crrev.com/034357d76db26da2445dfc18960e0e6a1cfebe92/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller_browsertest.mm |
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Sep 6