RESOLVED FIXED 72847
Refactoring: SpellChecker::requestCheckingFor should take Range instead of Node.
https://bugs.webkit.org/show_bug.cgi?id=72847
Summary Refactoring: SpellChecker::requestCheckingFor should take Range instead of Node.
Shinya Kawanaka
Reported 2011-11-20 20:18:59 PST
Current SpellChecker::requestCheckingFor takes Node as an argument. This may be too wide, so should be Range. Also, this is required to implement asynchronous spellchecker.
Attachments
Patch (8.41 KB, patch)
2011-11-20 20:36 PST, Shinya Kawanaka
no flags
Patch (8.26 KB, patch)
2011-11-20 22:00 PST, Shinya Kawanaka
no flags
Patch (8.30 KB, patch)
2011-11-20 23:30 PST, Shinya Kawanaka
no flags
Shinya Kawanaka
Comment 1 2011-11-20 20:36:34 PST
Hajime Morrita
Comment 2 2011-11-20 20:54:10 PST
Comment on attachment 116023 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=116023&action=review > Source/WebCore/editing/Editor.cpp:415 > Node* nodeToCheck = m_frame->selection()->rootEditableElement(); We can create a Range from the selection, instead of using the root editable node. It would save the size of the checked text. I don't think the change needs to be done in this patch. But registering a new bug is highly welcome ;-) > Source/WebCore/editing/Editor.cpp:416 > + RefPtr<Range> rangeToCheck = Range::create(m_frame->document(), firstPositionInNode(nodeToCheck), lastPositionInNode(nodeToCheck)); You can use PassRefPtr here. > Source/WebCore/editing/SpellChecker.cpp:-111 > -void SpellChecker::requestCheckingFor(TextCheckingTypeMask mask, Node* node) A pattern is to give a usual name to outer function and call internal one as XxInternal() or doXx()
Shinya Kawanaka
Comment 3 2011-11-20 22:00:26 PST
Hajime Morrita
Comment 4 2011-11-20 22:07:48 PST
Comment on attachment 116028 [details] Patch Looks good.
WebKit Review Bot
Comment 5 2011-11-20 22:28:21 PST
Comment on attachment 116028 [details] Patch Attachment 116028 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10533167 New failing tests: editing/pasteboard/paste-table-001.html
Shinya Kawanaka
Comment 6 2011-11-20 23:30:00 PST
WebKit Review Bot
Comment 7 2011-11-21 01:21:12 PST
Comment on attachment 116034 [details] Patch Clearing flags on attachment: 116034 Committed r100890: <http://trac.webkit.org/changeset/100890>
WebKit Review Bot
Comment 8 2011-11-21 01:21:17 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.