New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 880642 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 6
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Selection Bounds Out of Range in Text Suggestions Touch Bar

Project Member Reported by spqc...@chromium.org, Sep 5

Issue description

It's possible for TextSuggestionsTouchBarController's -updateTextSelection:range:offset:
to receive selection bounds that are out of range.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/21d97ebaaa07d93da8d32889c673ffa21f734139

commit 21d97ebaaa07d93da8d32889c673ffa21f734139
Author: spqchan <spqchan@chromium.org>
Date: Thu Sep 06 19:45:44 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-Commit-Position: refs/heads/master@{#589247}
[modify] https://crrev.com/21d97ebaaa07d93da8d32889c673ffa21f734139/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller.mm
[modify] https://crrev.com/21d97ebaaa07d93da8d32889c673ffa21f734139/chrome/browser/ui/cocoa/touchbar/text_suggestions_touch_bar_controller_browsertest.mm

Status: Fixed (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 11

Labels: merge-merged-3538
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