TextIterator::rangeFromLocationAndLength does: Position runEnd = VisiblePosition(runStart).next().deepEquivalent(); if (runEnd.isNotNull()) { ExceptionCode ec = 0; textRunRange->setEnd(runEnd.node(), runEnd.m_offset, ec); ASSERT(!ec); } runEnd may not be Range compliant.
I am only able to find "rangeFromLocationAndLength" in three files: Internals.cpp ; Internals.h ; CompositeEditCommand.cpp For the last, it was in the comment. Further, this commit delete this function - https://github.com/WebKit/WebKit/commit/b19656cfb6c28634404b0f8f9ccaf553638bedb5 Do we need to keep this open? Thanks!