Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Issue 2848943002: Allow storing multiple replacements on SpellCheckResult (Closed)

Created:
3 years, 7 months ago by rlanday
Modified:
3 years, 6 months ago
CC:
Xiaocheng, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, groby+blinkspell_chromium.org, groby+spellwatch_chromium.org, jam, jochen+watch_chromium.org, kinuko+watch, mac-reviews_chromium.org, mlamouri+watch-content_chromium.org, Peter Beverloo, rlp+watch_chromium.org, rouslan+spell_chromium.org, please use gerrit instead, timvolodine
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow storing multiple replacements on SpellCheckResult I'm working on adding support for the Android spellcheck suggestion list that appears in a native text box when you tap on a misspelled word. It appears that I need to modify this piece of infrastructure to support passing multiple suggestions through to the Spelling marker that gets added. For reference, we construct the SpellCheckResult objects from the Android spellchecker results in SpellCheckerSessionBridge::ProcessSpellCheckResults(). Alternatively, ContextMenuClientImpl has logic for calling the spellchecker again to get the list of suggestions that we might be able to use: https://chromium.googlesource.com/chromium/src/+/adc8910776c64a876f0422454da618a37d01167b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp#346 However, I talked to aelias and he said it would be better to store the suggestions the first time we call the spellchecker, at the time we add the marker, to avoid going back and forth unnecessarily. BUG=715365 Review-Url: https://codereview.chromium.org/2848943002 Cr-Commit-Position: refs/heads/master@{#475058} Committed: https://chromium.googlesource.com/chromium/src/+/c45f50742410a644a054325478d885e61d286713

Patch Set 1 #

Total comments: 7

Patch Set 2 : Respond to comments #

Total comments: 1

Patch Set 3 : Fix build error #

Patch Set 4 : Attempt to fix Windows build #

Patch Set 5 : Change back to original quote replacement behavior, update tests #

Total comments: 1

Patch Set 6 : Change behavior per discussion with groby, add her test case #

Patch Set 7 : Rebase on header include codemod #

Patch Set 8 : Consolidate test cases #

Patch Set 9 : Make proposed change #

Patch Set 10 : Undo change I meant to make on another branch #

Patch Set 11 : Rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+203 lines, -67 lines) Patch
M chrome/browser/renderer_context_menu/spelling_menu_observer.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_unittest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_message_filter_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/spellchecker/spelling_service_client_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/spellcheck/common/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M components/spellcheck/common/spellcheck_messages.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M components/spellcheck/common/spellcheck_result.h View 1 2 chunks +16 lines, -6 lines 0 comments Download
A components/spellcheck/common/spellcheck_result.cc View 1 1 chunk +25 lines, -0 lines 0 comments Download
M components/spellcheck/renderer/spellcheck.cc View 1 2 3 4 5 3 chunks +19 lines, -9 lines 1 comment Download
M components/spellcheck/renderer/spellcheck_provider_test.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M components/spellcheck/renderer/spellcheck_provider_unittest.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M components/spellcheck/renderer/spellcheck_unittest.cc View 1 2 3 4 5 6 7 2 chunks +57 lines, -16 lines 0 comments Download
M content/shell/test_runner/mock_spell_check.cc View 2 1 chunk +6 lines, -6 lines 0 comments Download
M content/shell/test_runner/spell_check_client.cc View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp View 1 2 3 4 5 6 7 8 9 10 4 chunks +10 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp View 1 2 chunks +31 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/text/TextChecking.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebTextCheckingResult.cpp View 1 chunk +8 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/public/web/WebTextCheckingResult.h View 1 2 3 4 5 6 3 chunks +9 lines, -7 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 84 (54 generated)
rlanday
groby: adding you as a spellcheck OWNER. I'm working on adding support for the Android ...
3 years, 7 months ago (2017-04-28 18:10:01 UTC) #4
rlanday
For reference, this is what the next step, to actually pass the results through from ...
3 years, 7 months ago (2017-04-28 18:12:22 UTC) #5
groby-ooo-7-16
FWIW: By now, Render- and Browser-side spellcheckers have pretty much the same API. I haven't ...
3 years, 7 months ago (2017-04-28 23:45:55 UTC) #8
rlanday
https://codereview.chromium.org/2848943002/diff/1/components/spellcheck/renderer/spellcheck.cc File components/spellcheck/renderer/spellcheck.cc (right): https://codereview.chromium.org/2848943002/diff/1/components/spellcheck/renderer/spellcheck.cc#newcode489 components/spellcheck/renderer/spellcheck.cc:489: if (skip_these_replacements) On 2017/04/28 at 23:45:55, groby wrote: > ...
3 years, 7 months ago (2017-05-01 20:40:01 UTC) #9
groby-ooo-7-16
On 2017/05/01 20:40:01, rlanday wrote: > https://codereview.chromium.org/2848943002/diff/1/components/spellcheck/renderer/spellcheck.cc > File components/spellcheck/renderer/spellcheck.cc (right): > > https://codereview.chromium.org/2848943002/diff/1/components/spellcheck/renderer/spellcheck.cc#newcode489 > ...
3 years, 7 months ago (2017-05-01 20:45:24 UTC) #10
rlanday
Updated https://codereview.chromium.org/2848943002/diff/1/components/spellcheck/common/spellcheck_result.h File components/spellcheck/common/spellcheck_result.h (right): https://codereview.chromium.org/2848943002/diff/1/components/spellcheck/common/spellcheck_result.h#newcode27 components/spellcheck/common/spellcheck_result.h:27: Decoration d = SPELLING, On 2017/04/28 at 23:45:55, ...
3 years, 7 months ago (2017-05-01 23:25:07 UTC) #11
rlanday
Looks like all the trybots are finally passing again :)
3 years, 7 months ago (2017-05-03 17:57:42 UTC) #27
groby-ooo-7-16
+rouslan, who's more familiar with the curly apostrophe handling. Rouslan: Am I misunderstanding our handling ...
3 years, 7 months ago (2017-05-08 15:31:22 UTC) #29
please use gerrit instead
On 2017/05/08 15:31:22, groby wrote: > +rouslan, who's more familiar with the curly apostrophe handling. ...
3 years, 7 months ago (2017-05-08 15:40:31 UTC) #30
please use gerrit instead
At the time of my work on spellcheck, SpellCheck::CreateTextCheckingResults() was called only for spellcheck results ...
3 years, 7 months ago (2017-05-08 15:42:19 UTC) #31
rlanday
On 2017/05/08 at 15:31:22, groby wrote: > What we currently do is that for all ...
3 years, 7 months ago (2017-05-09 17:45:03 UTC) #34
rlanday
Updated
3 years, 7 months ago (2017-05-09 19:10:07 UTC) #36
rlanday
https://codereview.chromium.org/2848943002/diff/80001/third_party/WebKit/public/web/WebTextCheckingResult.h File third_party/WebKit/public/web/WebTextCheckingResult.h (right): https://codereview.chromium.org/2848943002/diff/80001/third_party/WebKit/public/web/WebTextCheckingResult.h#newcode36 third_party/WebKit/public/web/WebTextCheckingResult.h:36: #include "../platform/WebVector.h" aelias, question for you since you're a ...
3 years, 7 months ago (2017-05-17 22:23:58 UTC) #41
rlanday
On 2017/05/17 at 22:23:58, rlanday wrote: > https://codereview.chromium.org/2848943002/diff/80001/third_party/WebKit/public/web/WebTextCheckingResult.h > File third_party/WebKit/public/web/WebTextCheckingResult.h (right): > > https://codereview.chromium.org/2848943002/diff/80001/third_party/WebKit/public/web/WebTextCheckingResult.h#newcode36 ...
3 years, 7 months ago (2017-05-17 22:28:31 UTC) #42
rlanday
groby: I looked at your test case and the behavior you want for the quote ...
3 years, 7 months ago (2017-05-18 02:20:37 UTC) #45
groby-ooo-7-16
On 2017/05/18 02:20:37, rlanday wrote: > groby: I looked at your test case and the ...
3 years, 7 months ago (2017-05-22 14:47:51 UTC) #52
rlanday
Ok, I've consolidate the test cases
3 years, 7 months ago (2017-05-22 20:37:18 UTC) #55
groby-ooo-7-16
lgtm
3 years, 7 months ago (2017-05-25 21:36:14 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2848943002/180001
3 years, 7 months ago (2017-05-25 22:00:29 UTC) #64
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-clang/builds/104369) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 7 months ago (2017-05-25 22:04:03 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2848943002/200001
3 years, 7 months ago (2017-05-25 22:18:11 UTC) #69
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/448018)
3 years, 7 months ago (2017-05-25 22:30:46 UTC) #71
rlanday
Looks like I need a couple more OWNERS to review this CL: jochen@, can you ...
3 years, 7 months ago (2017-05-25 22:38:43 UTC) #74
Mike West
Changing IPC from a string to a vector LGTM.
3 years, 7 months ago (2017-05-26 04:52:59 UTC) #75
jochen (gone - plz use gerrit)
lgtm
3 years, 7 months ago (2017-05-26 11:38:04 UTC) #76
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2848943002/200001
3 years, 7 months ago (2017-05-26 16:34:36 UTC) #78
commit-bot: I haz the power
Committed patchset #11 (id:200001) as https://chromium.googlesource.com/chromium/src/+/c45f50742410a644a054325478d885e61d286713
3 years, 7 months ago (2017-05-26 18:07:28 UTC) #81
Noel Gordon
A revert of this CL (patchset #11 id:200001) has been created in https://codereview.chromium.org/2906243002/ by noel@chromium.org. ...
3 years, 6 months ago (2017-05-29 03:27:07 UTC) #82
Xiaocheng
https://codereview.chromium.org/2848943002/diff/200001/components/spellcheck/renderer/spellcheck.cc File components/spellcheck/renderer/spellcheck.cc (right): https://codereview.chromium.org/2848943002/diff/200001/components/spellcheck/renderer/spellcheck.cc#newcode499 components/spellcheck/renderer/spellcheck.cc:499: if (replacements_adjusted.empty()) This is the culprit of crbug.com/727172: If ...
3 years, 6 months ago (2017-05-29 04:00:31 UTC) #83
rlanday
3 years, 6 months ago (2017-05-29 17:13:27 UTC) #84
Message was sent while issue was closed.
Thanks for finding that, xiaochengh@. I apologize for the bug. I will re-upload
a fixed version of the CL tomorrow (today is a US holiday).

Powered by Google App Engine
This is Rietveld 408576698