[webkit-reviews] review denied: [Bug 72847] Refactoring: SpellChecker::requestCheckingFor should take Range instead of Node. : [Attachment 116023] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Nov 20 20:54:09 PST 2011
MORITA Hajime <morrita at google.com> has denied Shinya Kawanaka
<shinyak at google.com>'s request for review:
Bug 72847: Refactoring: SpellChecker::requestCheckingFor should take Range
instead of Node.
https://bugs.webkit.org/show_bug.cgi?id=72847
Attachment 116023: Patch
https://bugs.webkit.org/attachment.cgi?id=116023&action=review
------- Additional Comments from MORITA Hajime <morrita at google.com>
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()
More information about the webkit-reviews
mailing list