W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2011

[whatwg] selection.modify behavior across platforms

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Mon, 28 Mar 2011 22:22:21 -0700
Message-ID: <AANLkTimuF7jNLYaCTtDYnmMx4sdz7u3A6mQRORCvD-KE@mail.gmail.com>
On Mon, Mar 28, 2011 at 3:57 PM, Ehsan Akhgari <ehsan at mozilla.com> wrote:
>  > I'd also point out that queryCommandValue and queryCommandState in
> > WebKit return different values depending on platforms.
> Do you know more details on this?  Which commands have this platform
> specific behavior?  And why does Webkit do different things on different
> platforms here?

Yes. I wouldn't go into the details but the algorithm to decide whether or
not style is present is different on Mac and non-Mac platforms. In WebKit,
we try our best to match our editing behaviors to each platform to make it
feel native (disclaimer: it's my personal view).

Selection behavior is also different on Mac and non-Mac platforms. When a
user sets selection using a pointing device on Mac, the resultant selection
is directionless and behaves differently than a directional selection when a
user or modify() modifies the selection. On non-Mac platforms, selection is
always directional. On GTK and Qt ports, we also support caret browsing and
enabling this feature changes constraints on where a user can put caret,

- Ryosuke
Received on Monday, 28 March 2011 22:22:21 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:31 UTC