Given a DOM Node and an InlineBox, is there a way to convert the character offset within this InlineBox to a VisiblePosition? considering bidi/RTL.
Using <span> node in the following example as an example: <div contenteditable dir=rtl>abc ששש def <span dir=ltr>שנב abc סטז</span> uvw זזז xyz</div> Assume the <span> node is node A, using "(node, offset)a" to represent the node and offset information of Position when caret is before character "a", the position information are: ...... (A, 4)a(A, 5)b(A, 6)c(A, 7) (A, 0xb)ז(A, 0xa)ט(A, 9)ס(A, 8). Given the <span> node, the InlineBox representing " abc "(with surrounding spaces), and character offset 5 within the InlineBox, is there a way to convert offset 5 into VisiblePosition (A, 0xb) (not (A, 8))? which means when caret is placed after the 2nd space in " abc ", the visible position is (A, 0xb). Thanks, Xiaomei
_______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

