<?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>25028</bug_id>
          
          <creation_ts>2009-04-03 09:40:51 -0700</creation_ts>
          <short_desc>Restore FrameLoader::policyDocumentLoader to fix the Chromium build</short_desc>
          <delta_ts>2009-04-03 10:55:49 -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>Page Loading</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Darin Fisher (:fishd, Google)">fishd</reporter>
          <assigned_to name="Darin Fisher (:fishd, Google)">fishd</assigned_to>
          <cc>darin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>116432</commentid>
    <comment_count>0</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2009-04-03 09:40:51 -0700</bug_when>
    <thetext>Restore FrameLoader::policyDocumentLoader to fix the Chromium build

r42158 removed FrameLoader::policyDocumentLoader which was originally added in r32320 as part of upstreaming changes to WebCore required by the Chromium build.

We found that there are some FrameLoaderClient callbacks that occur when the current DocumentLoader is m_policyDocumentLoader, and without an accessor to that, it is not possible from FrameLoaderClient to access the DocumentLoader.  This is important since the FrameLoaderClient may have subclassed DocumentLoader to provide additional state (which is what Chromium does).

I understand that the code I&apos;m referring to is not yet upstreamed, so it makes sense that this change would have been made.  It surely looked like there were no other consumers.

Hopefully this is a reasonable method to restore on FrameLoader since it makes sense to be able to access the current DocumentLoader during policy callbacks to the FrameLoaderClient.

Patch coming up...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116433</commentid>
    <comment_count>1</comment_count>
      <attachid>29229</attachid>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2009-04-03 09:42:00 -0700</bug_when>
    <thetext>Created attachment 29229
v1 patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116434</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2009-04-03 09:43:46 -0700</bug_when>
    <thetext>&gt; This is important since the FrameLoaderClient may have subclassed
&gt; DocumentLoader to provide additional state

Clarification:  What I mean is that from FrameLoaderClient::createDocumentLoader, the FrameLoaderClient implementation can allocate a class that subclasses DocumentLoader.  Then from other FrameLoaderClient methods, that subclass is exposed via a down cast from DocumentLoader.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116436</commentid>
    <comment_count>3</comment_count>
      <attachid>29229</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-04-03 09:56:56 -0700</bug_when>
    <thetext>Comment on attachment 29229
v1 patch

It would be good to know why this is needed. I think it’s likely a mistake.

r=me on bringing it back</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116437</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-04-03 09:57:52 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; We found that there are some FrameLoaderClient callbacks that occur when the
&gt; current DocumentLoader is m_policyDocumentLoader, and without an accessor to
&gt; that, it is not possible from FrameLoaderClient to access the DocumentLoader.

We should consider adding the DocumentLoader as an argument to those functions to solve the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116448</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2009-04-03 10:53:02 -0700</bug_when>
    <thetext>&gt; We should consider adding the DocumentLoader as an argument to those functions
&gt; to solve the problem.

That sounds like a good idea.  The FrameLoaderClient method in question is dispatchDecidePolicyForNavigationAction.

Landed as:  http://trac.webkit.org/changeset/42202</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116449</commentid>
    <comment_count>6</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2009-04-03 10:55:49 -0700</bug_when>
    <thetext>The key issue is that the policyDocumentLoader doesn&apos;t become provisional until after dispatchDecidePolicyForNavigationAction OKs the navigation.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>29229</attachid>
            <date>2009-04-03 09:42:00 -0700</date>
            <delta_ts>2009-04-03 09:56:56 -0700</delta_ts>
            <desc>v1 patch</desc>
            <filename>fl_1.txt</filename>
            <type>text/plain</type>
            <size>1234</size>
            <attacher name="Darin Fisher (:fishd, Google)">fishd</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDQyMjAw
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTMgQEAKKzIwMDktMDQt
MDMgIERhcmluIEZpc2hlciAgPGRhcmluQGNocm9taXVtLm9yZz4KKworICAgICAgICBSZXZpZXdl
ZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBSZXN0b3JlIEZyYW1lTG9hZGVyOjpwb2xp
Y3lEb2N1bWVudExvYWRlciB0byBmaXggdGhlIENocm9taXVtIGJ1aWxkLgorICAgICAgICBodHRw
czovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MjUwMjgKKworICAgICA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3RDb21wbGV0ZWRMb2FkKCk7Cg==
</data>
<flag name="review"
          id="14500"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>