<!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 "about:blank" 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 <ddkilzer@webkit.org>
</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 <ddkilzer@webkit.org>
+
</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>+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+        <key>WebMainResource</key>
+        <dict>
+                <key>WebResourceData</key>
+                <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&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;p&gt;
+
+&lt;iframe id="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;"&gt;&lt;/iframe&gt;
+
+
+
+&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                <key>WebResourceFrameName</key>
+                <string></string>
+                <key>WebResourceMIMEType</key>
+                <string>text/html</string>
+                <key>WebResourceTextEncodingName</key>
+                <string>UTF-8</string>
+                <key>WebResourceURL</key>
+                <string>file:///LayoutTests/webarchive/archive-empty-frame-dom.html</string>
+        </dict>
+        <key>WebSubframeArchives</key>
+        <array>
+                <dict>
+                        <key>WebMainResource</key>
+                        <dict>
+                                <key>WebResourceData</key>
+                                <string>&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                                <key>WebResourceFrameName</key>
+                                <string>emptyFrame</string>
+                                <key>WebResourceMIMEType</key>
+                                <string>text/html</string>
+                                <key>WebResourceTextEncodingName</key>
+                                <string>UTF-8</string>
+                                <key>WebResourceURL</key>
+                                <string>about:blank</string>
+                        </dict>
+                </dict>
+        </array>
+</dict>
+</plist>
</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>+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<title>Empty iFrame causes archive exception</title>
+<script>
+ if (window.layoutTestController)
+ layoutTestController.dumpDOMAsWebArchive();
+</script>
+</head>
+<body>
+
+<p>
+Here lies an `iframe` with no content/src:
+<p>
+
+<iframe id="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;">
+</iframe>
+
+</body>
+</html>
</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>+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+        <key>WebMainResource</key>
+        <dict>
+                <key>WebResourceData</key>
+                <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd"&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="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;"&gt;
+&lt;/iframe&gt;
+
+&lt;/body&gt;
+&lt;/html&gt;
+</string>
+                <key>WebResourceFrameName</key>
+                <string></string>
+                <key>WebResourceMIMEType</key>
+                <string>text/html</string>
+                <key>WebResourceURL</key>
+                <string>file:///LayoutTests/webarchive/archive-empty-frame-source.html</string>
+        </dict>
+</dict>
+</plist>
</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>+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<title>Empty iFrame causes archive exception</title>
+<script>
+ if (window.layoutTestController)
+ layoutTestController.dumpSourceAsWebArchive();
+</script>
+</head>
+<body>
+
+<p>
+Here lies an `iframe` with no content/src:
+<p>
+
+<iframe id="emptyFrame" style="width: 100%; height: 100px; border: solid 2px red;">
+</iframe>
+
+</body>
+</html>
</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">                 <string>&lt;html&gt;&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;&lt;body background="resources/apple.gif"&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"> <head>
</span><span class="cx"> <script>
</span><span class="cx"> if (window.layoutTestController)
</span><del>- layoutTestController.dumpAsWebArchive();
</del><ins>+ layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body background="resources/apple.gif">
</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">                 <dict>
</span><span class="cx">                         <key>WebResourceData</key>
</span><span class="cx">                         <string>if (window.layoutTestController)
</span><del>- layoutTestController.dumpAsWebArchive();
</del><ins>+ layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> </string>
</span><span class="cx">                         <key>WebResourceMIMEType</key>
</span><span class="cx">                         <string>application/x-javascript</string>
</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">                 <string>&lt;html&gt;&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;&lt;frameset rows="*"&gt;&lt;frame src="resources/test-frame.html" name="myframe"&gt;&lt;/frameset&gt;&lt;/html&gt;</string>
</span><span class="cx">                 <key>WebResourceFrameName</key>
</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"> <head>
</span><span class="cx"> <script>
</span><span class="cx"> if (window.layoutTestController)
</span><del>- layoutTestController.dumpAsWebArchive();
</del><ins>+ layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <frameset rows="*">
</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">                 <string>&lt;html&gt;&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;&lt;body&gt;
</span><span class="cx"> &lt;img src="resources/apple.gif"&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"> <head>
</span><span class="cx"> <script>
</span><span class="cx"> if (window.layoutTestController)
</span><del>- layoutTestController.dumpAsWebArchive();
</del><ins>+ layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</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">                 <string>&lt;html&gt;&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;&lt;body&gt;
</span><span class="cx"> &lt;form&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"> <head>
</span><span class="cx"> <script>
</span><span class="cx"> if (window.layoutTestController)
</span><del>- layoutTestController.dumpAsWebArchive();
</del><ins>+ layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</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">                 <string>&lt;html&gt;&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="stylesheet" href="resources/test-style.css" type="text/css"&gt;
</span><span class="cx"> &lt;/head&gt;&lt;body&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"> <head>
</span><span class="cx"> <script>
</span><span class="cx"> if (window.layoutTestController)
</span><del>- layoutTestController.dumpAsWebArchive();
</del><ins>+ layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> </script>
</span><span class="cx"> <link rel="stylesheet" href="resources/test-style.css" type="text/css">
</span><span class="cx"> </head>
</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">                 <string>&lt;html&gt;&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;&lt;body&gt;
</span><span class="cx"> &lt;object data="resources/apple.gif" type="image/gif"&gt;&lt;/object&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"> <head>
</span><span class="cx"> <script>
</span><span class="cx"> if (window.layoutTestController)
</span><del>- layoutTestController.dumpAsWebArchive();
</del><ins>+ layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</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">                 <dict>
</span><span class="cx">                         <key>WebResourceData</key>
</span><span class="cx">                         <string>if (window.layoutTestController)
</span><del>- layoutTestController.dumpAsWebArchive();
</del><ins>+ layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> </string>
</span><span class="cx">                         <key>WebResourceMIMEType</key>
</span><span class="cx">                         <string>application/x-javascript</string>
</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">                 <string>&lt;html&gt;&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;&lt;body&gt;
</span><span class="cx"> &lt;table background="resources/apple.gif" style="width: 52px; height: 64px;"&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"> <head>
</span><span class="cx"> <script>
</span><span class="cx"> if (window.layoutTestController)
</span><del>- layoutTestController.dumpAsWebArchive();
</del><ins>+ layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</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">                 <string>&lt;html&gt;&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;&lt;body&gt;
</span><span class="cx"> &lt;table&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"> <head>
</span><span class="cx"> <script>
</span><span class="cx"> if (window.layoutTestController)
</span><del>- layoutTestController.dumpAsWebArchive();
</del><ins>+ layoutTestController.dumpDOMAsWebArchive();
</ins><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</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 <jim.correia@pobox.com>
+
+ 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 "about:blank" 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 <sullivan@apple.com>
</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 <ddkilzer@webkit.org>
+
+ 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 <kmccullough@apple.com>
</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:@"\n"];
</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:@"svg/W3C-SVG-1.1"].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 = "[documentElement innerText]";
</span><del>- else if (dumpAsWebArchive)
</del><ins>+ else if (dumpDOMAsWebArchive)
</ins><span class="cx"> errorMessage = "[[frame DOMDocument] webArchive]";
</span><ins>+ else if (dumpSourceAsWebArchive)
+ errorMessage = "[[frame dataSource] webArchive]";
</ins><span class="cx"> else
</span><span class="cx"> errorMessage = "[frame renderTreeAsExternalRepresentation]";
</span><span class="cx"> printf("ERROR: nil result from %s", errorMessage);
</span><span class="cx"> } else {
</span><span class="cx"> fputs([result UTF8String], stdout);
</span><del>- if (!dumpAsText && !dumpAsWebArchive)
</del><ins>+ if (!dumpAsText && !dumpDOMAsWebArchive && !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 && !dumpAsWebArchive) {
</del><ins>+ if (!dumpAsText && !dumpDOMAsWebArchive && !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>