On Tuesday 09 March 2010 ext Holger Freyther, wrote: > Hi All, > > I have a small issue with our current QWebPage::userAgentForUrl > implementation. It is obviously called for the main URL, the favicon.ico > but if I'm not mistaken also for every subresource. > > Every time it is called we are doing the following: > 1.) We take the WebCore::String of the KURL and turn it > into a QByteArray. > 2.) We ask QUrl to parse this QByteArray. > 3.) Pass it into the virtual function. > > I have created this bug[1] with an alternative API. For me the main usecase > of this function is user agent spoofing for an entire website. This is why > I was adding a setUserAgent method. It needs to be set before opening a > webpage and then applies to all following loads. > > The cost of the API is the onetime conversion of QString to WebCore::String > and then we can handle the user agent requests of WebCore inside the > FrameLoaderClient class. It would be nice if you could measure the > difference of using the old API vs, new API on a n900.
It's sad that we can't make things faster out of the box, but I certainly see the benefit of the more convenient API. I'm in favour of adding the two functions to QWebPage. Any other opinions? Simon
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ webkit-qt mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
