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

Issue 2911253003: [Reland] Allow storing multiple replacements on SpellCheckResult (Closed)

Created:
3 years, 6 months ago by rlanday
Modified:
3 years, 6 months ago
CC:
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, timvolodine
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Reland] Allow storing multiple replacements on SpellCheckResult This CL was reverted because it did not properly handle the case where a misspelling result is created with no suggested replacements. We want to preserve misspelling results that don't include any suggested replacements, but remove those that have some suggested replacements but they're all just changing between different types of apostrophes. Original CL: https://codereview.chromium.org/2848943002 Revert: https://codereview.chromium.org/2906243002 Original 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, 727172 Review-Url: https://codereview.chromium.org/2911253003 Cr-Commit-Position: refs/heads/master@{#476644} Committed: https://chromium.googlesource.com/chromium/src/+/455b156778ed1f2df63f8a14dff99399c88e475c

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix spell_check_host_impl_unittest.cc #

Total comments: 1

Patch Set 3 : Filter apostrophe logic into helper CL #

Total comments: 2

Patch Set 4 : Fix typo #

Patch Set 5 : Fix typo #

Total comments: 2

Patch Set 6 : Rebase, make changes requested by noel@ #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+228 lines, -68 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/spell_check_host_impl_unittest.cc View 1 2 3 4 5 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_unittest.cc View 2 chunks +2 lines, -2 lines 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 chunk +1 line, -0 lines 0 comments Download
M components/spellcheck/common/spellcheck_messages.h View 1 chunk +1 line, -1 line 0 comments Download
M components/spellcheck/common/spellcheck_result.h View 2 chunks +16 lines, -6 lines 0 comments Download
A components/spellcheck/common/spellcheck_result.cc View 1 chunk +25 lines, -0 lines 0 comments Download
M components/spellcheck/renderer/spellcheck.cc View 1 2 3 4 chunks +31 lines, -9 lines 0 comments Download
M components/spellcheck/renderer/spellcheck_provider_test.cc View 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 2 chunks +62 lines, -16 lines 0 comments Download
M content/shell/test_runner/mock_spell_check.cc View 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 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp View 1 2 3 4 5 4 chunks +10 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp View 1 2 3 4 5 6 2 chunks +33 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/exported/WebTextCheckingResult.cpp View 1 2 3 4 5 1 chunk +9 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/text/TextChecking.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/public/web/WebTextCheckingResult.h View 3 chunks +9 lines, -7 lines 0 comments Download

Messages

Total messages: 65 (41 generated)
rlanday
groby@, xiaochengh@, noel@: does this fix for the bug look correct? https://codereview.chromium.org/2911253003/diff/1/components/spellcheck/renderer/spellcheck.cc File components/spellcheck/renderer/spellcheck.cc (right): ...
3 years, 6 months ago (2017-05-30 18:27:15 UTC) #3
rlanday
Fixed build error in spell_check_host_impl_unittest.cc (a change was made after I landed the original CL ...
3 years, 6 months ago (2017-05-30 19:52:18 UTC) #8
Xiaocheng
lgtm with a nit. Thanks for the fix! Some off-topic discussion: 1. It doesn't seem ...
3 years, 6 months ago (2017-05-30 20:51:29 UTC) #13
rlanday
https://codereview.chromium.org/2911253003/diff/40001/components/spellcheck/renderer/spellcheck.cc File components/spellcheck/renderer/spellcheck.cc (right): https://codereview.chromium.org/2911253003/diff/40001/components/spellcheck/renderer/spellcheck.cc#newcode116 components/spellcheck/renderer/spellcheck.cc:116: std::vector<WebString> FilterReplacementSuggestions( Ok, I've filtered out this logic into ...
3 years, 6 months ago (2017-05-30 21:48:45 UTC) #15
groby-ooo-7-16
lgtm
3 years, 6 months ago (2017-05-31 00:04:15 UTC) #17
rlanday
jochen@, mkwst@: this CL is a reland of https://codereview.chromium.org/2848943002. I don't believe I've changed any ...
3 years, 6 months ago (2017-05-31 00:13:54 UTC) #21
Xiaocheng
https://codereview.chromium.org/2911253003/diff/40001/components/spellcheck/renderer/spellcheck.cc File components/spellcheck/renderer/spellcheck.cc (right): https://codereview.chromium.org/2911253003/diff/40001/components/spellcheck/renderer/spellcheck.cc#newcode121 components/spellcheck/renderer/spellcheck.cc:121: // Use the same types of appostrophes as in ...
3 years, 6 months ago (2017-05-31 02:05:25 UTC) #22
rlanday
On 2017/05/31 at 02:05:25, xiaochengh wrote: > https://codereview.chromium.org/2911253003/diff/40001/components/spellcheck/renderer/spellcheck.cc > File components/spellcheck/renderer/spellcheck.cc (right): > > https://codereview.chromium.org/2911253003/diff/40001/components/spellcheck/renderer/spellcheck.cc#newcode121 ...
3 years, 6 months ago (2017-05-31 02:14:02 UTC) #23
Mike West
Still LGTM.
3 years, 6 months ago (2017-05-31 04:47:12 UTC) #28
Noel Gordon
Lots of tests here, but no layout test or unit test complained when the original ...
3 years, 6 months ago (2017-05-31 05:46:21 UTC) #29
rlanday
On 2017/05/31 at 05:46:21, noel wrote: > Lots of tests here, but no layout test ...
3 years, 6 months ago (2017-05-31 18:48:11 UTC) #30
rlanday
On 2017/05/31 at 05:46:21, noel wrote: > https://codereview.chromium.org/2911253003/diff/80001/chrome/browser/spellchecker/spell_check_host_impl_unittest.cc > File chrome/browser/spellchecker/spell_check_host_impl_unittest.cc (right): > > https://codereview.chromium.org/2911253003/diff/80001/chrome/browser/spellchecker/spell_check_host_impl_unittest.cc#newcode91 ...
3 years, 6 months ago (2017-05-31 22:23:59 UTC) #32
Noel Gordon
On 2017/05/31 18:48:11, rlanday wrote: > On 2017/05/31 at 05:46:21, noel wrote: > > Lots ...
3 years, 6 months ago (2017-06-01 06:27:42 UTC) #36
Noel Gordon
On 2017/06/01 06:27:42, noel gordon wrote: > Yeap, please file a crbug to capture the ...
3 years, 6 months ago (2017-06-01 10:34:56 UTC) #37
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/2911253003/100001
3 years, 6 months ago (2017-06-01 11:31:00 UTC) #44
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/453130)
3 years, 6 months ago (2017-06-01 11:39:20 UTC) #46
Noel Gordon
On 2017/06/01 11:39:20, commit-bot: I haz the power wrote: > Try jobs failed on following ...
3 years, 6 months ago (2017-06-01 12:00:56 UTC) #47
Xiaocheng
On 2017/06/01 at 06:27:42, noel wrote: > On 2017/05/31 18:48:11, rlanday wrote: > > On ...
3 years, 6 months ago (2017-06-01 15:42:07 UTC) #48
rlanday
I've filed a follow-up bug to add a test case: crbug.com/728659
3 years, 6 months ago (2017-06-01 16:09:23 UTC) #49
Noel Gordon
On 2017/06/01 15:42:07, Xiaocheng wrote: > > > it does seems a little bizarre though ...
3 years, 6 months ago (2017-06-02 05:00:51 UTC) #55
Noel Gordon
On 2017/06/02 05:00:51, noel gordon wrote: > > rlanday@ > I've filed a follow-up bug ...
3 years, 6 months ago (2017-06-02 05:03:06 UTC) #58
jochen (gone - plz use gerrit)
lgtm
3 years, 6 months ago (2017-06-02 12:18:11 UTC) #59
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/2911253003/120001
3 years, 6 months ago (2017-06-02 14:42:36 UTC) #62
commit-bot: I haz the power
3 years, 6 months ago (2017-06-02 14:48:24 UTC) #65
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/455b156778ed1f2df63f8a14dff9...

Powered by Google App Engine
This is Rietveld 408576698