<?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>20661</bug_id>
          
          <creation_ts>2008-09-05 05:34:21 -0700</creation_ts>
          <short_desc>JavaScript can close a window</short_desc>
          <delta_ts>2009-01-29 18:40:29 -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>New Bugs</component>
          <version>312.x</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows Vista</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://skypher.com/SkyLined/Repro/Safari/Closer</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Berend-Jan Wever">skylined</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>collinj</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>90257</commentid>
    <comment_count>0</comment_count>
    <who name="Berend-Jan Wever">skylined</who>
    <bug_when>2008-09-05 05:34:21 -0700</bug_when>
    <thetext>JavaScript can close a window, even if it was not opened through JavaScript. This is done by closing an IFRAME within the page:
&lt;BODY onload=&quot;go()&quot;&gt;
	&lt;IFRAME name=&quot;target&quot;&gt;&lt;/IFRAME&gt;
&lt;/BODY&gt;
&lt;SCRIPT&gt;
	function go() {
		oWin = window.open(&quot;about:blank&quot;, &quot;target&quot;);
		oWin.close();
	}
&lt;/SCRIPT&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90334</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-09-05 17:41:05 -0700</bug_when>
    <thetext>&lt;rdar://problem/6201382&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107585</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-01-29 14:36:37 -0800</bug_when>
    <thetext>See also: &lt;http://trac.webkit.org/projects/webkit/changeset/40371&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107608</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-01-29 15:53:38 -0800</bug_when>
    <thetext>ap, What was the reasoning behind that change?  It seems like we want to match Firefox&apos;s behavior for window.close().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107627</commentid>
    <comment_count>4</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2009-01-29 16:56:06 -0800</bug_when>
    <thetext>That change was actually made in an effort to match firefox.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107632</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-01-29 18:11:12 -0800</bug_when>
    <thetext>&gt; That change was actually made in an effort to match firefox.

Awesome.  What else is left to do to match their policy?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107635</commentid>
    <comment_count>6</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2009-01-29 18:40:29 -0800</bug_when>
    <thetext>I can&apos;t find a thorough documentation of Firefox&apos;s window.close() policy, but that change definitely brought us closer.

And, in the process, fixed this bug!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>