[WebKit-devel] Reviewing kdewebkit

Dawit A. adawit at kde.org
Thu Nov 12 06:11:06 CET 2009


On Wednesday 11 November 2009 23:45:48 Dawit A. wrote:
> On Wednesday 11 November 2009 21:21:24 Andrea Diamantini wrote:
> > Hi all,
> >
> > Today I tried having a mini review of kdewebkit lib and API. I came out
> >  with a lot of questions and (probably) no real hints :) Anyway, here you
> >  are firsts:
> >
> > 1.
> > I noticed the private implementation of KIO::AccessManager does an heavy
> >  use of its parent, calling it for every createRequest() call. Shouldn't
> > be better adding a KWebPage pointer there and using it?
> 
> That can and probably will be remedied. It was orignally implemented to
>  simply guard against someone setting the parent at a later point than the
>  construction of the object. However, I doubt we need to worry about such
>  corner cases specially when it can potentially have adverse impact on
>  performance...

I just tested this and actually I take back what I said. It is correct the way 
it is right now.  The reason it is that way is because you can easily cause 
crashes if you hold a pointer to the parent (even a QPointer)...

Frankly speaking I did not like this solution  because it creates circular 
dependency between these two classes, eventhough I came up with it myself. 
However, I could not find any other method of adding a generic url filtering 
mechanism to KWebPage that enables the implementation of ad blocking, content 
filtering, etc support in KWebPage and/or inheriting classes...



More information about the WebKit-devel mailing list