[webkit-dev] Using Google-URL in WebKit

Maciej Stachowiak mjs at apple.com
Thu Oct 2 14:23:43 PDT 2008


On Oct 2, 2008, at 1:07 PM, Brett Wilson wrote:

> About a year ago, Google released the Google URL Parsing and
> Canonicalization Library (Google-URL) as a separate open-source
> project: http://code.google.com/p/google-url  It was developed for
> Chromium with an eye toward being used in other client apps at Google
> and elsewhere.
>
> We think there are a number of advantages of this library over the
> current KURL code, but I'm not trying to sell anybody on using it or
> have a big debate about its merits at this time. (Our most important
> constraint is that we want our application layer and our WebKit layer
> to agree on parsing for security and other types of "mismatch" bugs.)
>
> I have mentioned optionally replacing KURL with an ifdef to a number
> of WebKit members. The reception has been tentatively yes.

As one of the people who were asked and tentatively said yes, I would  
like to clarify that my agreement was conditional. Specifically, I'm  
ok with this as a temporary measure, as long as we are on track to  
eventually have a unified URL implementation. I think having our long- 
term solution be an ifdef to have two completely separate  
implementations of such a simple class (<2000 lines of code for the  
current WebKit implementation) would be extremely silly. Also, we have  
plans to significantly redesign the interface of KURL, and having it  
ifdef'd to two different implementations will make that quite a bit  
harder. Also, the URL code is often a source of security or  
performance issues, and fixing them twice is a cost to the whole  
project.

To clarify "on track to eventually have a unified URL implementation",  
I specifically mean:

1) The Chromium engineers responsible for this area of code would  
agree in principle that we should work towards a unified URL parsing  
implementation.

2) We would have at least a rough outline for how the unification  
could happen. I think two plausible approaches are: (a) fix KURL to  
satisfy the requirements that drove the creation of Google-URL and  
drop the Google-URL fork of KURL; (b) integrate Google-URL into the  
WebKit project and drop the original code for KURL. As far as I am  
concerned, both of these options are on the table and the  
determinations should be made by criteria like performance,  
correctness, code quality, etc. I consider the option of completely  
replacing WebKit's URL implementation with an external dependency to  
be a nonstarter.

3) We would agree on a rough timeline on which we plan to make the  
unification happen; if it hasn't happened by then we'll plan to  
revisit this issue.

Once we are set on points 1-3, I am ok with landing ifdefs as a  
transitional measure. Until then, I am not ok with such a change.

Regards,
Maciej



More information about the webkit-dev mailing list