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

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

From: Alex Danilo <alex@abbra.com>
Date: Wed, 11 May 2011 16:40:17 +1000
Message-Id: <5JQ0LL.PYHFZCPO7ND@abbra.com>
To: Ryosuke Niwa <rniwa@webkit.org>
Cc: Ojan Vafai <ojan@chromium.org>, "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>
Dear Ryosuke,

	Minor correction inline:

--Original Message--:
>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.

The minimum embedding level is 0, so in 'abc CBA def', abc & def have an embedding level of 0, the
CBA has an embedding level of 1.

RTL runs can be detected by an odd embedding level.

Cheers,
Alex

>
>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 Wednesday, 11 May 2011 06:40:51 GMT

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