[Webkit-unassigned] [Bug 72847] Refactoring: SpellChecker::requestCheckingFor should take Range instead of Node.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Nov 20 20:54:09 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=72847
MORITA Hajime <morrita at google.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #116023|review? |review-
Flag| |
--- Comment #2 from MORITA Hajime <morrita at google.com> 2011-11-20 20:54:10 PST ---
(From update of attachment 116023)
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()
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list