Bug 103520 allows to retrieve the spelling suggestions without selecting the misspelled word. We need to do the same when unified text checker is enabled.
Created attachment 184751 [details] proposed patch
Comment on attachment 184751 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=184751&action=review > Source/WebCore/editing/Editor.cpp:1781 > if (!range) > return Vector<String>(); I would prefer moving this to after if, and then called frame()->selection()->toNormalizedRange() in the else clause. > Source/WebCore/editing/Editor.cpp:1783 > + VisibleSelection wordSelection(frame()->selection()->base()); wordSelection = frame()->selection()->base() ? > Source/WebCore/editing/Editor.cpp:1786 > + ASSERT(range); I don’t think we can assert that range is always non-null.
Comment on attachment 184751 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=184751&action=review >> Source/WebCore/editing/Editor.cpp:1781 >> return Vector<String>(); > > I would prefer moving this to after if, and then called frame()->selection()->toNormalizedRange() in the else clause. Done. >> Source/WebCore/editing/Editor.cpp:1783 >> + VisibleSelection wordSelection(frame()->selection()->base()); > > wordSelection = frame()->selection()->base() ? I found two ways of constructing VisibleSelection object in WebCore: either 1) VisibleSelection wordSelection(positionObject) or 2) VisibleSelection wordSelection = VisibleSelection(positionObject). I have updated this line with second one. >> Source/WebCore/editing/Editor.cpp:1786 >> + ASSERT(range); > > I don’t think we can assert that range is always non-null. Thanks for the hint. Done.
Created attachment 185765 [details] apply Ryosuke's suggestions Ryosuke, is it ok for you now? If yes feel free to land this patch. I had to change the code a little to apply the review. I am not sure whether it can be landed without review.
Comment on attachment 185765 [details] apply Ryosuke's suggestions Yup, looks great to me.
Comment on attachment 185765 [details] apply Ryosuke's suggestions Clearing flags on attachment: 185765 Committed r141429: <http://trac.webkit.org/changeset/141429>
All reviewed patches have been landed. Closing bug.