[Webkit-unassigned] [Bug 144047] VisibleSelection should only accept Range by reference

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 22 09:36:18 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=144047

--- Comment #1 from Brent Fulgham <bfulgham at webkit.org> ---
It's interesting (alarming?) that there are cases in the same file (e.g., WebPage.cpp) where null checks are performed, and others where it is missed:

Example 1: (WebPage.cpp Line 4207)
void WebPage::insertTextAsync(const String& text, const EditingRange& replacementEditingRange, bool registerUndoGroup)

        RefPtr<Range> replacementRange = rangeFromEditingRange(frame, replacementEditingRange);
        if (replacementRange)
            frame.selection().setSelection(VisibleSelection(replacementRange.get(), SEL_DEFAULT_AFFINITY));


Example 2: (WebPage.cpp Line 4296)
void WebPage::setCompositionAsync(const String& text, Vector<CompositionUnderline> underlines, const EditingRange& selection, const EditingRange& replacementEditingRange)

        replacementRange = rangeFromEditingRange(frame, replacementEditingRange);
        frame.selection().setSelection(VisibleSelection(replacementRange.get(), SEL_DEFAULT_AFFINITY));

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150422/d91fe32f/attachment.html>


More information about the webkit-unassigned mailing list