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

Issue 672259 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Feature

Blocked on:
issue 673491
issue 683387
issue 686850
issue 707867



Sign in to add a comment

Implement SuggestionSpan dropdown for voice IME

Project Member Reported by aelias@chromium.org, Dec 7 2016

Issue description

See internal bugs http:/b//32455808 and http://b//33355130.

Android IMEs can bracket text with a SuggestionSpan giving alternate possibilities for a word.  In practice, this feature is primarily used by Google speech IME, offering a UI to correct possible misinterpretations.

Attached is a video of how the Android native implementation works.  There's a light gray underline to indicate the existence of the suggestion, and when the user single-taps on it (not double-tap, despite what the Android docs say), and then a UI dropdown shows the suggestions.  Note that the dropdown is a window that overlays on top of the IME window.
 
voiceSuggestionsInKeep.mp4
1.7 MB View Download
Cc: changwan@chromium.org
The piece of the puzzle that I think I'm missing currently is how the IME provides suggestions along with text. Aren't SuggestionSpans just how TextView marks up an already-known suggestion?
IME can inject span objects inline inside CharSequence that it provides in for example InputConnection.commitText(), as I understand it.
Owner: rlanday@chromium.org
Blockedon: 673491
Blockedon: 683387
Cc: timvolod...@chromium.org
Note: patch in progress here

https://codereview.chromium.org/2650113004
Blockedon: 686850
Blockedon: 707867
Project Member

Comment 11 by bugdroid1@chromium.org, Apr 13 2017

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

commit d6ef615a1a2154d3435b9a09afcd8f6cd929f275
Author: rlanday <rlanday@chromium.org>
Date: Thu Apr 13 01:48:25 2017

Improve how DocumentMarkerController updates markers in response to text edits

This is basically https://codereview.chromium.org/2692093003 with the changes to
make DocumentMarkerController use SynchronousMutationObserver split off into a
separate CL (https://codereview.chromium.org/2755953004).

I need DocumentMarkerController to update markers more gracefully in response to
edits in order to implement SuggestionSpan support on Android. For example, if
we have the string "word1 word2" marked with a DocumentMarker and
CompositeEditCommand::replaceTextInNode() is used to replace word1 or word2 with
different text, the new text should still be inside the marked range.

There's currently a method
CompositeEditCommand::replaceTextInNodePreservingMarkers(), which was added to
fix some particular case to support a marker type which no longer exists
(DeletedAutocorrection): https://bugs.webkit.org/show_bug.cgi?id=60555

This is no longer necessary after this CL since we can handle all the updates
more correctly inside DocumentMarkerController. For example, if we have a string
like "Initial text blah" and we add a marker around " text " and delete
"Initial" and "blah", we end up with " text ". Then
DeleteSelectionCommand::fixupWhitespace() runs, and replaces the spaces with
non-breaking spaces. The current behavior is that the NBSPs are no longer in the
marked range, since DocumentMarkerController doesn't currently support keeping
the replaced text in the marked range, but replaceTextInNodePreservingMarkers()
runs and adds new markers to the NBSPs. So we still end up with " text " being
marked but now we have three separate markers, which is undesirable for some
use cases (e.g. text suggestions, because we don't know what range of text we're
actually supposed to replace now). With the changes in this CL,
DocumentMarkerController is able to keep a single marker around " text ".

The changes to the expected output for InputMethodControllerTest may be helpful
in understanding the behavioral changes here.

BUG= 672259 

Review-Url: https://codereview.chromium.org/2755013004
Cr-Commit-Position: refs/heads/master@{#464236}

[modify] https://crrev.com/d6ef615a1a2154d3435b9a09afcd8f6cd929f275/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
[modify] https://crrev.com/d6ef615a1a2154d3435b9a09afcd8f6cd929f275/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/d6ef615a1a2154d3435b9a09afcd8f6cd929f275/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
[modify] https://crrev.com/d6ef615a1a2154d3435b9a09afcd8f6cd929f275/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
[modify] https://crrev.com/d6ef615a1a2154d3435b9a09afcd8f6cd929f275/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
[modify] https://crrev.com/d6ef615a1a2154d3435b9a09afcd8f6cd929f275/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp
[modify] https://crrev.com/d6ef615a1a2154d3435b9a09afcd8f6cd929f275/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h
[modify] https://crrev.com/d6ef615a1a2154d3435b9a09afcd8f6cd929f275/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
[modify] https://crrev.com/d6ef615a1a2154d3435b9a09afcd8f6cd929f275/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
[modify] https://crrev.com/d6ef615a1a2154d3435b9a09afcd8f6cd929f275/third_party/WebKit/Source/core/editing/markers/DocumentMarkerTest.cpp

Labels: -M-57 M-60
Cc: aelias@chromium.org
Labels: -M-60 M-61
Project Member

Comment 15 by bugdroid1@chromium.org, Jun 13 2017

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

commit a01ec54e907dcda55f339330da7c05149295131b
Author: rlanday <rlanday@chromium.org>
Date: Tue Jun 13 06:19:57 2017

Re-add content-independent marker tests to InputMethodControllerTest

In https://codereview.chromium.org/2895353003, I split the behavior for
modifying DocumentMarkers in response to text edits into two versions:
content-dependent (the historical behavior), and content-independent (the
behavior I need to implement support for Android SuggestionSpans, which I had
previously changed all DocumentMarkers to use before the mentioned CL). At the
time of this CL, the only marker type using the content-independent behavior was
Composition, and Composition markers are cleared by many text-editing
operations, so I changed all the DocumentMarker-shifting-related test cases in
InputMethodControllerTest to test the content-dependent behavior (and removed a
few tests that were no longer applicable).

In this CL, I'm re-adding the tests I removed and adding tests for the content
independent marker-shifting behavior (using the ActiveSuggestion marker type
I've added) to complement the tests for the content-dependent behavior.

BUG= 672259 

Review-Url: https://codereview.chromium.org/2934913002
Cr-Commit-Position: refs/heads/master@{#478913}

[modify] https://crrev.com/a01ec54e907dcda55f339330da7c05149295131b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp

Project Member

Comment 16 by bugdroid1@chromium.org, Aug 9 2017

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

commit 1aeb13cea5664fd20a89ed80928ad3e22ce3ccd6
Author: Ryan Landay <rlanday@chromium.org>
Date: Wed Aug 09 17:58:19 2017

Add SuggestionMarker

Design doc: https://goo.gl/JAX77q

This CL introduces SuggestionMarker and SuggestionMarkerListImpl as preparation
for supporting Android SuggestionSpans. SuggestionMarker subclasses
StyleableMarker, which provides these fields:

- start_offset_
- end_offset_
- underline_color_
- background_color_
- thickness_

SuggestionMarker also provides these fields of its own:

- tag_: An integer value that can be used to uniquely identify a
  SuggestionMarker; currently assigned by DocumentMarkerController, but could
  later be changed to be passed down from Android if necessary

- suggestions_: A vector of suggested replacement strings for the marked text

- suggestion_highlight_color_: The color to be used to highlight the
  active SuggestionSpan(s) when the text suggestion menu is open

AOSP Android only uses two different underline colors for SuggestionSpans: red
for FLAG_MISSPELLED and gray otherwise. OEMs can potentially change these colors
(I haven't seen an example of this yet, though), so changwan@ advised that we
should pull the color directly off the SuggestionSpan.

SuggestionSpans never have a background color set (except when the suggestion
menu is open and they're highlighted), but it seems to make sense to support
this to avoid adding complexity to the setComposingText()/commitText() APIs
(we're probably going to add extra fields to the CompositionUnderline structs so
we can also use them for SuggestionSpans). Perhaps we could use the
background_color field to store the highlight color? This may be confusing.

SuggestionMarkerListImpl is unique among DocumentMarkerList implementations in
that Suggestion markers can overlap. There is some additional marker-updating
behavior I need to add to this class, but it's not necessary to do it in this\
CL.

Bug:  672259 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Iebc50f373145a6dc61f6f9e5a8aa2fec36ad0771
Reviewed-on: https://chromium-review.googlesource.com/590532
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493048}
[modify] https://crrev.com/1aeb13cea5664fd20a89ed80928ad3e22ce3ccd6/third_party/WebKit/Source/core/editing/BUILD.gn
[modify] https://crrev.com/1aeb13cea5664fd20a89ed80928ad3e22ce3ccd6/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h
[modify] https://crrev.com/1aeb13cea5664fd20a89ed80928ad3e22ce3ccd6/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
[modify] https://crrev.com/1aeb13cea5664fd20a89ed80928ad3e22ce3ccd6/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
[modify] https://crrev.com/1aeb13cea5664fd20a89ed80928ad3e22ce3ccd6/third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
[modify] https://crrev.com/1aeb13cea5664fd20a89ed80928ad3e22ce3ccd6/third_party/WebKit/Source/core/editing/markers/StyleableMarker.cpp
[add] https://crrev.com/1aeb13cea5664fd20a89ed80928ad3e22ce3ccd6/third_party/WebKit/Source/core/editing/markers/SuggestionMarker.cpp
[add] https://crrev.com/1aeb13cea5664fd20a89ed80928ad3e22ce3ccd6/third_party/WebKit/Source/core/editing/markers/SuggestionMarker.h
[add] https://crrev.com/1aeb13cea5664fd20a89ed80928ad3e22ce3ccd6/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerListImpl.cpp
[add] https://crrev.com/1aeb13cea5664fd20a89ed80928ad3e22ce3ccd6/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerListImpl.h
[add] https://crrev.com/1aeb13cea5664fd20a89ed80928ad3e22ce3ccd6/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerListImplTest.cpp
[add] https://crrev.com/1aeb13cea5664fd20a89ed80928ad3e22ce3ccd6/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerTest.cpp

Project Member

Comment 17 by bugdroid1@chromium.org, Aug 9 2017

Project Member

Comment 18 by bugdroid1@chromium.org, Aug 10 2017

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

commit 8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f
Author: Ryan Landay <rlanday@chromium.org>
Date: Thu Aug 10 19:00:34 2017

Pass node text to DocumentMarkerList::ShiftMarkers()

For SuggestionMarkerListImpl, we need the node text to properly implement
ShiftMarkers() (so we know if text prepended/appended immediately before/after a
piece of text should cause the marker to be removed or not). Therefore, we need
to add this as a param to DocumentMarkerList::ShiftMarkers().

Bug:  672259 
Change-Id: I9ff76621837e1154da574f7fa29f22abc994850f
Reviewed-on: https://chromium-review.googlesource.com/607579
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493483}
[modify] https://crrev.com/8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f/third_party/WebKit/Source/core/editing/markers/ActiveSuggestionMarkerListImpl.cpp
[modify] https://crrev.com/8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f/third_party/WebKit/Source/core/editing/markers/ActiveSuggestionMarkerListImpl.h
[modify] https://crrev.com/8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f/third_party/WebKit/Source/core/editing/markers/CompositionMarkerListImpl.cpp
[modify] https://crrev.com/8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f/third_party/WebKit/Source/core/editing/markers/CompositionMarkerListImpl.h
[modify] https://crrev.com/8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
[modify] https://crrev.com/8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f/third_party/WebKit/Source/core/editing/markers/DocumentMarkerList.h
[modify] https://crrev.com/8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImpl.cpp
[modify] https://crrev.com/8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImpl.h
[modify] https://crrev.com/8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerListImpl.cpp
[modify] https://crrev.com/8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerListImpl.h
[modify] https://crrev.com/8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerListImplTest.cpp
[modify] https://crrev.com/8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f/third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListImpl.cpp
[modify] https://crrev.com/8b7afd2fb951b5d3c7b6bb0ebcaf70b548b0689f/third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListImpl.h

Project Member

Comment 19 by bugdroid1@chromium.org, Aug 10 2017

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

commit bd3df550c43a23c45e2b7381a564447655739dd7
Author: Ryan Landay <rlanday@chromium.org>
Date: Thu Aug 10 22:51:28 2017

Add SuggestionMarkerReplacementScope and related behavior

This CL adds a class SuggestionMarkerReplacementScope for controlling how
suggestion DocumentMarkers are updated in response to edits. When a scope object
is active, the markers are updated to properly respond to a suggestion being
applied. When a scope object is not active, the markers are updated to properly
respond to any other sort of edit.

Bug:  672259 
Change-Id: I60aca1cafbcc93658c04c4f867196514a30fe56f
Reviewed-on: https://chromium-review.googlesource.com/609097
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493578}
[modify] https://crrev.com/bd3df550c43a23c45e2b7381a564447655739dd7/third_party/WebKit/Source/core/editing/BUILD.gn
[modify] https://crrev.com/bd3df550c43a23c45e2b7381a564447655739dd7/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerListImpl.cpp
[modify] https://crrev.com/bd3df550c43a23c45e2b7381a564447655739dd7/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerListImpl.h
[modify] https://crrev.com/bd3df550c43a23c45e2b7381a564447655739dd7/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerListImplTest.cpp
[add] https://crrev.com/bd3df550c43a23c45e2b7381a564447655739dd7/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerReplacementScope.cpp
[add] https://crrev.com/bd3df550c43a23c45e2b7381a564447655739dd7/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerReplacementScope.h

Project Member

Comment 20 by bugdroid1@chromium.org, Aug 12 2017

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

commit 9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb
Author: Ryan Landay <rlanday@chromium.org>
Date: Sat Aug 12 01:59:11 2017

Rename CompositionUnderline to ImeTextSpan

This class (of which we have three versions: ui::CompositionUnderline,
blink::WebCompositionUnderline, and blink::CompositionUnderline) is
poorly-named, since it's not just used for composition underlines, it's also
used by IMEs to add background highlighting. The name is going to get even worse
once we start also using it to pass Android SuggestionSpans into editing code
(see  crbug.com/672259 ). I talked to changwan@ and he thinks ImeSpan is a better
name for this class.

This CL renames these classes, and also all the variables named "underlines"
that store instances of these classes.

TBR=dcheng@chromium.org,jochen@chromium.org

Bug:  672259 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I065656eb29880e70aef32545a3a43b8cfd53cf5b
Reviewed-on: https://chromium-review.googlesource.com/609524
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493934}
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/chrome/browser/chromeos/input_method/textinput_surroundingtext_browsertest.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/chrome/browser/ui/input_method/input_method_engine.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/chrome/browser/ui/input_method/input_method_engine_base.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/chrome/browser/ui/views/ime/input_ime_apitest_nonchromeos.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/components/arc/ime/arc_ime_bridge_impl.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/DEPS
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/android/ime_adapter_android.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/android/ime_adapter_android.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/browser_plugin/browser_plugin_guest.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/browser_plugin/browser_plugin_guest.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/frame_host/input/legacy_ipc_frame_input_handler.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/frame_host/input/legacy_ipc_frame_input_handler.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/renderer_host/input/legacy_ipc_widget_input_handler.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/renderer_host/input/legacy_ipc_widget_input_handler.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/renderer_host/input/mock_widget_input_handler.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/renderer_host/input/mock_widget_input_handler.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/renderer_host/render_widget_host_impl.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/renderer_host/render_widget_host_impl.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/renderer_host/render_widget_host_view_mac.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/common/DEPS
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/common/browser_plugin/browser_plugin_messages.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/common/content_param_traits_macros.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/common/input/input_handler.mojom
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/common/input_messages.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/public/test/text_input_test_utils.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/public/test/text_input_test_utils.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/browser_plugin/browser_plugin.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/browser_plugin/browser_plugin.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/input/frame_input_handler_impl.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/input/frame_input_handler_impl.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/input/widget_input_handler_impl.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/input/widget_input_handler_impl.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/pepper/pepper_plugin_instance_impl.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/pepper/pepper_plugin_instance_impl.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/render_frame_impl.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/render_view_browsertest.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/render_view_browsertest_mac.mm
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/render_widget.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/render_widget.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/render_widget_browsertest.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/renderer/render_widget_fullscreen_pepper.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/shell/test_runner/text_input_controller.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/test/test_render_frame.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/content/test/test_render_frame.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/services/ui/public/interfaces/ime/ime.mojom
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/services/ui/public/interfaces/ime/ime.typemap
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/services/ui/public/interfaces/ime/ime_struct_traits.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/services/ui/public/interfaces/ime/ime_struct_traits.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/services/ui/public/interfaces/ime/ime_struct_traits_unittest.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/editing/BUILD.gn
[delete] https://crrev.com/1b5cebb89f71da1077b3e20a0ea0a02aa6f817d2/third_party/WebKit/Source/core/editing/CompositionUnderline.cpp
[delete] https://crrev.com/1b5cebb89f71da1077b3e20a0ea0a02aa6f817d2/third_party/WebKit/Source/core/editing/CompositionUnderlineTest.cpp
[add] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/editing/ImeTextSpan.cpp
[rename] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/editing/ImeTextSpan.h
[add] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/editing/ImeTextSpanTest.cpp
[rename] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/editing/ImeTextSpanVectorBuilder.cpp
[rename] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/editing/ImeTextSpanVectorBuilder.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/editing/InputMethodController.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/exported/WebInputMethodControllerImpl.cpp
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/exported/WebInputMethodControllerImpl.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/exported/WebViewTest.cpp
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.cpp
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/public/BUILD.gn
[rename] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/public/web/WebImeTextSpan.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/public/web/WebInputMethodController.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/public/web/WebLocalFrame.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/public/web/WebPlugin.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/third_party/WebKit/public/web/WebWidget.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/ui/base/ime/BUILD.gn
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/ui/base/ime/composition_text.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/ui/base/ime/composition_text.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/ui/base/ime/composition_text_unittest.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/ui/base/ime/composition_text_util_pango.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/ui/base/ime/composition_text_util_pango_unittest.cc
[rename] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/ui/base/ime/ime_text_span.h
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/ui/base/ime/input_method_chromeos.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/ui/base/ime/win/imm32_manager.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/ui/views/cocoa/bridged_content_view.mm
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/ui/views/controls/textfield/textfield_model.cc
[modify] https://crrev.com/9e42fd7404703d7ec7e95bddf66ae0ee80cbb9cb/ui/views/controls/textfield/textfield_model_unittest.cc

Project Member

Comment 21 by bugdroid1@chromium.org, Aug 16 2017

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

commit 9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b
Author: Ryan Landay <rlanday@chromium.org>
Date: Wed Aug 16 23:16:52 2017

Add some fields to the ImeTextSpan structs to support suggestion markers

The ImeTextSpan structs (there are three: ui:ImeTextSpan, blink::WebImeTextSpan,
and blink::ImeTextSpan) need a couple extra fields so Android IMEs can pass
Android SuggestionSpans into Blink. I am adding the following fields in this CL:

- type_: an enum to specify what type of marker should be created from the
  ImeTextSpan. In this CL, the two values are COMPOSITION and SUGGESTION.

- suggestion_highlight_color_: the color to highlight the marked text when
  tapped (only used for suggestion markers)

- suggestions_: a list of suggested text replacements for the marked text (only
  used for suggestion markers)

Bug:  672259 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Iff6904932bea1fdd6dc24cbb8cbbd716f535c664
Reviewed-on: https://chromium-review.googlesource.com/614394
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494993}
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/chrome/browser/ui/input_method/input_method_engine.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/chrome/browser/ui/views/ime/input_ime_apitest_nonchromeos.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/content/browser/android/ime_adapter_android.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/content/browser/browser_plugin/browser_plugin_guest.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/content/browser/frame_host/input/legacy_ipc_frame_input_handler.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/content/browser/renderer_host/input/legacy_ipc_widget_input_handler.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/content/common/content_param_traits_macros.h
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/content/renderer/input/frame_input_handler_impl.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/content/renderer/input/widget_input_handler_impl.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/content/shell/test_runner/text_input_controller.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/services/ui/public/interfaces/ime/ime_struct_traits_unittest.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/third_party/WebKit/Source/core/editing/ImeTextSpan.cpp
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/third_party/WebKit/Source/core/editing/ImeTextSpan.h
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/third_party/WebKit/Source/core/editing/ImeTextSpanTest.cpp
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/third_party/WebKit/Source/core/exported/WebViewTest.cpp
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/third_party/WebKit/public/web/WebImeTextSpan.h
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/ui/base/ime/BUILD.gn
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/ui/base/ime/composition_text_unittest.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/ui/base/ime/composition_text_util_pango.cc
[add] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/ui/base/ime/ime_text_span.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/ui/base/ime/ime_text_span.h
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/ui/base/ime/input_method_chromeos.cc
[modify] https://crrev.com/9387aa9d57ce34a7b79a01f3bd0c27b08d70c29b/ui/views/cocoa/bridged_content_view.mm

Project Member

Comment 22 by bugdroid1@chromium.org, Aug 30 2017

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

commit 254525d5b81971bf869c8be58701b9ee37110cdb
Author: Ryan Landay <rlanday@chromium.org>
Date: Wed Aug 30 02:18:11 2017

Add painting for SuggestionMarker

Suggestion markers are painted similarly to composition markers, except they
take precedence over spelling or composition markers.

Bug:  672259 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I3a8f0bc4732b93c6043c349d885d845778b2ec5f
Reviewed-on: https://chromium-review.googlesource.com/607242
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498342}
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/paint/markers/suggestion-marker-basic.html
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/paint/markers/suggestion-marker-split.html
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/platform/linux/paint/markers/suggestion-marker-basic-expected.png
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/platform/linux/paint/markers/suggestion-marker-basic-expected.txt
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/platform/linux/paint/markers/suggestion-marker-split-expected.png
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/platform/linux/paint/markers/suggestion-marker-split-expected.txt
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/platform/mac/paint/markers/suggestion-marker-basic-expected.png
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/platform/mac/paint/markers/suggestion-marker-basic-expected.txt
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/platform/mac/paint/markers/suggestion-marker-split-expected.png
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/platform/mac/paint/markers/suggestion-marker-split-expected.txt
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/platform/win/paint/markers/suggestion-marker-basic-expected.png
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/platform/win/paint/markers/suggestion-marker-basic-expected.txt
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/platform/win/paint/markers/suggestion-marker-split-expected.png
[add] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/LayoutTests/platform/win/paint/markers/suggestion-marker-split-expected.txt
[modify] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
[modify] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.h
[modify] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
[modify] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/Source/core/testing/Internals.cpp
[modify] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/Source/core/testing/Internals.h
[modify] https://crrev.com/254525d5b81971bf869c8be58701b9ee37110cdb/third_party/WebKit/Source/core/testing/Internals.idl

Project Member

Comment 23 by bugdroid1@chromium.org, Sep 12 2017

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

commit 3fc7721d2246e06744c759c28be200f7f657ac17
Author: Ryan Landay <rlanday@chromium.org>
Date: Tue Sep 12 18:04:30 2017

Add support for Android SuggestionSpans

This is the final CL to add support for Android SuggestionSpans (at least ones
not marked with FLAG_MISSPELLING; there will be one or more additional CLs to
add support for those). This CL includes:

- Changes to ImeAdapter to make it pass SuggestionSpans into
  InputMethodController

- Changes to InputMethodController to make it create suggestion markers from the
  passed-in SuggestionSpans

- Additional methods in TextSuggestionController for getting the list of text
  suggestions under the cursor, and applying a suggestion

- More Mojo code to pass information about text suggestions back-and-forth
  between browser and renderer code

- Changes to SuggestionsPopupWindow and TextSuggestionHost so we can show either
  a spell check or a text suggestion menu

Bug:  672259 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I3f30543586901baec4648d265874a303efafbd44
Reviewed-on: https://chromium-review.googlesource.com/627172
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Alexandre Elias <aelias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501335}
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/chrome/android/java_sources.gni
[rename] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/chrome/android/javatests/src/org/chromium/chrome/browser/input/SpellCheckMenuTest.java
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/browser/android/ime_adapter_android.cc
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/browser/android/text_suggestion_host_android.cc
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/browser/android/text_suggestion_host_android.h
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/browser/android/text_suggestion_host_mojo_impl_android.cc
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/browser/android/text_suggestion_host_mojo_impl_android.h
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/public/android/BUILD.gn
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/public/android/java/res/values-v17/styles.xml
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
[add] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/public/android/java/src/org/chromium/content/browser/input/SpellCheckPopupWindow.java
[add] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/public/android/java/src/org/chromium/content/browser/input/SuggestionInfo.java
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/public/android/java/src/org/chromium/content/browser/input/SuggestionsPopupWindow.java
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/public/android/java/src/org/chromium/content/browser/input/TextSuggestionHost.java
[add] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/public/android/java/src/org/chromium/content/browser/input/TextSuggestionsPopupWindow.java
[add] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/content/public/android/javatests/src/org/chromium/content/browser/input/TextSuggestionMenuTest.java
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/services/ui/public/interfaces/ime/ime.mojom
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/services/ui/public/interfaces/ime/ime_struct_traits.cc
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/services/ui/public/interfaces/ime/ime_struct_traits.h
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/third_party/WebKit/Source/core/editing/BUILD.gn
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/third_party/WebKit/Source/core/editing/SelectionController.cpp
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionBackendImpl.cpp
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionBackendImpl.h
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionController.cpp
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionController.h
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionControllerTest.cpp
[add] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionInfo.h
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/third_party/WebKit/public/platform/input_host.mojom
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/third_party/WebKit/public/platform/input_messages.mojom
[modify] https://crrev.com/3fc7721d2246e06744c759c28be200f7f657ac17/ui/platform_window/mojo/ime_type_converters.h

Project Member

Comment 24 by bugdroid1@chromium.org, Sep 12 2017

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

commit fc6cfd50c4eec740276d7245bb430f73faa77452
Author: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Date: Tue Sep 12 20:20:33 2017

Revert "Add support for Android SuggestionSpans"

This reverts commit 3fc7721d2246e06744c759c28be200f7f657ac17.

Reason for revert: Suspecting this CL for the 3 consecutive failures of the TextSuggestionMenuTest#menuDismissesWhenTappingOutside test.

see builds:
https://uberchromegw.corp.google.com/i/chromium.android/builders/Android%20N5X%20Swarm%20Builder/builds/15165
https://uberchromegw.corp.google.com/i/chromium.android/builders/Android%20N5X%20Swarm%20Builder/builds/15166
https://uberchromegw.corp.google.com/i/chromium.android/builders/Android%20N5X%20Swarm%20Builder/builds/15167

Log:
junit.framework.AssertionFailedError: Criteria not met in allotted time.
	at junit.framework.Assert.fail(Assert.java:50)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at org.chromium.content.browser.test.util.CriteriaHelper.pollInstrumentationThread(CriteriaHelper.java:79)
	at org.chromium.content.browser.test.util.CriteriaHelper.pollUiThread(CriteriaHelper.java:117)
	at org.chromium.content.browser.test.util.CriteriaHelper.pollUiThread(CriteriaHelper.java:138)
	at org.chromium.content.browser.input.TextSuggestionMenuTest.waitForMenuToHide(TextSuggestionMenuTest.java:195)
	at org.chromium.content.browser.input.TextSuggestionMenuTest.menuDismissesWhenTappingOutside(TextSuggestionMenuTest.java:170)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:52)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.chromium.base.test.ScreenshotOnFailureStatement.evaluate(ScreenshotOnFailureStatement.java:37)
	at android.support.test.internal.statement.UiThreadStatement.evaluate(UiThreadStatement.java:55)
	at android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:270)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.chromium.base.test.BaseJUnit4ClassRunner.runChild(BaseJUnit4ClassRunner.java:175)
	at org.chromium.base.test.BaseJUnit4ClassRunner.runChild(BaseJUnit4ClassRunner.java:40)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.chromium.base.test.BaseJUnit4ClassRunner.run(BaseJUnit4ClassRunner.java:164)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
	at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)
	at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262)
	at org.chromium.base.test.BaseChromiumAndroidJUnitRunner.onStart(BaseChromiumAndroidJUnitRunner.java:98)
	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1879)

Original change's description:
> Add support for Android SuggestionSpans
> 
> This is the final CL to add support for Android SuggestionSpans (at least ones
> not marked with FLAG_MISSPELLING; there will be one or more additional CLs to
> add support for those). This CL includes:
> 
> - Changes to ImeAdapter to make it pass SuggestionSpans into
>   InputMethodController
> 
> - Changes to InputMethodController to make it create suggestion markers from the
>   passed-in SuggestionSpans
> 
> - Additional methods in TextSuggestionController for getting the list of text
>   suggestions under the cursor, and applying a suggestion
> 
> - More Mojo code to pass information about text suggestions back-and-forth
>   between browser and renderer code
> 
> - Changes to SuggestionsPopupWindow and TextSuggestionHost so we can show either
>   a spell check or a text suggestion menu
> 
> Bug:  672259 
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Change-Id: I3f30543586901baec4648d265874a303efafbd44
> Reviewed-on: https://chromium-review.googlesource.com/627172
> Commit-Queue: Ryan Landay <rlanday@chromium.org>
> Reviewed-by: Ted Choc <tedchoc@chromium.org>
> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Alexandre Elias <aelias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#501335}

TBR=yosin@chromium.org,dtrainor@chromium.org,torne@chromium.org,aelias@chromium.org,tedchoc@chromium.org,changwan@chromium.org,xiaochengh@chromium.org,rsesek@chromium.org,rlanday@chromium.org

Change-Id: I24641a2a43dffe8056a231a676033bcff39bcae7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  672259 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/663760
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Commit-Queue: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501379}
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/chrome/android/java_sources.gni
[rename] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/chrome/android/javatests/src/org/chromium/chrome/browser/input/TextSuggestionMenuTest.java
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/content/browser/android/ime_adapter_android.cc
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/content/browser/android/text_suggestion_host_android.cc
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/content/browser/android/text_suggestion_host_android.h
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/content/browser/android/text_suggestion_host_mojo_impl_android.cc
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/content/browser/android/text_suggestion_host_mojo_impl_android.h
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/content/public/android/BUILD.gn
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/content/public/android/java/res/values-v17/styles.xml
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
[delete] https://crrev.com/933963d487425664d97c8b6a2f8dc624597aa045/content/public/android/java/src/org/chromium/content/browser/input/SpellCheckPopupWindow.java
[delete] https://crrev.com/933963d487425664d97c8b6a2f8dc624597aa045/content/public/android/java/src/org/chromium/content/browser/input/SuggestionInfo.java
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/content/public/android/java/src/org/chromium/content/browser/input/SuggestionsPopupWindow.java
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/content/public/android/java/src/org/chromium/content/browser/input/TextSuggestionHost.java
[delete] https://crrev.com/933963d487425664d97c8b6a2f8dc624597aa045/content/public/android/java/src/org/chromium/content/browser/input/TextSuggestionsPopupWindow.java
[delete] https://crrev.com/933963d487425664d97c8b6a2f8dc624597aa045/content/public/android/javatests/src/org/chromium/content/browser/input/TextSuggestionMenuTest.java
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/services/ui/public/interfaces/ime/ime.mojom
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/services/ui/public/interfaces/ime/ime_struct_traits.cc
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/services/ui/public/interfaces/ime/ime_struct_traits.h
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/third_party/WebKit/Source/core/editing/BUILD.gn
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/third_party/WebKit/Source/core/editing/SelectionController.cpp
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionBackendImpl.cpp
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionBackendImpl.h
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionController.cpp
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionController.h
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionControllerTest.cpp
[delete] https://crrev.com/933963d487425664d97c8b6a2f8dc624597aa045/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionInfo.h
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/third_party/WebKit/public/platform/input_host.mojom
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/third_party/WebKit/public/platform/input_messages.mojom
[modify] https://crrev.com/fc6cfd50c4eec740276d7245bb430f73faa77452/ui/platform_window/mojo/ime_type_converters.h

Project Member

Comment 25 by bugdroid1@chromium.org, Sep 13 2017

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

commit 62d6137a1af59b3e17452c3e6ef8937cf04f4004
Author: Ryan Landay <rlanday@chromium.org>
Date: Wed Sep 13 03:13:19 2017

Reland "Add support for Android SuggestionSpans"

TextSuggestionMenuTest#menuDismissesWhenTappingOutside() was broken in the original CL. It
tried to send a touch directly to the WebContents view, bypassing the
SuggestionsPopupWindow. In debug builds, this caused a DCHECK from trying to add a second
active suggestion marker overlapping the first one, which was actually counted as a test
pass. In release builds, the DCHECK wasn't hit, and the menu would close very briefly and
reopen, causing a test failure.

I talked to changwan@ about if we should fix the test by sending the tap to the
SuggestionPopupWindow's content view, and he advised that since dismissing a PopupWindow
when tapping outside is built-in behavior, it's sufficient to test that calling
SuggestionsPopupWindow.dismiss() behaves properly.

This is a reland of 3fc7721d2246e06744c759c28be200f7f657ac17
Original change's description:
> Add support for Android SuggestionSpans
> 
> This is the final CL to add support for Android SuggestionSpans (at least ones
> not marked with FLAG_MISSPELLING; there will be one or more additional CLs to
> add support for those). This CL includes:
> 
> - Changes to ImeAdapter to make it pass SuggestionSpans into
>   InputMethodController
> 
> - Changes to InputMethodController to make it create suggestion markers from the
>   passed-in SuggestionSpans
> 
> - Additional methods in TextSuggestionController for getting the list of text
>   suggestions under the cursor, and applying a suggestion
> 
> - More Mojo code to pass information about text suggestions back-and-forth
>   between browser and renderer code
> 
> - Changes to SuggestionsPopupWindow and TextSuggestionHost so we can show either
>   a spell check or a text suggestion menu
> 
> Bug:  672259 
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Change-Id: I3f30543586901baec4648d265874a303efafbd44
> Reviewed-on: https://chromium-review.googlesource.com/627172
> Commit-Queue: Ryan Landay <rlanday@chromium.org>
> Reviewed-by: Ted Choc <tedchoc@chromium.org>
> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Alexandre Elias <aelias@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#501335}

Bug:  672259 
Change-Id: I4c893fc7dd74d2a31d032454385ff8e83e7c13a8
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

TBR=tedchoc@chromium.org,yosin@chromium.org,xiaochengh@chromium.org,rsesek@chromium.org,aelias@chromium.org,changwan@chromium.org

Change-Id: I4c893fc7dd74d2a31d032454385ff8e83e7c13a8
Reviewed-on: https://chromium-review.googlesource.com/664089
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Ryan Landay <rlanday@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501536}
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/chrome/android/java_sources.gni
[rename] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/chrome/android/javatests/src/org/chromium/chrome/browser/input/SpellCheckMenuTest.java
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/browser/android/ime_adapter_android.cc
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/browser/android/text_suggestion_host_android.cc
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/browser/android/text_suggestion_host_android.h
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/browser/android/text_suggestion_host_mojo_impl_android.cc
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/browser/android/text_suggestion_host_mojo_impl_android.h
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/public/android/BUILD.gn
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/public/android/java/res/values-v17/styles.xml
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
[add] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/public/android/java/src/org/chromium/content/browser/input/SpellCheckPopupWindow.java
[add] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/public/android/java/src/org/chromium/content/browser/input/SuggestionInfo.java
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/public/android/java/src/org/chromium/content/browser/input/SuggestionsPopupWindow.java
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/public/android/java/src/org/chromium/content/browser/input/TextSuggestionHost.java
[add] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/public/android/java/src/org/chromium/content/browser/input/TextSuggestionsPopupWindow.java
[add] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/content/public/android/javatests/src/org/chromium/content/browser/input/TextSuggestionMenuTest.java
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/services/ui/public/interfaces/ime/ime.mojom
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/services/ui/public/interfaces/ime/ime_struct_traits.cc
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/services/ui/public/interfaces/ime/ime_struct_traits.h
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/third_party/WebKit/Source/core/editing/BUILD.gn
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/third_party/WebKit/Source/core/editing/SelectionController.cpp
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionBackendImpl.cpp
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionBackendImpl.h
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionController.cpp
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionController.h
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionControllerTest.cpp
[add] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionInfo.h
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/third_party/WebKit/public/platform/input_host.mojom
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/third_party/WebKit/public/platform/input_messages.mojom
[modify] https://crrev.com/62d6137a1af59b3e17452c3e6ef8937cf04f4004/ui/platform_window/mojo/ime_type_converters.h

I think you may still need to investigate the test failure on debug build, although main test cases don't need to cover that case.

It sounds to me that it is theoretically possible to touch the content view before suggestion popup shows up because of the round trip to the renderer, in which case whatever mandate DCHECK was trying to keep may be broken.

Project Member

Comment 28 by bugdroid1@chromium.org, Sep 13 2017

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

commit 766e933e2ce53bbc838e5da580a43b5717fa8863
Author: Ryan Landay <rlanday@chromium.org>
Date: Wed Sep 13 19:47:03 2017

Make TextSuggestionController ignore taps while text suggestion menu is opening

There's potentially a very short window of time (or maybe longer, if the UI
thread is hung) where TextSuggestionController has told the Android browser code
to open the text suggestions menu, but it hasn't actually opened yet. If a
further tap on a suggestion/spelling marker is received in this window, the 300
ms double-tap timer will be started again, and if no further input is received
in that window to invalidate the timer, TextSuggestionController will try to
show the menu a second time, which does bad things (in particular, it may try to
create a second ActiveSuggestion marker on top of the first one, which isn't
supposed to happen).

This CL adds a check to make sure we avoid this corner case.

Bug:  672259 
Change-Id: I028b28b974a8f5381c82aa1485df180192b0edec
Reviewed-on: https://chromium-review.googlesource.com/665309
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501716}
[modify] https://crrev.com/766e933e2ce53bbc838e5da580a43b5717fa8863/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionController.cpp

Project Member

Comment 29 by bugdroid1@chromium.org, Sep 14 2017

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

commit 69ac1e49dd987552a18acaa2575c263089be13a3
Author: Ryan Landay <rlanday@chromium.org>
Date: Thu Sep 14 02:17:38 2017

Add value to ImeTextSpan::Type enum for misspelling suggestions

Currently, the Type enums in the ImeTextSpan classes (ui::ImeTextSpan,
blink::ImeTextSpan, and blink::WebImeTextSpan) define two values: kComposition,
for composition markers, and kSuggestion, for Android SuggestionSpans. This
CL adds a third value, kMisspellingSuggestion, for Android SuggestionSpans that
represent misspellings. Misspelling suggestions will behave differently in two
ways from regular suggestions:

- They will not be added to an editable region with spell checking disabled.
- They will be removed if one of their suggested replacements is chosen.

Bug:  672259 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Ie4b3d2f67ef53b5819380261da5d91ac0209a7ff
Reviewed-on: https://chromium-review.googlesource.com/660689
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501843}
[modify] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/content/browser/browser_plugin/browser_plugin_guest.cc
[modify] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/content/browser/frame_host/input/legacy_ipc_frame_input_handler.cc
[modify] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/content/browser/renderer_host/input/legacy_ipc_widget_input_handler.cc
[modify] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/content/common/BUILD.gn
[modify] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/content/common/content_param_traits_macros.h
[add] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/content/common/input/ime_text_span_conversions.cc
[add] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/content/common/input/ime_text_span_conversions.h
[modify] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/content/renderer/input/frame_input_handler_impl.cc
[modify] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/content/renderer/input/widget_input_handler_impl.cc
[modify] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/services/ui/public/interfaces/ime/ime.mojom
[modify] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/services/ui/public/interfaces/ime/ime_struct_traits.cc
[modify] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/third_party/WebKit/Source/core/editing/ImeTextSpan.cpp
[modify] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/third_party/WebKit/Source/core/editing/ImeTextSpan.h
[modify] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/third_party/WebKit/public/web/WebImeTextSpan.h
[modify] https://crrev.com/69ac1e49dd987552a18acaa2575c263089be13a3/ui/base/ime/ime_text_span.h

Project Member

Comment 30 by bugdroid1@chromium.org, Sep 15 2017

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

commit 05020ec230bc6b34e33866400d4e55f9ee5279be
Author: Ryan Landay <rlanday@chromium.org>
Date: Fri Sep 15 20:38:17 2017

Add DocumentMarkerController::RemoveSuggestionMarkerByTag()

This method will be used to remove misspelling suggestion markers when a
replacement is selected.

Bug:  672259 
Change-Id: I3d110571590105417bef491e0fd6ef5a79eb2121
Reviewed-on: https://chromium-review.googlesource.com/617592
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502354}
[modify] https://crrev.com/05020ec230bc6b34e33866400d4e55f9ee5279be/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
[modify] https://crrev.com/05020ec230bc6b34e33866400d4e55f9ee5279be/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h
[modify] https://crrev.com/05020ec230bc6b34e33866400d4e55f9ee5279be/third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp
[modify] https://crrev.com/05020ec230bc6b34e33866400d4e55f9ee5279be/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerListImpl.cpp
[modify] https://crrev.com/05020ec230bc6b34e33866400d4e55f9ee5279be/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerListImpl.h
[modify] https://crrev.com/05020ec230bc6b34e33866400d4e55f9ee5279be/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerListImplTest.cpp

Project Member

Comment 31 by bugdroid1@chromium.org, Sep 22 2017

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

commit ffbae096b1229754a33cee80abfa08fe445578e2
Author: Ryan Landay <rlanday@chromium.org>
Date: Fri Sep 22 20:12:41 2017

Add field on SuggestionMarker to record if it's for a misspelling

Android SuggestionSpans with the FLAG_MISSPELLING flag set need to be removed
after we apply a suggestion. Therefore, to support this flag, we need to have a
type field on DocumentMarker to record whether or not the marker represents a
misspelling.

TBR=skobes@chromium.org

Bug:  672259 
Change-Id: I8e2d6960b8954d3d0f680fb63345995de0930861
Reviewed-on: https://chromium-review.googlesource.com/661148
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503833}
[modify] https://crrev.com/ffbae096b1229754a33cee80abfa08fe445578e2/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/ffbae096b1229754a33cee80abfa08fe445578e2/third_party/WebKit/Source/core/editing/markers/SuggestionMarker.cpp
[modify] https://crrev.com/ffbae096b1229754a33cee80abfa08fe445578e2/third_party/WebKit/Source/core/editing/markers/SuggestionMarker.h
[modify] https://crrev.com/ffbae096b1229754a33cee80abfa08fe445578e2/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerProperties.cpp
[modify] https://crrev.com/ffbae096b1229754a33cee80abfa08fe445578e2/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerProperties.h
[modify] https://crrev.com/ffbae096b1229754a33cee80abfa08fe445578e2/third_party/WebKit/Source/core/editing/markers/SuggestionMarkerTest.cpp
[modify] https://crrev.com/ffbae096b1229754a33cee80abfa08fe445578e2/third_party/WebKit/Source/core/testing/Internals.cpp

Project Member

Comment 32 by bugdroid1@chromium.org, Sep 22 2017

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

commit 9d091d3cbfe4d9ba9e42bf110c368ea02e24308c
Author: Ryan Landay <rlanday@chromium.org>
Date: Fri Sep 22 20:38:19 2017

Add support for misspelling suggestion spans in InputMethodController

This CL adds support for the ImeTextSpan::Type::kMisspellingSuggestion enum
value being added in
https://chromium-review.googlesource.com/c/chromium/src/+/660689.
InputMethodController treats this value the same as kSuggestion, except that it
sets the SuggestionMarker's suggestion_type_ field to
SuggestionType::kMisspelling instead of kNotMisspelling, and won't create the
SuggestionMarker if the editable element it would be added to has spell checking
disabled.

Bug:  672259 
Change-Id: I91f1b6b0fb681fc96305a43832bd278c9cdbd12f
Reviewed-on: https://chromium-review.googlesource.com/660982
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503841}
[modify] https://crrev.com/9d091d3cbfe4d9ba9e42bf110c368ea02e24308c/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/9d091d3cbfe4d9ba9e42bf110c368ea02e24308c/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp

Project Member

Comment 33 by bugdroid1@chromium.org, Sep 22 2017

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

commit 130f534bf141da542c8370f4c5135fe5d98f1b1e
Author: Ryan Landay <rlanday@chromium.org>
Date: Fri Sep 22 20:46:02 2017

Remove misspelling suggestion markers after applying replacement

This CL makes TextSuggestionController remove suggestion markers after applying
one of their replacements if the marker's SuggestionType is kMisspelling. This
is needed to add support for Android SuggestionSpans with FLAG_MISSPELLING set,
as they should have this behavior.

Bug:  672259 
Change-Id: I485ab16d468bbb336cc160a7e04e38d24d7b026b
Reviewed-on: https://chromium-review.googlesource.com/660691
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503842}
[modify] https://crrev.com/130f534bf141da542c8370f4c5135fe5d98f1b1e/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionController.cpp
[modify] https://crrev.com/130f534bf141da542c8370f4c5135fe5d98f1b1e/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionControllerTest.cpp

Project Member

Comment 34 by bugdroid1@chromium.org, Sep 26 2017

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

commit ca7001243ad7680857c7de4311c4fdb0d472302b
Author: Ryan Landay <rlanday@chromium.org>
Date: Tue Sep 26 20:58:30 2017

Add support for Android SuggestionSpans with FLAG_MISSPELLED set

Now that we have support in Blink for suggestion markers that remove themselves
after applying a replacement, we can enable support for Android SuggestionSpans
with FLAG_MISSPELLED set.

Bug:  672259 
Change-Id: I01b9542bace2a6f9196bb1501b71062dfc35bd27
Reviewed-on: https://chromium-review.googlesource.com/679475
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504477}
[modify] https://crrev.com/ca7001243ad7680857c7de4311c4fdb0d472302b/content/browser/android/ime_adapter_android.cc
[modify] https://crrev.com/ca7001243ad7680857c7de4311c4fdb0d472302b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
[modify] https://crrev.com/ca7001243ad7680857c7de4311c4fdb0d472302b/content/public/android/javatests/src/org/chromium/content/browser/input/TextSuggestionMenuTest.java

Labels: -M-61 M-63
Status: Fixed (was: Assigned)

Sign in to add a comment