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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>26830</bug_id>
          
          <creation_ts>2014-09-17 05:35:14 +0000</creation_ts>
          <short_desc>Referrer for window.open() navigation should be based on entry script&apos;s responsible document, not entry script&apos;s responsible document</short_desc>
          <delta_ts>2014-09-24 22:21:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://www.w3.org/Bugs/Public/show_bug.cgi?id=24613</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          <dependson>24080</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>mkwst</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>111663</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-17 05:35:14 +0000</bug_when>
    <thetext>Based on this test:
   http://damowmow.com/playground/demos/settings-objects/001/a/a.html
...it looks like the referrer needs to be based on the entry script settings object&apos;s referrer source, not the source browsing context&apos;s document as the HTML spec says now.

Anne, Mike: Should I still be defining this in the HTML spec, or is this something that should be defined in Fetch or in the Referrer Policy spec?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111664</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-17 05:39:37 +0000</bug_when>
    <thetext>Actually this might just be specific to window.open(). When I use location.assign(), it works as you&apos;d expect (using the incumbent settings object&apos;s responsible document).

   http://damowmow.com/playground/demos/settings-objects/002/a/a.html

So maybe the bug here is just that window.open() should use the entry settings object&apos;s responsible browsing context as the source browsing context.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111665</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-17 05:40:36 +0000</bug_when>
    <thetext>(...in Chrome. In Firefox, 002 actually uses the incumbent settings object&apos;s API base URL for the URL resolution too, which is different.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111683</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-09-17 10:47:22 +0000</bug_when>
    <thetext>Referrer Policy takes its cues from Fetch. Fetch takes its cues from the invoking party, which could set request&apos;s referrer to a URL.

Fetch also takes a client, which request&apos;s referrer would default to. Currently that is a JavaScript global environment, but you proposed making that a setting objects of sorts, that would offer access to an event loop, global object (to type check, e.g. ServiceWorkerGlobalScope vs Window), origin, and referrer and such (bug 24080 comment 9).

So the answer the question in comment 0: HTML needs to make sure it passes the correct data to Fetch. It&apos;s not clear to me how Fetch could make this decision.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111696</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-17 16:10:53 +0000</bug_when>
    <thetext>Ok. Sounds good. In that case, I need to make sure window.open() is correctly set up.

(I filed bug 26836 on the settings objects stuff BTW.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112142</commentid>
    <comment_count>5</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-09-24 22:21:27 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8816.
Check-in comment: Make window.open() match browsers better
https://html5.org/tools/web-apps-tracker?from=8815&amp;to=8816</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>