commit | f9b447aa9ab8a6b24877f653699d0fb0fcfa2c5a | [log] [tgz] |
---|---|---|
author | Tessa Nijssen <tnijssen@google.com> | Fri Aug 17 18:27:09 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Aug 17 18:27:09 2018 |
tree | f1af2af14f1b7c607846aab5e2b8a79f271f7f48 | |
parent | e81625790f94c03c5270868be13f9ac06778852b [diff] |
[Mac] Moved TextSuggestionsTouchBarController's Range Validity Check This is a reland of http://crrev/c/1178467. TextSuggestionsTouchBarControllerTest.InvalidRange was modified so that it sets the controller's text and range before calling updateTextSelection:range:offset:. Previously, -updateTextSelection:range:offset: could receive an invalid range from WebContentsTextObserver::DidChangeTextSelection(). This invalid range would then cause a crash in -requestSuggestions. A check has been added to -updateTextSelection:range:offset: to make sure that a selection with an invalid range is not passed to -requestSuggestions. This should prevent future crashes. TextSuggestionsTouchBarControllerTest.InvalidRange tests that an invalid range does not crash the controller and is handled properly. Bug: 717553 Change-Id: I579cac326c3de86321286d4981c05e15f844021b Reviewed-on: https://chromium-review.googlesource.com/1180068 Reviewed-by: Sarah Chan <spqchan@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Commit-Queue: Tessa Nijssen <tnijssen@google.com> Cr-Commit-Position: refs/heads/master@{#584131}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .