<?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>29424</bug_id>
          
          <creation_ts>2009-09-18 07:42:52 -0700</creation_ts>
          <short_desc>[Qt] QWebFrame: When a relative url is loaded then it will make it absolute internally, however this strips out any query/fragments</short_desc>
          <delta_ts>2011-02-16 02:47:39 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Page Loading</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tor Arne Vestbø">vestbo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aparna.nand</cc>
    
    <cc>commit-queue</cc>
    
    <cc>kent.hansen</cc>
    
    <cc>kling</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>148130</commentid>
    <comment_count>0</comment_count>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2009-09-18 07:42:52 -0700</bug_when>
    <thetext>This bug report originated from issue QTBUG-3889
&lt;http://bugreports.qt.nokia.com/browse/QTBUG-3889&gt;

--- Description ---

QWebFrame: When a relative url is loaded then it will make it absolute internally, however this strips out any query/fragments</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199678</commentid>
    <comment_count>1</comment_count>
      <attachid>50712</attachid>
    <who name="Kent Hansen">kent.hansen</who>
    <bug_when>2010-03-15 08:56:10 -0700</bug_when>
    <thetext>Created attachment 50712
Testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199679</commentid>
    <comment_count>2</comment_count>
    <who name="Kent Hansen">kent.hansen</who>
    <bug_when>2010-03-15 08:56:41 -0700</bug_when>
    <thetext>Reproduced with r55986.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>225812</commentid>
    <comment_count>3</comment_count>
    <who name="Jesus Sanchez-Palencia">jesus</who>
    <bug_when>2010-05-14 07:43:36 -0700</bug_when>
    <thetext>Reproduced on Snow Leopard with Qt 4.7 trunk (HEAD 03f8f1df0d88f5ffe0b3120cffce614cbeefdb70) and WebKit trunk (r59155).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>351492</commentid>
    <comment_count>4</comment_count>
      <attachid>82506</attachid>
    <who name="Aparna Nandyal">aparna.nand</who>
    <bug_when>2011-02-15 12:37:54 -0800</bug_when>
    <thetext>Created attachment 82506
Patch for review

In function ensureAbsoluteUrl, call is made to QUrl::toLocalFile() which strips the query, fragment part out. Patch corrects this to resolve it before returning absolute url.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>351494</commentid>
    <comment_count>5</comment_count>
      <attachid>82506</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2011-02-15 12:40:05 -0800</bug_when>
    <thetext>Comment on attachment 82506
Patch for review

Needs a test. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>351922</commentid>
    <comment_count>6</comment_count>
    <who name="Aparna Nandyal">aparna.nand</who>
    <bug_when>2011-02-16 00:34:04 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (From update of attachment 82506 [details])
&gt; Needs a test. :)

Kling as discussed yesterday, I am able to write an automation test. The patch can get tested only when a relative url is passed to QWebView. But the way automation test framework is designed, the test html files are stored in resources directory and an absolute path like qrc:///resources/local.html needs to be passed. When this is passed, the code that needs to be tested is not hit. Tested the below code by passing relative url and it works fine. 

void tst_QWebView::loadRelativeUrl()
{
    QWebView view;
    QSignalSpy spy(view.page(), SIGNAL(loadFinished(bool)));

    // This is the line that should be in the final test. But its absolute path
    // QUrl url(&quot;qrc:///resources/local.html&quot;);
    
    // This url actually tests the patch
    QUrl url(&quot;local.html&quot;);

    url.setFragment(&quot;Overview&quot;);

    view.load(url);
    ::waitForSignal(&amp;view, SIGNAL(loadFinished(bool)));
    QCOMPARE(spy.count(), 1);

    QUrl loadedUrl = view.page()-&gt;mainFrame()-&gt;url();
    QVERIFY(loadedUrl.hasFragment());
}

Any suggestions to get around this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>351947</commentid>
    <comment_count>7</comment_count>
      <attachid>82506</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-02-16 02:47:34 -0800</bug_when>
    <thetext>Comment on attachment 82506
Patch for review

Clearing flags on attachment: 82506

Committed r78688: &lt;http://trac.webkit.org/changeset/78688&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>351948</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-02-16 02:47:39 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>50712</attachid>
            <date>2010-03-15 08:56:10 -0700</date>
            <delta_ts>2010-03-15 08:56:10 -0700</delta_ts>
            <desc>Testcase</desc>
            <filename>main.cpp</filename>
            <type>text/x-c++src</type>
            <size>807</size>
            <attacher name="Kent Hansen">kent.hansen</attacher>
            
              <data encoding="base64">I2luY2x1ZGUgPFF0R3VpPgojaW5jbHVkZSA8UXRXZWJLaXQ+CgpjbGFzcyBPYmplY3QgOiBwdWJs
aWMgUU9iamVjdAp7CiAgICBRX09CSkVDVApwdWJsaWM6CiAgICBPYmplY3QoUU9iamVjdCAqcGFy
ZW50ID0gMCkKICAgIHsKICAgICAgICB2aWV3ID0gbmV3IFFXZWJWaWV3OwogICAgICAgIFFPYmpl
Y3Q6OmNvbm5lY3QodmlldywgU0lHTkFMKGxvYWRGaW5pc2hlZChib29sKSksIHRoaXMsIFNMT1Qo
b25Mb2FkRmluaXNoZWQoKSkpOwogICAgICAgIFFVcmwgdXJsKCJpbmRleC5odG1sIik7CiAgICAg
ICAgdXJsLnNldEZyYWdtZW50KCJxdWVzdGlvbjEzIik7CiAgICAgICAgcURlYnVnKCkgPDwgIk9y
aWdpbmFsIChyZWxhdGl2ZSkgVVJMIHBhc3NlZCB0byBRV2ViVmlldzo6bG9hZCgpOiIgPDwgdXJs
LnRvU3RyaW5nKCk7CiAgICAgICAgdmlldy0+bG9hZCh1cmwpOwogICAgICAgIHZpZXctPnNob3co
KTsKICAgIH0KICAgIH5PYmplY3QoKSB7IGRlbGV0ZSB2aWV3OyB9Cgpwcml2YXRlIFFfU0xPVFM6
CiAgICB2b2lkIG9uTG9hZEZpbmlzaGVkKCkgewogICAgICAgIHFEZWJ1ZygpIDw8ICJGcmFtZSdz
IFVSTCBhZnRlciBsb2FkaW5nOiIgPDwgdmlldy0+cGFnZSgpLT5tYWluRnJhbWUoKS0+dXJsKCku
dG9TdHJpbmcoKTsKICAgIH0KCnByaXZhdGU6CiAgICBRV2ViVmlldyAqdmlldzsKfTsKCmludCBt
YWluKGludCBhcmdjLCBjaGFyICoqYXJndikKewogICAgUUFwcGxpY2F0aW9uIGFwcChhcmdjLCBh
cmd2KTsKICAgIE9iamVjdCBvOwogICAgcmV0dXJuIGFwcC5leGVjKCk7Cn0KCiNpbmNsdWRlICJt
YWluLm1vYyIK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>82506</attachid>
            <date>2011-02-15 12:37:54 -0800</date>
            <delta_ts>2011-02-16 02:47:34 -0800</delta_ts>
            <desc>Patch for review</desc>
            <filename>patch29424</filename>
            <type>text/plain</type>
            <size>1594</size>
            <attacher name="Aparna Nandyal">aparna.nand</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQvcXQvQXBpL3F3ZWJmcmFtZS5jcHAgYi9Tb3VyY2Uv
V2ViS2l0L3F0L0FwaS9xd2ViZnJhbWUuY3BwCmluZGV4IDA4NTNkYjMuLmFiMzg1NGQgMTAwNjQ0
Ci0tLSBhL1NvdXJjZS9XZWJLaXQvcXQvQXBpL3F3ZWJmcmFtZS5jcHAKKysrIGIvU291cmNlL1dl
YktpdC9xdC9BcGkvcXdlYmZyYW1lLmNwcApAQCAtNzMyLDcgKzczMiwxNSBAQCBzdGF0aWMgaW5s
aW5lIFFVcmwgZW5zdXJlQWJzb2x1dGVVcmwoY29uc3QgUVVybCAmdXJsKQogICAgIGlmICghdXJs
LmlzUmVsYXRpdmUoKSkKICAgICAgICAgcmV0dXJuIHVybDsKIAotICAgIHJldHVybiBRVXJsOjpm
cm9tTG9jYWxGaWxlKFFGaWxlSW5mbyh1cmwudG9Mb2NhbEZpbGUoKSkuYWJzb2x1dGVGaWxlUGF0
aCgpKTsKKyAgICAvLyBUaGlzIGNvbnRhaW5zIHRoZSBVUkwgd2l0aCBhYnNvbHV0ZSBwYXRoIGJ1
dCB3aXRob3V0IAorICAgIC8vIHRoZSBxdWVyeSBhbmQgdGhlIGZyYWdtZW50IHBhcnQuCisgICAg
UVVybCBiYXNlVXJsID0gUVVybDo6ZnJvbUxvY2FsRmlsZShRRmlsZUluZm8odXJsLnRvTG9jYWxG
aWxlKCkpLmFic29sdXRlRmlsZVBhdGgoKSk7IAorCisgICAgLy8gVGhlIHBhdGggaXMgcmVtb3Zl
ZCBzbyB0aGUgcXVlcnkgYW5kIHRoZSBmcmFnbWVudCBwYXJ0cyBhcmUgdGhlcmUuCisgICAgUVN0
cmluZyBwYXRoUmVtb3ZlZCA9IHVybC50b1N0cmluZyhRVXJsOjpSZW1vdmVQYXRoKTsKKyAgICBR
VX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