W3C home > Mailing lists > Public > www-style@w3.org > May 2011

Re: [CSSOM] does CaretPosition need a "before/after" hint?

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Tue, 10 May 2011 22:46:32 -0700
Message-ID: <BANLkTimqEFs6xzMXs1DBP_eMUjwFASrqyQ@mail.gmail.com>
To: robert@ocallahan.org
Cc: Ojan Vafai <ojan@chromium.org>, Julie Parent <jparent@chromium.org>, Eric Seidel <eseidel@chromium.org>, "www-style@w3.org" <www-style@w3.org>, Levi Weintraub <leviw@chromium.org>, Xiaomei Ji <xji@google.com>
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

- Ryosuke
Received on Wednesday, 11 May 2011 05:47:19 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:45 UTC