<?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>104860</bug_id>
          
          <creation_ts>2012-12-12 16:39:17 -0800</creation_ts>
          <short_desc>Be more consistent about client redirects</short_desc>
          <delta_ts>2012-12-13 09:40:56 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Charles Reis">creis</reporter>
          <assigned_to name="Charles Reis">creis</assigned_to>
          <cc>ap</cc>
    
    <cc>fishd</cc>
    
    <cc>japhet</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>790057</commentid>
    <comment_count>0</comment_count>
    <who name="Charles Reis">creis</who>
    <bug_when>2012-12-12 16:39:17 -0800</bug_when>
    <thetext>In bug 104586, we noticed that the concept of &quot;client redirects&quot; has a lot of different meanings.  It could refer to any JavaScript navigation in a page, or it could refer to one that replaces the current history item (e.g., a redirect before the page finishes loading, or the result of replaceState).

FrameLoaderClient::dispatchWillPerformClientRedirect appears to be called for any redirect navigation.
FrameLoader::quickRedirectComing() appears to refer to whether the navigation will replace the current history item.
DocumentLoader::isClientRedirect() is set to quickRedirectComing(), but not until after decidePolicyForNavigation.

Darin Fisher points out that we should be more consistent with this concept.  Client redirects should refer to cases that replace the current history item.  willPerformClientRedirect should only be called in that case.  FrameLoader shouldn&apos;t need a quickRedirectComing() (especially since it changes over time and needs to carefully be cleared at the right time). DocumentLoader::isClientRedirect() should be set very early on, before decidePolicyForNavigation, since that value will not change for the lifetime of the DocumentLoader.

Once these issues are fixed, we can change Chromium&apos;s WebDataSource::isClientRedirect to return DocumentLoader::isClientRedirect() instead of quickRedirectComing().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>790692</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-12-13 09:40:56 -0800</bug_when>
    <thetext>Is it also a client redirect when it&apos;s caused by FrameLoaderClient::dispatchWillSendRequest?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>