On Tue, May 10, 2011 at 10:20 PM, Robert O'Callahan <robert@ocallahan.org>wrote:
>
> Right now, scripts can only access text in logical order (e.g. ABC 123 DEF
>> is in logical order and FED 123 CBA is in visual order) and it seems like
>> adding this hint and exposing that to script will necessarily exposes some
>> information about the visual ordering of text. At that point, it seems
>> natural to expose a way to walk text in visual order.
>>
>
> I don't think we need to expose visual ordering or computed bidi levels to
> script for this flag to be useful. The most common way we use this flag is
> to compute accurate geometric caret positions. So we'd need a Web-exposed
> API to find a point or rectangle for a CaretPosition.
Same thing. Once you have a way to obtain point / rectangle for a
CaretPosition, then you can query that on each logical position in DOM to
figure out the visual order of text.
The attachment flag may also be useful if you're trying to figure out
> whether to apply some command to the following text or the preceding text
> (or both).
I don't follow. Are you saying that some editing commands depend on this
flag?
- Ryosuke