On spellchecking, TextCheckingResult contains a replacement text which can be used both for an automatic replacement and for showing a suggestion. But when marking a misspelled word, Editor uses only the misspelled range data but discards the replacement value. Then it asks the same value again when showing suggestion/autocorrection. It would be great if the marker holds the replacement text and Editor can use it on suggesting a correction, without any re-asking. This is especially true in the case when we need IPC messaging to spelling correction: We can save one roundtrip by doing this.
Created attachment 125967 [details] Patch
Kent-san, Ryosuke, could you take a look? We need this for reducing round-trip over IPC.
Comment on attachment 125967 [details] Patch Attachment 125967 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/11459208
Created attachment 125992 [details] Patch
Comment on attachment 125992 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=125992&action=review > Source/WebCore/testing/Internals.h:84 > + String markerDescriptionForNode(Node*, const String&, unsigned, ExceptionCode&); nit: We shouldn't omit the argument names of 2nd and 3rd arguments. It's hard to understand what they are. > Source/WebCore/testing/Internals.h:118 > + DocumentMarker* markerAt(Node*, const String&, unsigned, ExceptionCode&); ditto. > LayoutTests/editing/spelling/spelling-marker-description.html:43 > + window.setTimeout(function() { verify(nretry-1); }, 0); nit: Should have whitespace around '-'.
(In reply to comment #0) > On spellchecking, TextCheckingResult contains a replacement text > which can be used both for an automatic replacement and for showing a suggestion. > > But when marking a misspelled word, Editor uses only the misspelled range data > but discards the replacement value. Then it asks the same value again > when showing suggestion/autocorrection. > > It would be great if the marker holds the replacement text > and Editor can use it on suggesting a correction, without any re-asking. > This is especially true in the case when we need IPC messaging to spelling correction: > We can save one roundtrip by doing this. It would be helpful if ChangeLog has such information.
Kent-san, thanks for taking a review for this! I'll address these points before landing.
Committed r107176: <http://trac.webkit.org/changeset/107176>
editing/spelling/spelling-marker-description.html still fails, and is on the Skipped list.
(In reply to Simon Fraser (smfr) from comment #9) > editing/spelling/spelling-marker-description.html still fails, and is on the > Skipped list. Still on SKIP list: https://github.com/WebKit/WebKit/blob/95606b13126e82a5cf2534a05e107d0aa69ccc0a/LayoutTests/platform/win/TestExpectations#L1610 and this seems to have landed in this commit: https://github.com/WebKit/WebKit/commit/7c6135b1f0fb885d404a2e8678715cc5dbf6747e Since original bug is fixed, can we mark this as "RESOLVED FIXED" and for skipped test, we have another bug? Thanks!