commit | 786ca1f973106684cd36eb74a285ebd96cae5793 | [log] [tgz] |
---|---|---|
author | Yi Gu <yigu@chromium.org> | Thu Jun 28 21:39:28 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jun 28 21:39:28 2018 |
tree | 7e8e79efeab81ff51f9b08851da138cbc2c33bc2 | |
parent | 611bde764e7475fca3c9db718b8329e895e311f5 [diff] |
Revert "[Mac] Get Suggestions from Whole Text and Current Selection" This reverts commit 0127f2ebbba4cdc5049f9742767138d6c48e5407. Reason for revert: Failing test bot https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac10.13%20Tests%20%28dbg%29/3661 Original change's description: > [Mac] Get Suggestions from Whole Text and Current Selection > > Currently, the SuggestedTextTouchBarController generates text > suggestions based only text being selected and doesn't take any > surrounding text into account. The goal is to generate text > suggestions from all the text present in the textfield and the > current cursor position, which results in behavior more similar to > Safari's text suggestions. > > First, WebContents::DidChangeTextSelection() and > WebContentsObserver::DidChangeTextSelection() were modified to pass in > the whole text in the textfield and the current selection range > instead of the selected text. > > The method requestSuggestionsForText: was modified to > requestSuggestionsForText:inRange: so that it may receive the full > text in the textfield along with the range of the current selection. > > The WebContentsTextObserver was edited to also observe when a > webpage finishes loading. This way, the controller can check whether > the cursor is in a textfield before the text selection changes. This > is necessary for websites in which a textfield is autofocused. > This currently does not account for text that may be in the > autofocused textfield, which will be addressed in a later CL. > > Bug: 717553 > Change-Id: I3d56d7e590ba11c9a6c1c2e55f5bf1bb1b398985 > Reviewed-on: https://chromium-review.googlesource.com/1101962 > Commit-Queue: Tessa Nijssen <tnijssen@google.com> > Reviewed-by: Avi Drissman <avi@chromium.org> > Reviewed-by: Sarah Chan <spqchan@chromium.org> > Cr-Commit-Position: refs/heads/master@{#571208} TBR=avi@chromium.org,spqchan@chromium.org,tnijssen@google.com Change-Id: Iab7f11ad32948d911bd23f27bbb5cf48721cff45 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 717553 Reviewed-on: https://chromium-review.googlesource.com/1119265 Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Yi Gu <yigu@chromium.org> Cr-Commit-Position: refs/heads/master@{#571273}
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 .