<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>16480</bug_id>
          
          <creation_ts>2007-12-17 14:23:17 -0800</creation_ts>
          <short_desc>Document::completeURL should return a KURL</short_desc>
          <delta_ts>2011-09-12 09:53:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>16485</dependson>
    
    <dependson>16487</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brett Wilson (Google)">brettw</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>kaustubh.ra</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64567</commentid>
    <comment_count>0</comment_count>
    <who name="Brett Wilson (Google)">brettw</who>
    <bug_when>2007-12-17 14:23:17 -0800</bug_when>
    <thetext>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-&gt;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64581</commentid>
    <comment_count>1</comment_count>
    <who name="Brett Wilson (Google)">brettw</who>
    <bug_when>2007-12-17 14:49:26 -0800</bug_when>
    <thetext>When fixed, this will expose bug 16487 and bug 16485 which will cause a crash in DocLoader::checkForReload.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>465564</commentid>
    <comment_count>2</comment_count>
    <who name="Kaustubh Atrawalkar">kaustubh.ra</who>
    <bug_when>2011-09-12 04:29:25 -0700</bug_when>
    <thetext>I guess this issue is already been fixed. Can be closed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>465643</commentid>
    <comment_count>3</comment_count>
    <who name="Brett Wilson (Google)">brettw</who>
    <bug_when>2011-09-12 09:53:59 -0700</bug_when>
    <thetext>Yup, this was fixed at some point.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>