Duplicate code is bad.
Created attachment 83891 [details] Patch
Attachment 83891 [details] did not build on chromium: Build output: http://queues.webkit.org/results/8032494
Comment on attachment 83891 [details] Patch Apparently I need to do some fixes for chromium so cq-. (I suspect they will be minor and if so, I'll use the r+.)
Attachment 83891 [details] did not build on chromium: Build output: http://queues.webkit.org/results/8043953
Committed as http://trac.webkit.org/changeset/79906 (with a few minor adjustments to fix the chromium build -- gyp change and moving two constants outside of the ifdef in KURL.cpp).