[webkit-dev] Status of WTFURL

Adam Barth abarth at webkit.org
Wed Oct 13 01:08:18 PDT 2010


On Wed, Oct 13, 2010 at 12:54 AM, Maciej Stachowiak <mjs at apple.com> wrote:
> On Oct 12, 2010, at 11:47 PM, Adam Barth wrote:
>> I'd like to gauge interest in the WTFURL work [1].  Currently, there
>> are two WTFURL patches that have been up for review for over a month
>> without a single comment:
>>
>> https://bugs.webkit.org/show_bug.cgi?id=45085
>> https://bugs.webkit.org/show_bug.cgi?id=45088
>>
>> That leads me to believe this work is not desired by the project.
>
> Reviewed both. I didn't know that you'd returned to this project or that you had patches pending. All you had to do was ask.

Thanks for reviewing the patches.  I'd been nudging some other folks,
but I'm happy to bug you if you're interested in reviewing these
patches.

> It is kind of hard to review the pieces without context or tests. I assume correctness issues will be flushed out later through comprehensive testing. And I can spot surface-level style issues reviewing one patch at a time. But it's hard to evaluate the design of the code without understanding the big picture. Maybe that is better done once enough code is landed that it works.

The big picture design is pretty straightforward.  We take a sequence
of characters as input.  The URLParser segments that string into the
various components of a URL (e.g., host, query, fragment).  Each
component is then fed to a specialized canonicalizer for that
component that reconstructs a canonical version of the URL, which is
then stored in the ParsedURL object together with accessors for the
component.

Each canonicalizer more or less processes the component
character-by-character.  Sometimes there are global predicates
computed over the component.  For example, the URLHostCanonicalizer
asks "is this an IP address?"  Mostly, the canonicalizers look up each
character in table to figure out whether to pass it through or
transform it in some way.

The other interesting subsystem is the one that resolves relative
URLs.  I haven't dug into that one yet, so I'm not exactly sure how it
works yet, but it seems mostly isolated from the rest of the code.

Adam


More information about the webkit-dev mailing list