<?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>106488</bug_id>
          
          <creation_ts>2013-01-09 13:50:18 -0800</creation_ts>
          <short_desc>Should `window.location.origin` return &apos;null&apos; in a sandbox?</short_desc>
          <delta_ts>2013-02-08 04:53:46 -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>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>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Mike West">mkwst</reporter>
          <assigned_to name="Mike West">mkwst</assigned_to>
          <cc>abarth</cc>
    
    <cc>syoichi</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>803659</commentid>
    <comment_count>0</comment_count>
    <who name="Mike West">mkwst</who>
    <bug_when>2013-01-09 13:50:18 -0800</bug_when>
    <thetext>&apos;&lt;iframe sandbox=&quot;allow-scripts&quot; src=&quot;frame.html&quot;&gt;&lt;/iframe&gt;&apos; with a framed document containing &apos;&lt;script&gt;alert(window.location.origin);&lt;/script&gt;&apos; alerts the actual origin of the document, which wasn&apos;t what I expected. I&apos;m not sure what&apos;s intended, but I expected that treating the framed document as existing in a unique origin would have some effect on the string output as it&apos;s location&apos;s origin.

WDYT, Adam?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>803692</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2013-01-09 14:10:45 -0800</bug_when>
    <thetext>It just returns the origin of the document&apos;s location, not the origin of the document itself.  I agree that&apos;s surprising for sandboxed documents.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>803699</commentid>
    <comment_count>2</comment_count>
    <who name="Mike West">mkwst</who>
    <bug_when>2013-01-09 14:20:29 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; It just returns the origin of the document&apos;s location, not the origin of the document itself.  I agree that&apos;s surprising for sandboxed documents.

Is it surprising enough that we should clearly change it, or should I just drop a note to the WHATWG?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>803762</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2013-01-09 15:05:33 -0800</bug_when>
    <thetext>I&apos;d ask annevk on whatwg@, but I agree that we should probably change it.  :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>828445</commentid>
    <comment_count>4</comment_count>
    <who name="Mike West">mkwst</who>
    <bug_when>2013-02-08 04:53:46 -0800</bug_when>
    <thetext>Asked on whatwg@, Anne was unsurprised. FF&apos;s implementation matches ours, let&apos;s just leave it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>