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

List:       kfm-devel
Subject:    Re: khtml component
From:       Lars Knoll <knoll () kde ! org>
Date:       2001-05-31 15:46:57
[Download RAW message or body]

On Thursday 31 May 2001 17:32, Ben Blaukopf wrote:
> On Thu, 31 May 2001, Simon Hausmann wrote:
> > On Wed, May 30, 2001 at 02:45:31PM +0100, Ben Blaukopf wrote:
> > > Hi Simon,
> > >
> > > Firstly, I've been playing with implementing access keys. Since I view
> > > access keys as a document property rather than an individual node
> > > property, I've made each node, as it parses the access key field,
> > > register itself with the document under that access key. The khtmlview
> > > then queries the document to find out how to handle a particular key
> > > press. I've done a test implementation and it seems to work fine - I
> > > just wanted to check this was the correct design before I implement it
> > > properly.
> >
> > Great! CC'ing to kfm-devel, that's where the khtml hackers reside :-)
>
> I shall find it and subscribe...
>
> > > I've quoted the relevant bit of iterating code below. What I don't get
> > > is that the code iterates over every node, even when a match has been
> > > found. Surely the code could break out of the loop as soon as the
> > > correct child node had been identified?
> >
> > I believe such an optimization would break the execution of javascript
> > on* events under certain circumstances.
>
> Hmmm. I can see that it would break anything which wanted to know that it
> was no longer under the mouse. Unless there's another mechanism for
> notification of that event.
>
> It strikes me that it's not the most efficient way of doing things, but I
> guess other solutions would mess up the design. And it is a nice design.
> At least compared to viewml :)
>
> But I'm not using Javascript, and neither are a good few other people
> using konq, judging by the mailing list.
>
> Could we have an
> #ifndef ENABLE_JAVASCRIPT
> break out of loop early
> #else
> do the whole lot
> #endif
>
> or is that getting a bit untidy?

Please not at compile time. We could easily do that at runtime (you can 
disable jscript site specific), by asking the corresponding part if jscript 
is enabled or not. I'm however not sure if it's worth it or could have other 
side effects.

Lars

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

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