[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: khtml
From:       Dawit Alemayehu <adawit () earthlink ! net>
Date:       1999-06-04 15:31:54
[Download RAW message or body]

On Mon, 31 May 1999, Waldo Bastian wrote:
>Lars Knoll wrote:
> 
> On Mon, 31 May 1999, Waldo Bastian wrote:
> > I added a 'plaintext' mode for KHTML. The idea is that the HTMLWidget can also
> > act as a sort of kless. I hope to add automatic URL-highlighting as well.
> > (e.g. e-mail addresses and URL's should become clickable).
> 
> Nice. But just to be sure. Don't you think that should be handled by a
> different widget? Konqueror does anyway call different widgets, according
> to mime type.

> Hmmm.. Perhaps. KHTML basically has all the functionality for it. So
> we get it almost for free. 

In my previous life I had some experience helping design an HTML rendering
engine in Java.  What I have learned from that endavour is that when designing
rendering engines, it is best to design them to do just one thing  ( much like
a single Lego piece ).  The advantage here is that if you or someone else
decides to redo the HTML rendering engine, they can do so without having
to mess around with the other engines.  Thus, each piece then obviously can
upgraded/improved at its own pace.  IMHO this is also easier to maintain than
having everything built in ...

> > I wanted to add the HTML-tag 'plain' or 'plaintext' for this, but I don't
> > have gperf so I have just added it to the khtmltags.h.
> 
> I could run gperf and add it.

> I guess it should be renamed to PLAINTEXT, since this is an old HTML-tag
> which does about the same. 
 
> > Do you think this is a usefull feature to have?
> 
> Having plain text display is for sure a useful feature. I'm just not sure,
> if we should have in in khtml or make some separate widget. Anyway, I'll
> have a look at your code this evening.

> The only problem I can see is that it's not very memory efficient.
> Looking at a 700Kb file takes 2.1Mb of memory.

> On the plus side, it would be quite easy to view files with
> different charsets, including true unicode. (Although for plain
> text-files the charset-detection will most likely not work)

I have not had a chance to look at any of the code for khtml yet, but don't you
think that drawbacks outweigh the benefits in this case ?  Many applications
including konqueror IIRC will only call upon khtml for HTML parsing and
rendering service and not plaintext stuff.  

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic