Bug 16480
Summary: | Document::completeURL should return a KURL | ||
---|---|---|---|
Product: | WebKit | Reporter: | Brett Wilson (Google) <brettw> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | kaustubh.ra, sam |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 16485, 16487 | ||
Bug Blocks: |
Brett Wilson (Google)
Document::completeURL returns either a String or a DepricatedString. Since the output is really a URL, it should return a KURL instead.
This weirdness causes extra conversions that are not necessary and slow things down. For example, in DocLoader::requestResource:
KURL fullURL = m_doc->completeURL(url.deprecatedString());
This does a conversion to a KURL in completeURL, then does a conversion back to a DeprecatedString, then converts back to a KURL. This is a whole extra parse of the URL that's unnecessary. The String version is even sillier, since it has to convert to and from a String before calling the DepricatedString version of completeURL.
Some functions HTML* especially, need the string, but they should just get it out of the KURL if they want it.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Brett Wilson (Google)
When fixed, this will expose bug 16487 and bug 16485 which will cause a crash in DocLoader::checkForReload.
Kaustubh Atrawalkar
I guess this issue is already been fixed. Can be closed.
Brett Wilson (Google)
Yup, this was fixed at some point.