[webkit-dev] Disjointed selection ranges

Ryosuke Niwa rniwa at webkit.org
Tue Aug 14 15:36:53 PDT 2012


On Tue, Aug 14, 2012 at 3:28 PM, Glenn Adams <glenn at skynav.com> wrote:
>
> On Tue, Aug 14, 2012 at 1:43 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
>
>> On Tue, Aug 14, 2012 at 1:14 PM, Glenn Adams <glenn at skynav.com> wrote:
>>
>>>
>>> On Tue, Aug 14, 2012 at 12:25 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
>>>
>>>> On Tue, Aug 14, 2012 at 11:51 AM, Shezan Baig <shezbaig.wk at gmail.com>wrote:
>>>>>
>>>>> We are using embedded WebKit in our application, and we need to be
>>>>> able to use disjointed selection ranges for table editing.  I was
>>>>> wondering whether anybody is currently working on implementing this,
>>>>> and is there any bug number for it?  If not, I will attempt to
>>>>> implement it based on the approach described by Eric in [1] and [2].
>>>>>
>>>>
>>>> I don't think we should implement general multi-range selection. It
>>>> causes all sorts of hell in editing.
>>>>
>>>
>>> keep in mind that you need this or something much like it to handle
>>> correct selection in some complex scripts (e.g., indic scripts) as well as
>>> bidi contexts
>>>
>>
>> What do you mean by "correct"?
>>
>
> I mean understandable and repeatable.
>
>
>> Selection in bidirectional text follow logical order on all major
>> browsers although Gecko supports a non-default option to use visual-order
>> selection. I've talked with many native RTL speakers who have a lot of
>> experience working with bidirectional text but they almost unanimously
>> agreed that selecting text in visual order is a bad idea.
>>
>
> In my experience working with middle eastern and indic display and editing
> systems, both (logical and visual selection) modes have legitimate uses,
> and one mode should not be eliminated simply because there may be a
> majority (of a random sample) that prefers one mode. Personally, I use both
> modes for different reasons.
>
>
>> Also, when you copy the text selected by visual order and pasting it to
>> somewhere else, we need to somehow serialize the text and the algorithm by
>> which to do this is not well defined.
>>
>
> Agreed. Existing specs covering browser behavior do not define this very
> well. My point in bringing it up was simply that there are legitimate use
> cases for supporting disjoint, multi-range selection.
>

I have to admit there are some valid use cases for supporting multi-range
selection but the complexity it adds to our codebase is unjustifiable.
Gecko has tried this for a decade but they're now trying to get rid of it.
See https://bugzilla.mozilla.org/show_bug.cgi?id=753718.

- Ryosuke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120814/58edc6a3/attachment.html>


More information about the webkit-dev mailing list