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

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

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Thu, 23 Jun 2011 11:28:38 -0700
Message-ID: <BANLkTikyevKf=uKsFJ0BHq7XWH-RQC8ooQ@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
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>
On Thu, Jun 23, 2011 at 11:06 AM, Anne van Kesteren <annevk@opera.com>wrote:

> On Wed, 11 May 2011 06:58:50 +0200, Robert O'Callahan <
> robert@ocallahan.org> wrote:
>
>> On Wed, May 11, 2011 at 3:43 AM, Ojan Vafai <ojan@chromium.org> wrote:
>>
>>> Similarly, does it need to disambiguate line-wrapped positions?
>>>
>>> "Line 1<wrap>
>>> Line 2"
>>>
>>> After Line 1 and before Line 2 are equivalent DOM positions.
>>>
>>> I think we might be able to have a single flag for both of these. The
>>> case of "Latin <wrap here>HEBREW", in which case the cursor could be at the
>>> end of the first line or the end of the second line. But being at the
>>> beginning of the first line would be a different DOM position.
>>>
>>> I expect there's a case I'm not thinking of and we might need two flags.
>>>
>>
>> We use a single flag for both, because the semantics match perfectly.
>>
>
> So suggestions for names are .attachment and .affinity neither of which
> sounds very boolean. We could do something like .isBeforeChar that returns a
> boolean or maybe .placement which either returns the string "before" or
> "after". Preferences?
>

I still don't like the fact we're mixing before/after line break and bidi
caret.  Can we have two separate API/attribute for those?  e.g. what does
beforeChar mean in the context of line break?

- Ryosuke
Received on Thursday, 23 June 2011 18:29:27 GMT

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