- From: Ryosuke Niwa <rniwa@apple.com>
- Date: Sun, 13 Apr 2014 07:09:51 -0700
- To: Aryeh Gregor <ayg@aryeh.name>
- Cc: Domenic Denicola <domenic@domenicdenicola.com>, public-webapps <public-webapps@w3.org>, Jonas Sicking <jonas@sicking.cc>, Ted O'Connor <eoconnor@apple.com>, Ehsan Akhgari <ehsan@mozilla.com>, Yoshifumi Inoue <yosin@chromium.org>, Ben Peters <Ben.Peters@microsoft.com>, Johannes Wilm <johannes@fiduswriter.com>, Arthur Barstow <art.barstow@nokia.com>
> On Apr 13, 2014, at 5:21 AM, Aryeh Gregor <ayg@aryeh.name> wrote: > >> 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. Right, but the reason WebKit's implementation doesn't match any spec is because there is no spec! With a sufficiently precise spec, we should be able to converge at least on innerText. Having said that, I do agree we need to consult with CSS WG to have a more precise spec. for text layout in order to spec innerText. - R. Niwa
Received on Sunday, 13 April 2014 14:10:21 UTC