W3C home > Mailing lists > Public > www-style@w3.org > April 2016

Re: [cssom-view] Range.getClientRects() when the range contains part of a grapheme cluster

From: Xidorn Quan <quanxunzhen@gmail.com>
Date: Sat, 9 Apr 2016 23:28:09 +1000
Message-ID: <CAMdq698OB0+AymX7EfnqsdcW3D1JHMPkZwZ6B44T9MNLWKOSyg@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: "www-style@w3.org" <www-style@w3.org>, Koji Ishii <kojiishi@gmail.com>, Brady Duga <duga@google.com>, Yoshifumi Inoue <yosin@chromium.org>
On Sat, Apr 9, 2016 at 1:11 AM, Simon Pieters <simonp@opera.com> wrote:

> On Thu, 07 Apr 2016 13:29:34 +0200, Koji Ishii <kojiishi@gmail.com> wrote:
>
> We recently figured out that the spec[1] isn't clear when the range
>> contains part of a grapheme cluster. Our behavior for the case was
>> recently
>> changed due to some other improvements, which lead to a discussion of the
>> right behavior of getClientRects() and getBoundingClientRect().
>>
>> Could we define cases such as:
>> 1. What to do when the range contains part of a grapheme cluster.
>> 2. What to do when the range contains part of a surrogate pair.
>>
>
> I think these two should cover the whole grapheme cluster.
>

In my opinion, a range should never contain only part of a surrogate pair.
I'd suggest that browsers should force the range to be either cover the
whole pair, or none of the parts. Containing part of surrogate pair makes
no sense to me.

- Xidorn
Received on Saturday, 9 April 2016 13:29:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:02 UTC