<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[20018] trunk</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/20018">20018</a></dd>
<dt>Author</dt> <dd>ddkilzer</dd>
<dt>Date</dt> <dd>2007-03-07 07:01:10 -0800 (Wed, 07 Mar 2007)</dd>
</dl>

<h3>Log Message</h3>
<pre>LayoutTests:

        Reviewed by Darin.

        - LayoutTests part of fix for http://bugs.webkit.org/show_bug.cgi?id=12463
          WebArchiver - attempt to insert nil exception when archive empty iframe

        Tests using both dumpDOMAsWebArchive() and dumpSourceAsWebArchive() were added
        for this bug since a similar fix was suggested for the DOM case which was not
        needed.  The remaining changes are related to renaming dumpAsWebArchive() to
        dumpDOMAsWebArchive().

        * webarchive/archive-empty-frame-dom-expected.txt: Added.
        * webarchive/archive-empty-frame-dom.html: Added.
        * webarchive/archive-empty-frame-source-expected.txt: Added.
        * webarchive/archive-empty-frame-source.html: Added.
        * webarchive/resources/dump-webarchive.js: Renamed dumpAsWebArchive() to dumpDOMAsWebArchive().
        * webarchive/test-body-background-expected.txt: Ditto.
        * webarchive/test-body-background.html: Ditto.
        * webarchive/test-duplicate-resources-expected.txt: Ditto.
        * webarchive/test-frameset-expected.txt: Ditto.
        * webarchive/test-frameset.html: Ditto.
        * webarchive/test-img-src-expected.txt: Ditto.
        * webarchive/test-img-src.html: Ditto.
        * webarchive/test-input-src-expected.txt: Ditto.
        * webarchive/test-input-src.html: Ditto.
        * webarchive/test-link-href-expected.txt: Ditto.
        * webarchive/test-link-href.html: Ditto.
        * webarchive/test-object-data-expected.txt: Ditto.
        * webarchive/test-object-data.html: Ditto.
        * webarchive/test-script-src-expected.txt: Ditto.
        * webarchive/test-table-background-expected.txt: Ditto.
        * webarchive/test-table-background.html: Ditto.
        * webarchive/test-td-background-expected.txt: Ditto.
        * webarchive/test-td-background.html: Ditto.

WebKit:

        Reviewed by Darin.

        - WebCore part of fix for http://bugs.webkit.org/show_bug.cgi?id=12463
          WebArchiver - attempt to insert nil exception when archive empty iframe

        When dealing with an iframe element with no src attribute, the element contains
        a src attribute in the DOM with a URL of &quot;about:blank&quot; and some HTML to implement
        the blank page.  In the original page source, however, the iframe element does
        not include a src attribute, which caused a nil archive to be returned for the
        childFrameArchive and thus caused the bug.  The fix is a simple nil check.

        Test: webarchive/archive-empty-frame-source.html

        * WebView/WebArchiver.mm:
        (+ (NSArray *)_subframeArchivesForFrame:(WebFrame *)frame): Don't add childFrameArchive 
        to the subframeArchives array if it is nil.

WebKitTools:

        Reviewed by Darin.

        - WebKitTools part of fix for http://bugs.webkit.org/show_bug.cgi?id=12463
          WebArchiver - attempt to insert nil exception when archive empty iframe

        The dumpDOMAsWebArchive() test method uses the DOMDocument as a basis for creating
        a webarchive while the dumpSourceAsWebArchive() test method uses the original
        dataSource (page source) to create a webarchive.  Most tests currently use
        dumpDOMAsWebArchive() since this is what Safari does when saving a web page as a
        webarchive.

        * DumpRenderTree/DumpRenderTree.m: Renamed dumpAsWebArchive to dumpDOMAsWebArchive.
        Added dumpSourceAsWebArchive.
        (dump):
        (+[LayoutTestController isSelectorExcludedFromWebScript:]):
        (-[LayoutTestController dumpDOMAsWebArchive]):
        (-[LayoutTestController dumpSourceAsWebArchive]):
        (runTest):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestswebarchiveresourcesdumpwebarchivejs">trunk/LayoutTests/webarchive/resources/dump-webarchive.js</a></li>
<li><a href="#trunkLayoutTestswebarchivetestbodybackgroundexpectedtxt">trunk/LayoutTests/webarchive/test-body-background-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebarchivetestbodybackgroundhtml">trunk/LayoutTests/webarchive/test-body-background.html</a></li>
<li><a href="#trunkLayoutTestswebarchivetestduplicateresourcesexpectedtxt">trunk/LayoutTests/webarchive/test-duplicate-resources-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebarchivetestframesetexpectedtxt">trunk/LayoutTests/webarchive/test-frameset-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebarchivetestframesethtml">trunk/LayoutTests/webarchive/test-frameset.html</a></li>
<li><a href="#trunkLayoutTestswebarchivetestimgsrcexpectedtxt">trunk/LayoutTests/webarchive/test-img-src-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebarchivetestimgsrchtml">trunk/LayoutTests/webarchive/test-img-src.html</a></li>
<li><a href="#trunkLayoutTestswebarchivetestinputsrcexpectedtxt">trunk/LayoutTests/webarchive/test-input-src-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebarchivetestinputsrchtml">trunk/LayoutTests/webarchive/test-input-src.html</a></li>
<li><a href="#trunkLayoutTestswebarchivetestlinkhrefexpectedtxt">trunk/LayoutTests/webarchive/test-link-href-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebarchivetestlinkhrefhtml">trunk/LayoutTests/webarchive/test-link-href.html</a></li>
<li><a href="#trunkLayoutTestswebarchivetestobjectdataexpectedtxt">trunk/LayoutTests/webarchive/test-object-data-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebarchivetestobjectdatahtml">trunk/LayoutTests/webarchive/test-object-data.html</a></li>
<li><a href="#trunkLayoutTestswebarchivetestscriptsrcexpectedtxt">trunk/LayoutTests/webarchive/test-script-src-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebarchivetesttablebackgroundexpectedtxt">trunk/LayoutTests/webarchive/test-table-background-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebarchivetesttablebackgroundhtml">trunk/LayoutTests/webarchive/test-table-background.html</a></li>
<li><a href="#trunkLayoutTestswebarchivetesttdbackgroundexpectedtxt">trunk/LayoutTests/webarchive/test-td-background-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebarchivetesttdbackgroundhtml">trunk/LayoutTests/webarchive/test-td-background.html</a></li>
<li><a href="#trunkWebKitChangeLog">trunk/WebKit/ChangeLog</a></li>
<li><a href="#trunkWebKitWebViewWebArchivermm">trunk/WebKit/WebView/WebArchiver.mm</a></li>
<li><a href="#trunkWebKitToolsChangeLog">trunk/WebKitTools/ChangeLog</a></li>
<li><a href="#trunkWebKitToolsDumpRenderTreeDumpRenderTreem">trunk/WebKitTools/DumpRenderTree/DumpRenderTree.m</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestswebarchivearchiveemptyframedomexpectedtxt">trunk/LayoutTests/webarchive/archive-empty-frame-dom-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebarchivearchiveemptyframedomhtml">trunk/LayoutTests/webarchive/archive-empty-frame-dom.html</a></li>
<li><a href="#trunkLayoutTestswebarchivearchiveemptyframesourceexpectedtxt">trunk/LayoutTests/webarchive/archive-empty-frame-source-expected.txt</a></li>
<li><a href="#trunkLayoutTestswebarchivearchiveemptyframesourcehtml">trunk/LayoutTests/webarchive/archive-empty-frame-source.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/ChangeLog        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -1,5 +1,41 @@
</span><span class="cx"> 2007-03-07  David Kilzer  &lt;ddkilzer@webkit.org&gt;
</span><span class="cx"> 
</span><ins>+        Reviewed by Darin.
+
+        - LayoutTests part of fix for http://bugs.webkit.org/show_bug.cgi?id=12463
+          WebArchiver - attempt to insert nil exception when archive empty iframe
+
+        Tests using both dumpDOMAsWebArchive() and dumpSourceAsWebArchive() were added
+        for this bug since a similar fix was suggested for the DOM case which was not
+        needed.  The remaining changes are related to renaming dumpAsWebArchive() to
+        dumpDOMAsWebArchive().
+
+        * webarchive/archive-empty-frame-dom-expected.txt: Added.
+        * webarchive/archive-empty-frame-dom.html: Added.
+        * webarchive/archive-empty-frame-source-expected.txt: Added.
+        * webarchive/archive-empty-frame-source.html: Added.
+        * webarchive/resources/dump-webarchive.js: Renamed dumpAsWebArchive() to dumpDOMAsWebArchive().
+        * webarchive/test-body-background-expected.txt: Ditto.
+        * webarchive/test-body-background.html: Ditto.
+        * webarchive/test-duplicate-resources-expected.txt: Ditto.
+        * webarchive/test-frameset-expected.txt: Ditto.
+        * webarchive/test-frameset.html: Ditto.
+        * webarchive/test-img-src-expected.txt: Ditto.
+        * webarchive/test-img-src.html: Ditto.
+        * webarchive/test-input-src-expected.txt: Ditto.
+        * webarchive/test-input-src.html: Ditto.
+        * webarchive/test-link-href-expected.txt: Ditto.
+        * webarchive/test-link-href.html: Ditto.
+        * webarchive/test-object-data-expected.txt: Ditto.
+        * webarchive/test-object-data.html: Ditto.
+        * webarchive/test-script-src-expected.txt: Ditto.
+        * webarchive/test-table-background-expected.txt: Ditto.
+        * webarchive/test-table-background.html: Ditto.
+        * webarchive/test-td-background-expected.txt: Ditto.
+        * webarchive/test-td-background.html: Ditto.
+
+2007-03-07  David Kilzer  &lt;ddkilzer@webkit.org&gt;
+
</ins><span class="cx">         Reviewed by Mitz.
</span><span class="cx"> 
</span><span class="cx">         - fix http://bugs.webkit.org/show_bug.cgi?id=12992
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivearchiveemptyframedomexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/webarchive/archive-empty-frame-dom-expected.txt (0 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/archive-empty-frame-dom-expected.txt                                (rev 0)
+++ trunk/LayoutTests/webarchive/archive-empty-frame-dom-expected.txt        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;!DOCTYPE plist PUBLIC &quot;-//Apple Computer//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
+&lt;plist version=&quot;1.0&quot;&gt;
+&lt;dict&gt;
+        &lt;key&gt;WebMainResource&lt;/key&gt;
+        &lt;dict&gt;
+                &lt;key&gt;WebResourceData&lt;/key&gt;
+                &lt;string&gt;&amp;lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&amp;gt;&amp;lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&amp;gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;
+&amp;lt;title&amp;gt;Empty iFrame causes archive exception&amp;lt;/title&amp;gt;
+&amp;lt;script&amp;gt;
+    if (window.layoutTestController)
+        layoutTestController.dumpDOMAsWebArchive();
+&amp;lt;/script&amp;gt;
+&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;
+
+&amp;lt;p&amp;gt;
+Here lies an `iframe` with no content/src:
+&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;
+
+&amp;lt;iframe id=&quot;emptyFrame&quot; style=&quot;width: 100%; height: 100px; border: solid 2px red;&quot;&amp;gt;&amp;lt;/iframe&amp;gt;
+
+
+
+&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/string&gt;
+                &lt;key&gt;WebResourceFrameName&lt;/key&gt;
+                &lt;string&gt;&lt;/string&gt;
+                &lt;key&gt;WebResourceMIMEType&lt;/key&gt;
+                &lt;string&gt;text/html&lt;/string&gt;
+                &lt;key&gt;WebResourceTextEncodingName&lt;/key&gt;
+                &lt;string&gt;UTF-8&lt;/string&gt;
+                &lt;key&gt;WebResourceURL&lt;/key&gt;
+                &lt;string&gt;file:///LayoutTests/webarchive/archive-empty-frame-dom.html&lt;/string&gt;
+        &lt;/dict&gt;
+        &lt;key&gt;WebSubframeArchives&lt;/key&gt;
+        &lt;array&gt;
+                &lt;dict&gt;
+                        &lt;key&gt;WebMainResource&lt;/key&gt;
+                        &lt;dict&gt;
+                                &lt;key&gt;WebResourceData&lt;/key&gt;
+                                &lt;string&gt;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/string&gt;
+                                &lt;key&gt;WebResourceFrameName&lt;/key&gt;
+                                &lt;string&gt;emptyFrame&lt;/string&gt;
+                                &lt;key&gt;WebResourceMIMEType&lt;/key&gt;
+                                &lt;string&gt;text/html&lt;/string&gt;
+                                &lt;key&gt;WebResourceTextEncodingName&lt;/key&gt;
+                                &lt;string&gt;UTF-8&lt;/string&gt;
+                                &lt;key&gt;WebResourceURL&lt;/key&gt;
+                                &lt;string&gt;about:blank&lt;/string&gt;
+                        &lt;/dict&gt;
+                &lt;/dict&gt;
+        &lt;/array&gt;
+&lt;/dict&gt;
+&lt;/plist&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestswebarchivearchiveemptyframedomhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/webarchive/archive-empty-frame-dom.html (0 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/archive-empty-frame-dom.html                                (rev 0)
+++ trunk/LayoutTests/webarchive/archive-empty-frame-dom.html        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;
+        &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Empty iFrame causes archive exception&lt;/title&gt;
+&lt;script&gt;
+    if (window.layoutTestController)
+        layoutTestController.dumpDOMAsWebArchive();
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;p&gt;
+Here lies an `iframe` with no content/src:
+&lt;p&gt;
+
+&lt;iframe id=&quot;emptyFrame&quot; style=&quot;width: 100%; height: 100px; border: solid 2px red;&quot;&gt;
+&lt;/iframe&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestswebarchivearchiveemptyframesourceexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/webarchive/archive-empty-frame-source-expected.txt (0 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/archive-empty-frame-source-expected.txt                                (rev 0)
+++ trunk/LayoutTests/webarchive/archive-empty-frame-source-expected.txt        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;!DOCTYPE plist PUBLIC &quot;-//Apple Computer//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
+&lt;plist version=&quot;1.0&quot;&gt;
+&lt;dict&gt;
+        &lt;key&gt;WebMainResource&lt;/key&gt;
+        &lt;dict&gt;
+                &lt;key&gt;WebResourceData&lt;/key&gt;
+                &lt;string&gt;&amp;lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;
+        &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&amp;gt;
+&amp;lt;html&amp;gt;
+&amp;lt;head&amp;gt;
+&amp;lt;title&amp;gt;Empty iFrame causes archive exception&amp;lt;/title&amp;gt;
+&amp;lt;script&amp;gt;
+    if (window.layoutTestController)
+        layoutTestController.dumpSourceAsWebArchive();
+&amp;lt;/script&amp;gt;
+&amp;lt;/head&amp;gt;
+&amp;lt;body&amp;gt;
+
+&amp;lt;p&amp;gt;
+Here lies an `iframe` with no content/src:
+&amp;lt;p&amp;gt;
+
+&amp;lt;iframe id=&quot;emptyFrame&quot; style=&quot;width: 100%; height: 100px; border: solid 2px red;&quot;&amp;gt;
+&amp;lt;/iframe&amp;gt;
+
+&amp;lt;/body&amp;gt;
+&amp;lt;/html&amp;gt;
+&lt;/string&gt;
+                &lt;key&gt;WebResourceFrameName&lt;/key&gt;
+                &lt;string&gt;&lt;/string&gt;
+                &lt;key&gt;WebResourceMIMEType&lt;/key&gt;
+                &lt;string&gt;text/html&lt;/string&gt;
+                &lt;key&gt;WebResourceURL&lt;/key&gt;
+                &lt;string&gt;file:///LayoutTests/webarchive/archive-empty-frame-source.html&lt;/string&gt;
+        &lt;/dict&gt;
+&lt;/dict&gt;
+&lt;/plist&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestswebarchivearchiveemptyframesourcehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/webarchive/archive-empty-frame-source.html (0 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/archive-empty-frame-source.html                                (rev 0)
+++ trunk/LayoutTests/webarchive/archive-empty-frame-source.html        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;
+        &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Empty iFrame causes archive exception&lt;/title&gt;
+&lt;script&gt;
+    if (window.layoutTestController)
+        layoutTestController.dumpSourceAsWebArchive();
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+
+&lt;p&gt;
+Here lies an `iframe` with no content/src:
+&lt;p&gt;
+
+&lt;iframe id=&quot;emptyFrame&quot; style=&quot;width: 100%; height: 100px; border: solid 2px red;&quot;&gt;
+&lt;/iframe&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestswebarchiveresourcesdumpwebarchivejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/resources/dump-webarchive.js (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/resources/dump-webarchive.js        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/resources/dump-webarchive.js        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -1,2 +1,2 @@
</span><span class="cx"> if (window.layoutTestController)
</span><del>-    layoutTestController.dumpAsWebArchive();
</del><ins>+    layoutTestController.dumpDOMAsWebArchive();
</ins></span></pre></div>
<a id="trunkLayoutTestswebarchivetestbodybackgroundexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-body-background-expected.txt (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-body-background-expected.txt        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-body-background-expected.txt        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx">                 &lt;string&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;
</span><span class="cx"> &amp;lt;script&amp;gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &amp;lt;/script&amp;gt;
</span><span class="cx"> &amp;lt;/head&amp;gt;&amp;lt;body background=&quot;resources/apple.gif&quot;&amp;gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetestbodybackgroundhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-body-background.html (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-body-background.html        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-body-background.html        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body background=&quot;resources/apple.gif&quot;&gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetestduplicateresourcesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-duplicate-resources-expected.txt (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-duplicate-resources-expected.txt        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-duplicate-resources-expected.txt        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -176,7 +176,7 @@
</span><span class="cx">                 &lt;dict&gt;
</span><span class="cx">                         &lt;key&gt;WebResourceData&lt;/key&gt;
</span><span class="cx">                         &lt;string&gt;if (window.layoutTestController)
</span><del>-    layoutTestController.dumpAsWebArchive();
</del><ins>+    layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &lt;/string&gt;
</span><span class="cx">                         &lt;key&gt;WebResourceMIMEType&lt;/key&gt;
</span><span class="cx">                         &lt;string&gt;application/x-javascript&lt;/string&gt;
</span><span class="lines">@@ -186,7 +186,7 @@
</span><span class="cx">                         b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
</span><span class="cx">                         E1dlYlJlc291cmNlUmVzcG9uc2WAAaQLDBscVSRudWxs1w0ODxAR
</span><span class="cx">                         EhMUFRYXGBkVUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYACgAAQ
</span><del>-                        ThAHgAMjf+////////+AAF8QGGFwcGxpY2F0aW9uL3gtamF2YXNj
</del><ins>+                        URAHgAMjf+////////+AAF8QGGFwcGxpY2F0aW9uL3gtamF2YXNj
</ins><span class="cx">                         cmlwdNIdHh8gWCRjbGFzc2VzWiRjbGFzc25hbWWiICFdTlNVUkxS
</span><span class="cx">                         ZXNwb25zZVhOU09iamVjdAgRGyQpMkRJTGJkaW9+gYSHipGUl5mb
</span><span class="cx">                         nZ+hqqzHzNXg4/EAAAAAAAABAQAAAAAAAAAiAAAAAAAAAAAAAAAA
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetestframesetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-frameset-expected.txt (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-frameset-expected.txt        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-frameset-expected.txt        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx">                 &lt;string&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;
</span><span class="cx"> &amp;lt;script&amp;gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &amp;lt;/script&amp;gt;
</span><span class="cx"> &amp;lt;/head&amp;gt;&amp;lt;frameset rows=&quot;*&quot;&amp;gt;&amp;lt;frame src=&quot;resources/test-frame.html&quot; name=&quot;myframe&quot;&amp;gt;&amp;lt;/frameset&amp;gt;&amp;lt;/html&amp;gt;&lt;/string&gt;
</span><span class="cx">                 &lt;key&gt;WebResourceFrameName&lt;/key&gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetestframesethtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-frameset.html (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-frameset.html        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-frameset.html        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;frameset rows=&quot;*&quot;&gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetestimgsrcexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-img-src-expected.txt (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-img-src-expected.txt        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-img-src-expected.txt        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx">                 &lt;string&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;
</span><span class="cx"> &amp;lt;script&amp;gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &amp;lt;/script&amp;gt;
</span><span class="cx"> &amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;
</span><span class="cx">   &amp;lt;img src=&quot;resources/apple.gif&quot;&amp;gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetestimgsrchtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-img-src.html (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-img-src.html        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-img-src.html        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetestinputsrcexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-input-src-expected.txt (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-input-src-expected.txt        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-input-src-expected.txt        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx">                 &lt;string&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;
</span><span class="cx"> &amp;lt;script&amp;gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &amp;lt;/script&amp;gt;
</span><span class="cx"> &amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;
</span><span class="cx"> &amp;lt;form&amp;gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetestinputsrchtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-input-src.html (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-input-src.html        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-input-src.html        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetestlinkhrefexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-link-href-expected.txt (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-link-href-expected.txt        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-link-href-expected.txt        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx">                 &lt;string&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;
</span><span class="cx"> &amp;lt;script&amp;gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &amp;lt;/script&amp;gt;
</span><span class="cx"> &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;resources/test-style.css&quot; type=&quot;text/css&quot;&amp;gt;
</span><span class="cx"> &amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetestlinkhrefhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-link-href.html (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-link-href.html        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-link-href.html        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;link rel=&quot;stylesheet&quot; href=&quot;resources/test-style.css&quot; type=&quot;text/css&quot;&gt;
</span><span class="cx"> &lt;/head&gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetestobjectdataexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-object-data-expected.txt (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-object-data-expected.txt        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-object-data-expected.txt        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx">                 &lt;string&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;
</span><span class="cx"> &amp;lt;script&amp;gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &amp;lt;/script&amp;gt;
</span><span class="cx"> &amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;
</span><span class="cx">   &amp;lt;object data=&quot;resources/apple.gif&quot; type=&quot;image/gif&quot;&amp;gt;&amp;lt;/object&amp;gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetestobjectdatahtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-object-data.html (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-object-data.html        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-object-data.html        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetestscriptsrcexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-script-src-expected.txt (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-script-src-expected.txt        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-script-src-expected.txt        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx">                 &lt;dict&gt;
</span><span class="cx">                         &lt;key&gt;WebResourceData&lt;/key&gt;
</span><span class="cx">                         &lt;string&gt;if (window.layoutTestController)
</span><del>-    layoutTestController.dumpAsWebArchive();
</del><ins>+    layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &lt;/string&gt;
</span><span class="cx">                         &lt;key&gt;WebResourceMIMEType&lt;/key&gt;
</span><span class="cx">                         &lt;string&gt;application/x-javascript&lt;/string&gt;
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx">                         b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICV8Q
</span><span class="cx">                         E1dlYlJlc291cmNlUmVzcG9uc2WAAaQLDBscVSRudWxs1w0ODxAR
</span><span class="cx">                         EhMUFRYXGBkVUiQyUiQzUiQ0UiQwViRjbGFzc1IkNVIkMYACgAAQ
</span><del>-                        ThAHgAMjf+////////+AAF8QGGFwcGxpY2F0aW9uL3gtamF2YXNj
</del><ins>+                        URAHgAMjf+////////+AAF8QGGFwcGxpY2F0aW9uL3gtamF2YXNj
</ins><span class="cx">                         cmlwdNIdHh8gWCRjbGFzc2VzWiRjbGFzc25hbWWiICFdTlNVUkxS
</span><span class="cx">                         ZXNwb25zZVhOU09iamVjdAgRGyQpMkRJTGJkaW9+gYSHipGUl5mb
</span><span class="cx">                         nZ+hqqzHzNXg4/EAAAAAAAABAQAAAAAAAAAiAAAAAAAAAAAAAAAA
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetesttablebackgroundexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-table-background-expected.txt (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-table-background-expected.txt        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-table-background-expected.txt        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx">                 &lt;string&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;
</span><span class="cx"> &amp;lt;script&amp;gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &amp;lt;/script&amp;gt;
</span><span class="cx"> &amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;
</span><span class="cx">   &amp;lt;table background=&quot;resources/apple.gif&quot; style=&quot;width: 52px; height: 64px;&quot;&amp;gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetesttablebackgroundhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-table-background.html (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-table-background.html        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-table-background.html        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetesttdbackgroundexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-td-background-expected.txt (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-td-background-expected.txt        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-td-background-expected.txt        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx">                 &lt;string&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;
</span><span class="cx"> &amp;lt;script&amp;gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &amp;lt;/script&amp;gt;
</span><span class="cx"> &amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;
</span><span class="cx">   &amp;lt;table&amp;gt;
</span></span></pre></div>
<a id="trunkLayoutTestswebarchivetesttdbackgroundhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/webarchive/test-td-background.html (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/webarchive/test-td-background.html        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/LayoutTests/webarchive/test-td-background.html        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx">     if (window.layoutTestController)
</span><del>-        layoutTestController.dumpAsWebArchive();
</del><ins>+        layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span></span></pre></div>
<a id="trunkWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/ChangeLog (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/ChangeLog        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/WebKit/ChangeLog        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2007-03-07  Jim Correia  &lt;jim.correia@pobox.com&gt;
+
+        Reviewed by Darin.
+
+        - WebCore part of fix for http://bugs.webkit.org/show_bug.cgi?id=12463
+          WebArchiver - attempt to insert nil exception when archive empty iframe
+
+        When dealing with an iframe element with no src attribute, the element contains
+        a src attribute in the DOM with a URL of &quot;about:blank&quot; and some HTML to implement
+        the blank page.  In the original page source, however, the iframe element does
+        not include a src attribute, which caused a nil archive to be returned for the
+        childFrameArchive and thus caused the bug.  The fix is a simple nil check.
+
+        Test: webarchive/archive-empty-frame-source.html
+
+        * WebView/WebArchiver.mm:
+        (+ (NSArray *)_subframeArchivesForFrame:(WebFrame *)frame): Don't add childFrameArchive 
+        to the subframeArchives array if it is nil.
+
</ins><span class="cx"> 2007-03-06  John Sullivan  &lt;sullivan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin
</span></span></pre></div>
<a id="trunkWebKitWebViewWebArchivermm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/WebView/WebArchiver.mm (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/WebView/WebArchiver.mm        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/WebKit/WebView/WebArchiver.mm        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -50,8 +50,11 @@
</span><span class="cx">     NSEnumerator *enumerator = [[frame childFrames] objectEnumerator];
</span><span class="cx">     NSMutableArray *subframeArchives = [NSMutableArray array];
</span><span class="cx">     WebFrame *childFrame;
</span><del>-    while ((childFrame = [enumerator nextObject]))
-        [subframeArchives addObject:[self archiveFrame:childFrame]];
</del><ins>+    while ((childFrame = [enumerator nextObject])) {
+        WebArchive *childFrameArchive = [self archiveFrame:childFrame];
+        if (childFrameArchive)
+            [subframeArchives addObject:childFrameArchive];
+    }
</ins><span class="cx"> 
</span><span class="cx">     return subframeArchives;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkWebKitToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/ChangeLog (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/ChangeLog        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/WebKitTools/ChangeLog        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2007-03-07  David Kilzer  &lt;ddkilzer@webkit.org&gt;
+
+        Reviewed by Darin.
+
+        - WebKitTools part of fix for http://bugs.webkit.org/show_bug.cgi?id=12463
+          WebArchiver - attempt to insert nil exception when archive empty iframe
+
+        The dumpDOMAsWebArchive() test method uses the DOMDocument as a basis for creating
+        a webarchive while the dumpSourceAsWebArchive() test method uses the original
+        dataSource (page source) to create a webarchive.  Most tests currently use
+        dumpDOMAsWebArchive() since this is what Safari does when saving a web page as a
+        webarchive.
+
+        * DumpRenderTree/DumpRenderTree.m: Renamed dumpAsWebArchive to dumpDOMAsWebArchive.
+        Added dumpSourceAsWebArchive.
+        (dump):
+        (+[LayoutTestController isSelectorExcludedFromWebScript:]):
+        (-[LayoutTestController dumpDOMAsWebArchive]):
+        (-[LayoutTestController dumpSourceAsWebArchive]):
+        (runTest):
+
</ins><span class="cx"> 2007-03-05  Kevin McCullough  &lt;kmccullough@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Mark and Dave H.
</span></span></pre></div>
<a id="trunkWebKitToolsDumpRenderTreeDumpRenderTreem"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/DumpRenderTree/DumpRenderTree.m (20017 => 20018)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/DumpRenderTree/DumpRenderTree.m        2007-03-07 14:25:57 UTC (rev 20017)
+++ trunk/WebKitTools/DumpRenderTree/DumpRenderTree.m        2007-03-07 15:01:10 UTC (rev 20018)
</span><span class="lines">@@ -125,7 +125,8 @@
</span><span class="cx"> static BOOL waitToDump;     // TRUE if waitUntilDone() has been called, but notifyDone() has not yet been called
</span><span class="cx"> 
</span><span class="cx"> static BOOL dumpAsText;
</span><del>-static BOOL dumpAsWebArchive;
</del><ins>+static BOOL dumpDOMAsWebArchive;
+static BOOL dumpSourceAsWebArchive;
</ins><span class="cx"> static BOOL dumpSelectionRect;
</span><span class="cx"> static BOOL dumpTitleChanges;
</span><span class="cx"> static BOOL dumpBackForwardList;
</span><span class="lines">@@ -640,9 +641,12 @@
</span><span class="cx">         if (dumpAsText) {
</span><span class="cx">             DOMElement *documentElement = [[frame DOMDocument] documentElement];
</span><span class="cx">             result = [[(DOMElement *)documentElement innerText] stringByAppendingString:@&quot;\n&quot;];
</span><del>-        } else if (dumpAsWebArchive) {
</del><ins>+        } else if (dumpDOMAsWebArchive) {
</ins><span class="cx">             WebArchive *webArchive = [[frame DOMDocument] webArchive];
</span><span class="cx">             result = serializeWebArchiveToXML(webArchive);
</span><ins>+        } else if (dumpSourceAsWebArchive) {
+            WebArchive *webArchive = [[frame dataSource] webArchive];
+            result = serializeWebArchiveToXML(webArchive);
</ins><span class="cx">         } else {
</span><span class="cx">             bool isSVGW3CTest = ([currentTest rangeOfString:@&quot;svg/W3C-SVG-1.1&quot;].length);
</span><span class="cx">             if (isSVGW3CTest)
</span><span class="lines">@@ -656,14 +660,16 @@
</span><span class="cx">             const char *errorMessage;
</span><span class="cx">             if (dumpAsText)
</span><span class="cx">                 errorMessage = &quot;[documentElement innerText]&quot;;
</span><del>-            else if (dumpAsWebArchive)
</del><ins>+            else if (dumpDOMAsWebArchive)
</ins><span class="cx">                 errorMessage = &quot;[[frame DOMDocument] webArchive]&quot;;
</span><ins>+            else if (dumpSourceAsWebArchive)
+                errorMessage = &quot;[[frame dataSource] webArchive]&quot;;
</ins><span class="cx">             else
</span><span class="cx">                 errorMessage = &quot;[frame renderTreeAsExternalRepresentation]&quot;;
</span><span class="cx">             printf(&quot;ERROR: nil result from %s&quot;, errorMessage);
</span><span class="cx">         } else {
</span><span class="cx">             fputs([result UTF8String], stdout);
</span><del>-            if (!dumpAsText &amp;&amp; !dumpAsWebArchive)
</del><ins>+            if (!dumpAsText &amp;&amp; !dumpDOMAsWebArchive &amp;&amp; !dumpSourceAsWebArchive)
</ins><span class="cx">                 dumpFrameScrollPosition(frame);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -704,7 +710,7 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (dumpPixels) {
</span><del>-        if (!dumpAsText &amp;&amp; !dumpAsWebArchive) {
</del><ins>+        if (!dumpAsText &amp;&amp; !dumpDOMAsWebArchive &amp;&amp; !dumpSourceAsWebArchive) {
</ins><span class="cx">             // grab a bitmap from the view
</span><span class="cx">             WebView* view = [frame webView];
</span><span class="cx">             NSSize webViewSize = [view frame].size;
</span><span class="lines">@@ -909,7 +915,8 @@
</span><span class="cx">     if (aSelector == @selector(waitUntilDone)
</span><span class="cx">             || aSelector == @selector(notifyDone)
</span><span class="cx">             || aSelector == @selector(dumpAsText)
</span><del>-            || aSelector == @selector(dumpAsWebArchive)
</del><ins>+            || aSelector == @selector(dumpDOMAsWebArchive)
+            || aSelector == @selector(dumpSourceAsWebArchive)
</ins><span class="cx">             || aSelector == @selector(dumpTitleChanges)
</span><span class="cx">             || aSelector == @selector(dumpBackForwardList)
</span><span class="cx">             || aSelector == @selector(dumpChildFrameScrollPositions)
</span><span class="lines">@@ -1017,11 +1024,16 @@
</span><span class="cx">     [[WebPreferences standardPreferences] setUserStyleSheetEnabled:flag];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)dumpAsWebArchive
</del><ins>+- (void)dumpDOMAsWebArchive
</ins><span class="cx"> {
</span><del>-    dumpAsWebArchive = YES;
</del><ins>+    dumpDOMAsWebArchive = YES;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)dumpSourceAsWebArchive
+{
+    dumpSourceAsWebArchive = YES;
+}
+
</ins><span class="cx"> - (void)dumpSelectionRect
</span><span class="cx"> {
</span><span class="cx">     dumpSelectionRect = YES;
</span><span class="lines">@@ -1223,7 +1235,8 @@
</span><span class="cx">     topLoadingFrame = nil;
</span><span class="cx">     waitToDump = NO;
</span><span class="cx">     dumpAsText = NO;
</span><del>-    dumpAsWebArchive = NO;
</del><ins>+    dumpDOMAsWebArchive = NO;
+    dumpSourceAsWebArchive = NO;
</ins><span class="cx">     dumpChildFrameScrollPositions = NO;
</span><span class="cx">     shouldDumpEditingCallbacks = NO;
</span><span class="cx">     shouldDumpResourceLoadCallbacks = NO;
</span></span></pre>
</div>
</div>

</body>
</html>