<?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>82995</bug_id>
          
          <creation_ts>2012-04-02 19:26:00 -0700</creation_ts>
          <short_desc>[Qt] Delayed availability of QtWebFrame::url() and confusing semantics of QtWebPage::loadFinished()</short_desc>
          <delta_ts>2014-02-03 03:20:31 -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>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Matt Horan">matt</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bruno.abinader</cc>
    
    <cc>matt</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>594143</commentid>
    <comment_count>0</comment_count>
    <who name="Matt Horan">matt</who>
    <bug_when>2012-04-02 19:26:00 -0700</bug_when>
    <thetext>Between QtWebKit 2.1 and 2.2 the following was change was made to QtWebKit: https://bugs.webkit.org/show_bug.cgi?id=41165.

This changes the availability of QtWebFrame::url() such that at the time replyFinished() is fired by a custom QNetworkAccessManager, the current frame does not yet have a URL (and seemingly doesn&apos;t have a document(), hence why it doesn&apos;t have a url()).

This has manifested itself in the capybara-webkit driver for Ruby: http://git.io/at1AuQ#L189.

I began to put together a workaround that would delay processing of the QNetworkReply until loadFinished() was fired by the custom QWebPage.  However, it seems that loadFinished() is fired by QWebPage before QWebFrame::url() is available as well.  In fact, if you bind to loadFinished() of QWebPage::currentFrame(), it fires after loadFinished() of the QWebPage has fired.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>654462</commentid>
    <comment_count>1</comment_count>
    <who name="Bruno Abinader (history only)">bruno.abinader</who>
    <bug_when>2012-06-21 06:49:52 -0700</bug_when>
    <thetext>Have you tried &quot;urlChanged&quot; signal from QWebFrame? It seems the most reliable way to know when a URL is actually set.

(In reply to comment #0)
&gt; Between QtWebKit 2.1 and 2.2 the following was change was made to QtWebKit: https://bugs.webkit.org/show_bug.cgi?id=41165.
&gt; 
&gt; This changes the availability of QtWebFrame::url() such that at the time replyFinished() is fired by a custom QNetworkAccessManager, the current frame does not yet have a URL (and seemingly doesn&apos;t have a document(), hence why it doesn&apos;t have a url()).
&gt; 
&gt; This has manifested itself in the capybara-webkit driver for Ruby: http://git.io/at1AuQ#L189.
&gt; 
&gt; I began to put together a workaround that would delay processing of the QNetworkReply until loadFinished() was fired by the custom QWebPage.  However, it seems that loadFinished() is fired by QWebPage before QWebFrame::url() is available as well.  In fact, if you bind to loadFinished() of QWebPage::currentFrame(), it fires after loadFinished() of the QWebPage has fired.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>655102</commentid>
    <comment_count>2</comment_count>
    <who name="Matt Horan">matt</who>
    <bug_when>2012-06-21 18:09:42 -0700</bug_when>
    <thetext>I had tried this as well, but it didn&apos;t seem to work as expected.  I&apos;m still confused as to why loadFinished would fire before the URL is available.

(In reply to comment #1)
&gt; Have you tried &quot;urlChanged&quot; signal from QWebFrame? It seems the most reliable way to know when a URL is actually set.
&gt; 
&gt; (In reply to comment #0)
&gt; &gt; Between QtWebKit 2.1 and 2.2 the following was change was made to QtWebKit: https://bugs.webkit.org/show_bug.cgi?id=41165.
&gt; &gt; 
&gt; &gt; This changes the availability of QtWebFrame::url() such that at the time replyFinished() is fired by a custom QNetworkAccessManager, the current frame does not yet have a URL (and seemingly doesn&apos;t have a document(), hence why it doesn&apos;t have a url()).
&gt; &gt; 
&gt; &gt; This has manifested itself in the capybara-webkit driver for Ruby: http://git.io/at1AuQ#L189.
&gt; &gt; 
&gt; &gt; I began to put together a workaround that would delay processing of the QNetworkReply until loadFinished() was fired by the custom QWebPage.  However, it seems that loadFinished() is fired by QWebPage before QWebFrame::url() is available as well.  In fact, if you bind to loadFinished() of QWebPage::currentFrame(), it fires after loadFinished() of the QWebPage has fired.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>774984</commentid>
    <comment_count>3</comment_count>
    <who name="Matt Horan">matt</who>
    <bug_when>2012-11-25 08:40:42 -0800</bug_when>
    <thetext>It actually looks like bug 32723 is to blame for this.  QWebFrame::url() returns an invalid URL for iframes, and the urlChanged signal is never fired.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>975430</commentid>
    <comment_count>4</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2014-02-03 03:20:31 -0800</bug_when>
    <thetext>=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>