[whatwg] Syntax Highlighting [was: several messages]
James Graham
jg307 at cam.ac.uk
Mon Dec 13 02:59:48 PST 2004
J. King wrote:
> On Sat, 11 Dec 2004 10:04:56 +0000, Jim Ley <jim.ley at gmail.com> wrote:
>
>> how do you expect the feature to be tested in implementations then?
>
That's a bit like saying "how do you expect to test that a UA treats an
<em> element as emphasized"? It can't be done - all that you can check
is that the UA behaves in a manner consistent with the metadata being
provided (in the case of an accept attribute that might involve e.g.
providing syntax highlighting for accept="text/html" but not for
accept="text/plain", in the case of <em> that might be a UA CSS rule of
font-style:italic;).
>> Please don't have things you know won't be implemented.
>
>
> I agree. If you expect Opera, Safari and Mozilla to implement the
> WHATWG's specifications but do not expect this particular feature to be
> implemented anytime soon by any of them, why should it be there at
> all---at least in the first version?
Needless to say I disagree.
First of all, I disagree that it will necessarily go unimplemented
(whatever "implemented" means in this case - syntax highlighting isn't
the only possible use for this feature). For a browser that uses an
existing widget toolkit it is likely that textarea implementations with
MIME type specific features already exist. For example Konqurer which, I
assume, uses the Qt widget set. Qt has syntax highlighting support in
the standard textbox control [1] and so implementing Syntax highlighting
support looks to be as simple as providing the mapping between MIME type
and QSyntaxHighlighter implementation. If Safari uses native widgets,
the situation may be similar. Admittedly, for some browsers**, this
won't be so easy to implement; if they don't feel the pressure to
provide an implementation we have no interoperability problem because
there's no way for a webpage to depend on a particular behavior.
That, really, is the crux of the argument. If the feature could cause
problems them I wouldn't advocate including it. But unlike any feature
that affects the DOM or any that affects rendering or data flow, it's
harmless in the sense that browsers can take it or leave it without
causing any difficulty for users or for designers or for anyone else.
[1] http://doc.trolltech.com/3.3/qtextedit.html
** Principally Mozilla and Opera, I suppose. These also happen to be the
browsers with which Hixie has most experience. I suppose that explains
his skepticism that syntax highlighting in particular will be
implemented in browsers soon.
More information about the whatwg
mailing list