[whatwg] selection.modify behavior across platforms

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,
etc...

- Ryosuke

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