Spellcheck results in the middle of an inserted paragraph of text are not displayed after ending the paragraph. To reproduce: 1. Paste "Helol wrodl" into a contenteditable div or textarea. 2. Hit enter to insert a newline Expected: red underlines underneath "Helol" and "wrodl". Observed: red underlines only underneath "wrodl". Reproduces on macOS El Capitan using system Safari (possibly reproduces earlier than El Capitan).
<rdar://problem/38676081>
Created attachment 341987 [details] Patch
Comment on attachment 341987 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=341987&action=review > Source/WebCore/ChangeLog:25 > + non-contiguous spelling correction ranges â see the FIXME in markMisspellingsAfterTypingToWord for more detail. Did you mean to put a period between ranges & see? > Source/WebCore/editing/Editor.cpp:2388 > + while (sentenceStart < spellCheckingStart) { Should we be running this code in old macOS too? Does that even work? > LayoutTests/editing/spelling/retro-correction-spelling-markers.html:11 > + document.getElementById("description").innerHTML = `To manually test, type <strong>It's muhc to late Hm.. I think typeCharacterCommand should trigger spell checking in the browser too.
Comment on attachment 341987 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=341987&action=review >> Source/WebCore/ChangeLog:25 >> + non-contiguous spelling correction ranges â see the FIXME in markMisspellingsAfterTypingToWord for more detail. > > Did you mean to put a period between ranges & see? I put an emdash (—), but it seems Bugzilla's diff viewer doesn't handle unicode well :/ >> Source/WebCore/editing/Editor.cpp:2388 >> + while (sentenceStart < spellCheckingStart) { > > Should we be running this code in old macOS too? Does that even work? Yes, I believe so. This fixes an existing bug wherein pasting some text that contains misspelled words will not add document markers for the misspelled ranges. This case is covered by one of the new tests, spelling-markers-after-pasting-sentence.html. >> LayoutTests/editing/spelling/retro-correction-spelling-markers.html:11 >> + document.getElementById("description").innerHTML = `To manually test, type <strong>It's muhc to late > > Hm.. I think typeCharacterCommand should trigger spell checking in the browser too. Oh, that's a good point! I'll make it so that we automatically type out the string when opening this manually.
Created attachment 342011 [details] Patch for landing
Comment on attachment 342011 [details] Patch for landing Clearing flags on attachment: 342011 Committed r232530: <https://trac.webkit.org/changeset/232530>