<?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>14599</bug_id>
          
          <creation_ts>2007-07-12 17:03:26 -0700</creation_ts>
          <short_desc>document.write() inside an &lt;iframe src&gt; does not work</short_desc>
          <delta_ts>2010-08-13 20:23:23 -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>DOM</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>8961</dup_id>
          
          <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="Sridhar Gurivireddy">just1gb</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4921</commentid>
    <comment_count>0</comment_count>
    <who name="Sridhar Gurivireddy">just1gb</who>
    <bug_when>2007-07-12 17:03:26 -0700</bug_when>
    <thetext>Document.write() inside an iframe src should write to the &lt;iframe&gt;. Safari does not do anything.

e.g code
#######
 &lt;frameset id=&quot;frameset&quot; border=&quot;1&quot; cols=&quot;50%,50%&quot; style=&apos;border: solid 1px;&apos;&gt;
 &lt;frame name=&quot;frame2&quot; src=&quot;about:blank&quot;&gt;
 &lt;frame name=&quot;frame1&quot; src=&quot;javascript:
       try { document.write(&apos;whatever&apos;); } catch(e) { window.alert(e.description); }
 &quot;&gt;
 &lt;/frameset&gt;

This works well in other browsers</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4916</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-12 22:13:10 -0700</bug_when>
    <thetext>Confirmed with r24241 on Mac OS X.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4913</commentid>
    <comment_count>2</comment_count>
      <attachid>15496</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-12 22:13:58 -0700</bug_when>
    <thetext>Created attachment 15496
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4763</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-14 14:28:42 -0700</bug_when>
    <thetext>Not a regression as the reduction behaves the same way with Safari 2.0.4 (419.3) with original WebKit on Mac OS X 10.4.10 (2R218).  Tested with a local debug build of WebKit r24285 with Safari 3.0 (522.12) on 10.410.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4761</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-14 14:58:19 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Created an attachment (id=15496) [edit]
&gt; test case

FWIW, this test case caused a crash in Firefox 2.0.0.4:

https://bugzilla.mozilla.org/show_bug.cgi?id=388181

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3655</commentid>
    <comment_count>5</comment_count>
      <attachid>15695</attachid>
    <who name="Justin Haygood">jhaygood</who>
    <bug_when>2007-07-26 21:55:46 -0700</bug_when>
    <thetext>Created attachment 15695
Testcase.. 2 files

2 file testcase in ZIP....

test.html opens up an iframe which uses document.write.

I believe the bug description is wrong, and the test case provide demonstrates a different bug? Can you really put framecontent inline with the mainpage? I&apos;ve never seen that be done.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57123</commentid>
    <comment_count>6</comment_count>
    <who name="Sridhar Gurivireddy">just1gb</who>
    <bug_when>2007-09-26 15:21:16 -0700</bug_when>
    <thetext>I beleive basically the bug here is that document.write() does not update the content until document.close() is called.

javascript:document.write(&quot;sridhar&quot;) does not work in Safari, while
javascript:document.write(&quot;sridhar&quot;);document.close(); works</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57138</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-09-26 21:29:25 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; I beleive basically the bug here is that document.write() does not update the
&gt; content until document.close() is called.

This sounds like a duplicate of bug 8961.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>264602</commentid>
    <comment_count>8</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-08-13 20:23:23 -0700</bug_when>
    <thetext>Yep.  My patch for Bug 8961 fixes this one too.

*** This bug has been marked as a duplicate of bug 8961 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>15496</attachid>
            <date>2007-07-12 22:13:58 -0700</date>
            <delta_ts>2007-07-12 22:13:58 -0700</delta_ts>
            <desc>test case</desc>
            <filename>14599.html</filename>
            <type>text/html</type>
            <size>328</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CiA8ZnJhbWVzZXQgaWQ9ImZyYW1lc2V0IiBib3JkZXI9IjEiIGNvbHM9
IjUwJSw1MCUiIHN0eWxlPSdib3JkZXI6IHNvbGlkIDFweDsnIG9ubG9hZD0iYWxlcnQod2luZG93
LmZyYW1lc1sxXS5mcmFtZUVsZW1lbnQuc3JjICkiPgogPGZyYW1lIG5hbWU9ImZyYW1lMiIgc3Jj
PSJhYm91dDpibGFuayI+CiA8ZnJhbWUgbmFtZT0iZnJhbWUxIiBzcmM9ImphdmFzY3JpcHQ6CiAg
ICAgICB0cnkgeyBkb2N1bWVudC53cml0ZSgnd2hhdGV2ZXInKTsgfSBjYXRjaChlKSB7CndpbmRv
dy5hbGVydChlLmRlc2NyaXB0aW9uKTsgfQogIj4KIDwvZnJhbWVzZXQ+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>15695</attachid>
            <date>2007-07-26 21:55:46 -0700</date>
            <delta_ts>2007-07-26 21:55:46 -0700</delta_ts>
            <desc>Testcase.. 2 files</desc>
            <filename>testcase.zip</filename>
            <type>application/octet-stream</type>
            <size>370</size>
            <attacher name="Justin Haygood">jhaygood</attacher>
            
              <data encoding="base64">UEsDBAoAAAAAAKIG+zZf7DyZRAAAAEQAAAATAAAAZG9jdW1lbnRfd3JpdGUuaHRtbDxzY3JpcHQg
dHlwZT0idGV4dC9qYXZhc2NyaXB0Ij4NCmRvY3VtZW50LndyaXRlKCJIZWxsbyIpOw0KPC9zY3Jp
cHQ+UEsDBBQAAAAIALEG+zb8obepSAAAAEsAAAAJAAAAdGVzdC5odG1sHcvBCYAwDAXQVcofQAp6
NK4i2qYmYC3ESNcXPb7Dm7XYVjl0zS6EKUYEYT3ECeOH2xIht/RUvnztps6DeD0R/rg3y2yEiOUF
UEsBAhQACgAAAAAAogb7Nl/sPJlEAAAARAAAABMAAAAAAAAAAAAgAAAAAAAAAGRvY3VtZW50X3dy
aXRlLmh0bWxQSwECFAAUAAAACACxBvs2/KG3qUgAAABLAAAACQAAAAAAAAAAACAAAAB1AAAAdGVz
dC5odG1sUEsFBgAAAAACAAIAeAAAAOQAAAAAAA==
</data>

          </attachment>
      

    </bug>

</bugzilla>