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 09:46:00 -0700
Message-ID: <BANLkTin-5hcpLdVjE3PyUOhCx6KsHXG5Aw@mail.gmail.com>
To: Ojan Vafai <ojan@chromium.org>
Cc: "Robert O'Callahan" <robert@ocallahan.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 8:59 AM, Ojan Vafai <ojan@chromium.org> wrote:

> On Tue, May 10, 2011 at 8:48 AM, Ryosuke Niwa <rniwa@webkit.org> wrote:
>
>> While WebKit does NOT currently support hinted-caret, we're planning to
>> implement such a feature in the future.  For this purpose, exposing the
>> bidi-level rather than a flag might be more useful.
>>
>
> For those of us less familiar with bidi (e.g. me), what is bidi-level and
> how is it different from a flag? Specifically, what are some cases where a
> flag is insufficient?
>

Bidirectional embedding levels are numbers assigned to each nested bidi
contexts. e.g. in abc CBA def, abc & def are at embedding level 1 and CBA is
at embedding level 2. In FED 123 CBA, embedding levels are 2, 3, and 2
respectively.  The minimum embedding level is 1 for a LTR block and 2 for a
RTL block and the maximum embedding level for both cases is 61.

When a flag is used to indicate to which text a caret belongs, script/UA
needs a mechanism to convert that to logical node, offset pair because
that's the only way scripts can access text now.  And I don't know if we
have such a mechanism in CSSDM or HTML DOM yet.

Also, if we're adding this flag/bidi-level, we probably need to expose
>> visual ordering of text as well.  Is there any mechanism proposed to do
>> such?
>>
>
> This sounds like a whole separate discussion, but I'm not sure what you
> mean by a mechanism to "expose visual ordering of text."
>

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.

- Ryosuke
Received on Tuesday, 10 May 2011 16:46:48 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:40 GMT