bool InputMethodController::setSelectionOffsets(const PlainTextRange& selectionOffsets) { if (selectionOffsets.isNull()) return false; Element* rootEditableElement = frame().selection().rootEditableElement(); if (!rootEditableElement) return false; const EphemeralRange range = selectionOffsets.createRange(*rootEditableElement); if (range.isNull()) return false; return frame().selection().setSelectedRange(range, VP_DEFAULT_AFFINITY, SelectionDirectionalMode::NonDirectional, FrameSelection::CloseTyping); }
bool InputMethodController::setSelectionOffsets(const PlainTextRange& selectionOffsets) { if (selectionOffsets.isNull()) return false; Element* rootEditableElement = frame().selection().rootEditableElement(); if (!rootEditableElement) return false; RefPtrWillBeRawPtr<Range> range = selectionOffsets.createRange(*rootEditableElement); if (!range) return false; return frame().selection().setSelectedRange(range.get(), VP_DEFAULT_AFFINITY, FrameSelection::NonDirectional, FrameSelection::CloseTyping); }
bool InputMethodController::setSelectionOffsets(const PlainTextRange& selectionOffsets) { if (selectionOffsets.isNull()) return false; Element* rootEditableElement = m_frame.selection().rootEditableElement(); if (!rootEditableElement) return false; RefPtr<Range> range = selectionOffsets.createRange(*rootEditableElement); if (!range) return false; return m_frame.selection().setSelectedRange(range.get(), VP_DEFAULT_AFFINITY, true); }