Re: Spec'ing innerText (Was Re: [Editing] Splitting Selection API Into a Separate Specification)

On Fri, Apr 11, 2014 at 9:05 PM, Ryosuke Niwa <rniwa@apple.com> wrote:
> Thanks for the pointer.
>
> Unfortunately, we might need to take a slightly different approach more based on the CSS box tree because whitespace collapsing, etc... are defined in CSS2.1 and CSS level 3 specifications.

As far as I know, CSS does not define the box tree with nearly enough
precision to allow basing a precise innerText spec on it.  From
black-box testing at the time I wrote the spec, it seemed to me that
WebKit's implementation was built on some sort of internal CSS
representation that does not match anything that currently exists in
spec-land.  So I'm skeptical of the feasibility of this approach until
someone rewrites CSS in a more precise fashion.  I also don't know if
all implementations could support such an approach at all -- IIRC, I
was told that for Gecko to even support display:none in
Selection.toString was difficult.

But I'm not a CSS expert by any means, so I could well be entirely
wrong.  The approach I took in my abortive spec attempt is certainly
not good at all (which is part of why it was abortive).

Received on Sunday, 13 April 2014 12:22:25 UTC