<!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" />
<title>[210467] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/210467">210467</a></dd>
<dt>Author</dt> <dd>aestes@apple.com</dd>
<dt>Date</dt> <dd>2017-01-06 19:49:04 -0800 (Fri, 06 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>[Cocoa] Consolidate duplicate copies of WebArchiveDumpSupport in DRT and WKTR into WebCoreTestSupport
https://bugs.webkit.org/show_bug.cgi?id=166789
Reviewed by Alex Christensen.
Source/WebCore:
There were duplicate implementations of WebArchiveDumpSupport in DumpRenderTree and
WebKitTestRunner. This change consolidates these into a single implementation in
WebCoreTestSupport.
* PlatformMac.cmake: Added WebArchiveDumpSupport.mm to WebCoreTestSupport.
* WebCore.xcodeproj/project.pbxproj: Ditto. Also made WebArchiveDumpSupport.h a Private header.
* platform/spi/cf/CFNetworkSPI.h: Moved CFNetwork forward declarations from
WebArchiveDumpSupport to here.
* testing/cocoa/WebArchiveDumpSupport.h: Added.
* testing/cocoa/WebArchiveDumpSupport.mm: Merged WebArchiveDumpSupport.cpp and
WebArchiveDumpSupport{Cocoa,Mac}.mm into a single file.
Tools:
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/PlatformMac.cmake:
* DumpRenderTree/cf/WebArchiveDumpSupport.cpp: Removed.
* DumpRenderTree/cf/WebArchiveDumpSupport.h: Removed.
* DumpRenderTree/mac/DumpRenderTree.mm:
Called WebCoreTestSupport::createXMLStringFromWebArchiveData() instead of
createXMLStringFromWebArchiveData().
* DumpRenderTree/mac/WebArchiveDumpSupportMac.mm: Removed.
* WebKitTestRunner/Configurations/Base.xcconfig:
Added $(BUILT_PRODUCTS_DIR)/WebCoreTestSupport to HEADER_SEARCH_PATHS.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dumpDOMAsWebArchive):
Called WebCoreTestSupport::createXMLStringFromWebArchiveData() instead of
createXMLStringFromWebArchiveData().
* WebKitTestRunner/InjectedBundle/cocoa/WebArchiveDumpSupportCocoa.mm: Removed.
* WebKitTestRunner/PlatformMac.cmake:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/cf/WebArchiveDumpSupport.h: Removed.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorePlatformMaccmake">trunk/Source/WebCore/PlatformMac.cmake</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformspicfCFNetworkSPIh">trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeDumpRenderTreexcodeprojprojectpbxproj">trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsDumpRenderTreePlatformMaccmake">trunk/Tools/DumpRenderTree/PlatformMac.cmake</a></li>
<li><a href="#trunkToolsDumpRenderTreemacDumpRenderTreemm">trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerConfigurationsBasexcconfig">trunk/Tools/WebKitTestRunner/Configurations/Base.xcconfig</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlePagecpp">trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerPlatformMaccmake">trunk/Tools/WebKitTestRunner/PlatformMac.cmake</a></li>
<li><a href="#trunkToolsWebKitTestRunnerWebKitTestRunnerxcodeprojprojectpbxproj">trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/Source/WebCore/testing/cocoa/</li>
<li><a href="#trunkSourceWebCoretestingcocoaWebArchiveDumpSupporth">trunk/Source/WebCore/testing/cocoa/WebArchiveDumpSupport.h</a></li>
<li><a href="#trunkSourceWebCoretestingcocoaWebArchiveDumpSupportmm">trunk/Source/WebCore/testing/cocoa/WebArchiveDumpSupport.mm</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li>trunk/Tools/DumpRenderTree/cf/</li>
<li><a href="#trunkToolsDumpRenderTreemacWebArchiveDumpSupportMacmm">trunk/Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundlecocoaWebArchiveDumpSupportCocoamm">trunk/Tools/WebKitTestRunner/InjectedBundle/cocoa/WebArchiveDumpSupportCocoa.mm</a></li>
<li>trunk/Tools/WebKitTestRunner/cf/</li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Source/WebCore/ChangeLog        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2017-01-06 Andy Estes <aestes@apple.com>
+
+ [Cocoa] Consolidate duplicate copies of WebArchiveDumpSupport in DRT and WKTR into WebCoreTestSupport
+ https://bugs.webkit.org/show_bug.cgi?id=166789
+
+ Reviewed by Alex Christensen.
+
+ There were duplicate implementations of WebArchiveDumpSupport in DumpRenderTree and
+ WebKitTestRunner. This change consolidates these into a single implementation in
+ WebCoreTestSupport.
+
+ * PlatformMac.cmake: Added WebArchiveDumpSupport.mm to WebCoreTestSupport.
+ * WebCore.xcodeproj/project.pbxproj: Ditto. Also made WebArchiveDumpSupport.h a Private header.
+ * platform/spi/cf/CFNetworkSPI.h: Moved CFNetwork forward declarations from
+ WebArchiveDumpSupport to here.
+ * testing/cocoa/WebArchiveDumpSupport.h: Added.
+ * testing/cocoa/WebArchiveDumpSupport.mm: Merged WebArchiveDumpSupport.cpp and
+ WebArchiveDumpSupport{Cocoa,Mac}.mm into a single file.
+
</ins><span class="cx"> 2017-01-06 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Minor cleanups to IndentOutdentCommand and related code
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformMac.cmake (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformMac.cmake        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Source/WebCore/PlatformMac.cmake        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -749,6 +749,8 @@
</span><span class="cx"> testing/Internals.mm
</span><span class="cx"> testing/MockContentFilter.cpp
</span><span class="cx"> testing/MockContentFilterSettings.cpp
</span><ins>+
+ testing/cocoa/WebArchiveDumpSupport.mm
</ins><span class="cx"> )
</span><span class="cx">
</span><span class="cx"> set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-compatibility_version 1 -current_version ${WEBKIT_MAC_VERSION}")
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -3927,6 +3927,9 @@
</span><span class="cx">                 A14978711ABAF3A500CEF7E4 /* PlatformContentFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A14978701ABAF3A500CEF7E4 /* PlatformContentFilter.h */; };
</span><span class="cx">                 A15E31F31E0CB0B2004B371C /* QuickLook.mm in Sources */ = {isa = PBXBuildFile; fileRef = A15E31F21E0CB0AA004B371C /* QuickLook.mm */; };
</span><span class="cx">                 A15E31F41E0CB0B5004B371C /* QuickLook.h in Headers */ = {isa = PBXBuildFile; fileRef = A15E31F11E0CB0AA004B371C /* QuickLook.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                A1763F3E1E205234001D58DE /* WebArchiveDumpSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = A1763F3C1E205234001D58DE /* WebArchiveDumpSupport.mm */; };
+                A1763F3F1E205234001D58DE /* WebArchiveDumpSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = A1763F3D1E205234001D58DE /* WebArchiveDumpSupport.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                A1763F411E20586E001D58DE /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1763F401E20586E001D58DE /* CFNetwork.framework */; };
</ins><span class="cx">                 A17C81220F2A5CF7005DAAEB /* HTMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */; };
</span><span class="cx">                 A17C81230F2A5CF7005DAAEB /* HTMLElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */; };
</span><span class="cx">                 A182D5B71BE722670087A7CC /* SettingsCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = A182D5B61BE722620087A7CC /* SettingsCocoa.mm */; };
</span><span class="lines">@@ -11588,6 +11591,9 @@
</span><span class="cx">                 A14978701ABAF3A500CEF7E4 /* PlatformContentFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformContentFilter.h; sourceTree = "<group>"; };
</span><span class="cx">                 A15E31F11E0CB0AA004B371C /* QuickLook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuickLook.h; sourceTree = "<group>"; };
</span><span class="cx">                 A15E31F21E0CB0AA004B371C /* QuickLook.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = QuickLook.mm; sourceTree = "<group>"; };
</span><ins>+                A1763F3C1E205234001D58DE /* WebArchiveDumpSupport.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebArchiveDumpSupport.mm; sourceTree = "<group>"; };
+                A1763F3D1E205234001D58DE /* WebArchiveDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebArchiveDumpSupport.h; sourceTree = "<group>"; };
+                A1763F401E20586E001D58DE /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
</ins><span class="cx">                 A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElementFactory.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLElementFactory.h; sourceTree = "<group>"; };
</span><span class="cx">                 A182D5B61BE722620087A7CC /* SettingsCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SettingsCocoa.mm; sourceTree = "<group>"; };
</span><span class="lines">@@ -14958,6 +14964,7 @@
</span><span class="cx">                         isa = PBXFrameworksBuildPhase;
</span><span class="cx">                         buildActionMask = 2147483647;
</span><span class="cx">                         files = (
</span><ins>+                                A1763F411E20586E001D58DE /* CFNetwork.framework in Frameworks */,
</ins><span class="cx">                                 AA5F3B9116CC5BEB00455EB0 /* CoreFoundation.framework in Frameworks */,
</span><span class="cx">                                 41230913138C42FF00BCCFCA /* JavaScriptCore.framework in Frameworks */,
</span><span class="cx">                                 4123081B138C429700BCCFCA /* WebCore.framework in Frameworks */,
</span><span class="lines">@@ -15426,6 +15433,7 @@
</span><span class="cx">                 0867D69AFE84028FC02AAC07 /* Frameworks */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                A1763F401E20586E001D58DE /* CFNetwork.framework */,
</ins><span class="cx">                                 FD2DBF0E12B048A300ED98C6 /* Accelerate.framework */,
</span><span class="cx">                                 FD2DBF0F12B048A300ED98C6 /* AudioToolbox.framework */,
</span><span class="cx">                                 AA5F3B9016CC5BEB00455EB0 /* CoreFoundation.framework */,
</span><span class="lines">@@ -16564,6 +16572,7 @@
</span><span class="cx">                 417DA4CD13734204007C57FB /* testing */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                A1763F3B1E2051AB001D58DE /* cocoa */,
</ins><span class="cx">                                 41815C1B138319630057AAA4 /* js */,
</span><span class="cx">                                 51714EA91CF65899004723C4 /* GCObservation.cpp */,
</span><span class="cx">                                 51714EAA1CF65899004723C4 /* GCObservation.h */,
</span><span class="lines">@@ -19660,6 +19669,15 @@
</span><span class="cx">                         path = ios;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="cx">                 };
</span><ins>+                A1763F3B1E2051AB001D58DE /* cocoa */ = {
+                        isa = PBXGroup;
+                        children = (
+                                A1763F3D1E205234001D58DE /* WebArchiveDumpSupport.h */,
+                                A1763F3C1E205234001D58DE /* WebArchiveDumpSupport.mm */,
+                        );
+                        path = cocoa;
+                        sourceTree = "<group>";
+                };
</ins><span class="cx">                 A516E8B2136E04C00076C3C0 /* ios */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -24806,6 +24824,7 @@
</span><span class="cx">                                 2D6F3E911C1ECB2F0061DBD4 /* MockPageOverlay.h in Headers */,
</span><span class="cx">                                 2D97F04819DD4140001EE9C3 /* MockPageOverlayClient.h in Headers */,
</span><span class="cx">                                 AA5F3B8D16CC33D100455EB0 /* PlatformSpeechSynthesizerMock.h in Headers */,
</span><ins>+                                A1763F3F1E205234001D58DE /* WebArchiveDumpSupport.h in Headers */,
</ins><span class="cx">                                 41815C1F138319830057AAA4 /* WebCoreTestSupport.h in Headers */,
</span><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="lines">@@ -28695,6 +28714,7 @@
</span><span class="cx">                                 53E29E5E167A8A1900586D3D /* InternalSettingsGenerated.cpp in Sources */,
</span><span class="cx">                                 51714EB01CF665CE004723C4 /* JSGCObservation.cpp in Sources */,
</span><span class="cx">                                 417DA71D13735DFA007C57FB /* JSInternals.cpp in Sources */,
</span><ins>+                                A1763F3E1E205234001D58DE /* WebArchiveDumpSupport.mm in Sources */,
</ins><span class="cx">                                 A740B5A714C935AF00A77FA4 /* JSInternalSettings.cpp in Sources */,
</span><span class="cx">                                 53ED3FDE167A88E7006762E6 /* JSInternalSettingsGenerated.cpp in Sources */,
</span><span class="cx">                                 A740B59714C935AF00A77FA4 /* JSMallocStatistics.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformspicfCFNetworkSPIh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -55,6 +55,13 @@
</span><span class="cx"> _TimingDataOptionsEnableW3CNavigationTiming = (1 << 0)
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+enum CFURLCacheStoragePolicy {
+ kCFURLCacheStorageAllowed = 0,
+ kCFURLCacheStorageAllowedInMemoryOnly = 1,
+ kCFURLCacheStorageNotAllowed = 2
+};
+typedef enum CFURLCacheStoragePolicy CFURLCacheStoragePolicy;
+
</ins><span class="cx"> typedef const struct _CFCachedURLResponse* CFCachedURLResponseRef;
</span><span class="cx"> typedef const struct _CFURLCache* CFURLCacheRef;
</span><span class="cx"> typedef const struct _CFURLCredential* CFURLCredentialRef;
</span><span class="lines">@@ -151,8 +158,8 @@
</span><span class="cx"> void CFURLConnectionInvalidateConnectionCache();
</span><span class="cx">
</span><span class="cx"> extern CFStringRef const kCFHTTPCookieLocalFileDomain;
</span><ins>+extern const CFStringRef kCFHTTPVersion1_1;
</ins><span class="cx"> extern const CFStringRef kCFURLRequestAllowAllPOSTCaching;
</span><del>-
</del><span class="cx"> extern const CFStringRef _kCFURLConnectionPropertyShouldSniff;
</span><span class="cx">
</span><span class="cx"> CFHTTPCookieStorageRef _CFHTTPCookieStorageGetDefault(CFAllocatorRef);
</span><span class="lines">@@ -174,6 +181,13 @@
</span><span class="cx"> void CFURLResponseSetMIMEType(CFURLResponseRef, CFStringRef);
</span><span class="cx"> CFHTTPCookieStorageRef _CFURLStorageSessionCopyCookieStorage(CFAllocatorRef, CFURLStorageSessionRef);
</span><span class="cx"> CFArrayRef _CFHTTPCookieStorageCopyCookiesForURLWithMainDocumentURL(CFHTTPCookieStorageRef inCookieStorage, CFURLRef inURL, CFURLRef inMainDocumentURL, Boolean sendSecureCookies);
</span><ins>+CFStringRef CFURLResponseGetTextEncodingName(CFURLResponseRef);
+SInt64 CFURLResponseGetExpectedContentLength(CFURLResponseRef);
+CFTypeID CFURLResponseGetTypeID();
+CFURLResponseRef CFURLResponseCreate(CFAllocatorRef, CFURLRef, CFStringRef mimeType, SInt64 expectedContentLength, CFStringRef textEncodingName, CFURLCacheStoragePolicy);
+void CFURLResponseSetExpectedContentLength(CFURLResponseRef, SInt64 length);
+CFURLResponseRef CFURLResponseCreateWithHTTPResponse(CFAllocatorRef, CFURLRef, CFHTTPMessageRef, CFURLCacheStoragePolicy);
+
</ins><span class="cx"> #endif // !PLATFORM(WIN)
</span><span class="cx">
</span><span class="cx"> WTF_EXTERN_C_END
</span></span></pre></div>
<a id="trunkSourceWebCoretestingcocoaWebArchiveDumpSupporth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/testing/cocoa/WebArchiveDumpSupport.h (0 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/cocoa/WebArchiveDumpSupport.h         (rev 0)
+++ trunk/Source/WebCore/testing/cocoa/WebArchiveDumpSupport.h        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+/*
+ * Copyright (C) 2007-2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "WebCoreTestSupport.h"
+#include <CoreFoundation/CoreFoundation.h>
+
+namespace WebCoreTestSupport {
+
+CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData) TEST_SUPPORT_EXPORT;
+
+} // namespace WebCoreTestSupport
</ins></span></pre></div>
<a id="trunkSourceWebCoretestingcocoaWebArchiveDumpSupportmmfromrev210466trunkToolsWebKitTestRunnercfWebArchiveDumpSupportcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/testing/cocoa/WebArchiveDumpSupport.mm (from rev 210466, trunk/Tools/WebKitTestRunner/cf/WebArchiveDumpSupport.cpp) (0 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/cocoa/WebArchiveDumpSupport.mm         (rev 0)
+++ trunk/Source/WebCore/testing/cocoa/WebArchiveDumpSupport.mm        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -0,0 +1,237 @@
</span><ins>+/*
+ * Copyright (C) 2007-2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "WebArchiveDumpSupport.h"
+
+#import "CFNetworkSPI.h"
+#import "MIMETypeRegistry.h"
+#import <CFNetwork/CFHTTPMessage.h>
+#import <CFNetwork/CFNetwork.h>
+#import <wtf/RetainPtr.h>
+
+using namespace WebCore;
+
+namespace WebCoreTestSupport {
+
+static CFURLResponseRef createCFURLResponseFromResponseData(CFDataRef responseData)
+{
+ RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)responseData]);
+ NSURLResponse *response = [unarchiver decodeObjectForKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
+ [unarchiver finishDecoding];
+
+ if (![response isKindOfClass:[NSHTTPURLResponse class]])
+ return CFURLResponseCreate(kCFAllocatorDefault, (CFURLRef)response.URL, (CFStringRef)response.MIMEType, response.expectedContentLength, (CFStringRef)response.textEncodingName, kCFURLCacheStorageAllowed);
+
+ NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
+
+ // NSURLResponse is not toll-free bridged to CFURLResponse.
+ RetainPtr<CFHTTPMessageRef> httpMessage = adoptCF(CFHTTPMessageCreateResponse(kCFAllocatorDefault, httpResponse.statusCode, nullptr, kCFHTTPVersion1_1));
+
+ NSDictionary *headerFields = httpResponse.allHeaderFields;
+ for (NSString *headerField in [headerFields keyEnumerator])
+ CFHTTPMessageSetHeaderFieldValue(httpMessage.get(), (CFStringRef)headerField, (CFStringRef)[headerFields objectForKey:headerField]);
+
+ return CFURLResponseCreateWithHTTPResponse(kCFAllocatorDefault, (CFURLRef)response.URL, httpMessage.get(), kCFURLCacheStorageAllowed);
+}
+
+static CFArrayRef supportedNonImageMIMETypes()
+{
+ auto array = adoptNS([[NSMutableArray alloc] init]);
+ for (auto& mimeType : MIMETypeRegistry::getSupportedNonImageMIMETypes())
+ [array addObject:mimeType];
+ return (CFArrayRef)array.autorelease();
+}
+
+static void convertMIMEType(CFMutableStringRef mimeType)
+{
+ // Workaround for <rdar://problem/6234318> with Dashcode 2.0
+ if (CFStringCompare(mimeType, CFSTR("application/x-javascript"), kCFCompareAnchored | kCFCompareCaseInsensitive) == kCFCompareEqualTo)
+ CFStringReplaceAll(mimeType, CFSTR("text/javascript"));
+}
+
+static void convertWebResourceDataToString(CFMutableDictionaryRef resource)
+{
+ CFMutableStringRef mimeType = (CFMutableStringRef)CFDictionaryGetValue(resource, CFSTR("WebResourceMIMEType"));
+ CFStringLowercase(mimeType, CFLocaleGetSystem());
+ convertMIMEType(mimeType);
+
+ CFArrayRef supportedMIMETypes = supportedNonImageMIMETypes();
+ if (CFStringHasPrefix(mimeType, CFSTR("text/")) || CFArrayContainsValue(supportedMIMETypes, CFRangeMake(0, CFArrayGetCount(supportedMIMETypes)), mimeType)) {
+ CFStringRef textEncodingName = static_cast<CFStringRef>(CFDictionaryGetValue(resource, CFSTR("WebResourceTextEncodingName")));
+ CFStringEncoding stringEncoding;
+ if (textEncodingName && CFStringGetLength(textEncodingName))
+ stringEncoding = CFStringConvertIANACharSetNameToEncoding(textEncodingName);
+ else
+ stringEncoding = kCFStringEncodingUTF8;
+
+ CFDataRef data = static_cast<CFDataRef>(CFDictionaryGetValue(resource, CFSTR("WebResourceData")));
+ RetainPtr<CFStringRef> dataAsString = adoptCF(CFStringCreateFromExternalRepresentation(kCFAllocatorDefault, data, stringEncoding));
+ if (dataAsString)
+ CFDictionarySetValue(resource, CFSTR("WebResourceData"), dataAsString.get());
+ }
+}
+
+static void normalizeHTTPResponseHeaderFields(CFMutableDictionaryRef fields)
+{
+ // Normalize headers
+ if (CFDictionaryContainsKey(fields, CFSTR("Date")))
+ CFDictionarySetValue(fields, CFSTR("Date"), CFSTR("Sun, 16 Nov 2008 17:00:00 GMT"));
+ if (CFDictionaryContainsKey(fields, CFSTR("Last-Modified")))
+ CFDictionarySetValue(fields, CFSTR("Last-Modified"), CFSTR("Sun, 16 Nov 2008 16:55:00 GMT"));
+ if (CFDictionaryContainsKey(fields, CFSTR("Etag")))
+ CFDictionarySetValue(fields, CFSTR("Etag"), CFSTR("\"301925-21-45c7d72d3e780\""));
+ if (CFDictionaryContainsKey(fields, CFSTR("Server")))
+ CFDictionarySetValue(fields, CFSTR("Server"), CFSTR("Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7l PHP/5.2.6"));
+
+ // Remove headers
+ CFDictionaryRemoveValue(fields, CFSTR("Connection"));
+ CFDictionaryRemoveValue(fields, CFSTR("Keep-Alive"));
+}
+
+static void normalizeWebResourceURL(CFMutableStringRef webResourceURL)
+{
+ static CFIndex fileUrlLength = CFStringGetLength(CFSTR("file://"));
+ CFRange layoutTestsWebArchivePathRange = CFStringFind(webResourceURL, CFSTR("/LayoutTests/"), kCFCompareBackwards);
+ if (layoutTestsWebArchivePathRange.location == kCFNotFound)
+ return;
+ CFRange currentWorkingDirectoryRange = CFRangeMake(fileUrlLength, layoutTestsWebArchivePathRange.location - fileUrlLength);
+ CFStringReplace(webResourceURL, currentWorkingDirectoryRange, CFSTR(""));
+}
+
+static void convertWebResourceResponseToDictionary(CFMutableDictionaryRef propertyList)
+{
+ CFDataRef responseData = static_cast<CFDataRef>(CFDictionaryGetValue(propertyList, CFSTR("WebResourceResponse"))); // WebResourceResponseKey in WebResource.m
+ if (CFGetTypeID(responseData) != CFDataGetTypeID())
+ return;
+
+ RetainPtr<CFURLResponseRef> response = adoptCF(createCFURLResponseFromResponseData(responseData));
+ if (!response)
+ return;
+
+ RetainPtr<CFMutableDictionaryRef> responseDictionary = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
+
+ RetainPtr<CFMutableStringRef> urlString = adoptCF(CFStringCreateMutableCopy(kCFAllocatorDefault, 0, CFURLGetString(CFURLResponseGetURL(response.get()))));
+ normalizeWebResourceURL(urlString.get());
+ CFDictionarySetValue(responseDictionary.get(), CFSTR("URL"), urlString.get());
+
+ RetainPtr<CFMutableStringRef> mimeTypeString = adoptCF(CFStringCreateMutableCopy(kCFAllocatorDefault, 0, CFURLResponseGetMIMEType(response.get())));
+ convertMIMEType(mimeTypeString.get());
+ CFDictionarySetValue(responseDictionary.get(), CFSTR("MIMEType"), mimeTypeString.get());
+
+ CFStringRef textEncodingName = CFURLResponseGetTextEncodingName(response.get());
+ if (textEncodingName)
+ CFDictionarySetValue(responseDictionary.get(), CFSTR("textEncodingName"), textEncodingName);
+
+ SInt64 expectedContentLength = CFURLResponseGetExpectedContentLength(response.get());
+ RetainPtr<CFNumberRef> expectedContentLengthNumber = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &expectedContentLength));
+ CFDictionarySetValue(responseDictionary.get(), CFSTR("expectedContentLength"), expectedContentLengthNumber.get());
+
+ if (CFHTTPMessageRef httpMessage = CFURLResponseGetHTTPResponse(response.get())) {
+ RetainPtr<CFDictionaryRef> allHeaders = adoptCF(CFHTTPMessageCopyAllHeaderFields(httpMessage));
+ RetainPtr<CFMutableDictionaryRef> allHeaderFields = adoptCF(CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, allHeaders.get()));
+ normalizeHTTPResponseHeaderFields(allHeaderFields.get());
+ CFDictionarySetValue(responseDictionary.get(), CFSTR("allHeaderFields"), allHeaderFields.get());
+
+ CFIndex statusCode = CFHTTPMessageGetResponseStatusCode(httpMessage);
+ RetainPtr<CFNumberRef> statusCodeNumber = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberCFIndexType, &statusCode));
+ CFDictionarySetValue(responseDictionary.get(), CFSTR("statusCode"), statusCodeNumber.get());
+ }
+
+ CFDictionarySetValue(propertyList, CFSTR("WebResourceResponse"), responseDictionary.get());
+}
+
+static CFComparisonResult compareResourceURLs(const void *val1, const void *val2, void *)
+{
+ CFStringRef url1 = static_cast<CFStringRef>(CFDictionaryGetValue(static_cast<CFDictionaryRef>(val1), CFSTR("WebResourceURL")));
+ CFStringRef url2 = static_cast<CFStringRef>(CFDictionaryGetValue(static_cast<CFDictionaryRef>(val2), CFSTR("WebResourceURL")));
+
+ return CFStringCompare(url1, url2, kCFCompareAnchored);
+}
+
+CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData)
+{
+ CFErrorRef error = 0;
+ CFPropertyListFormat format = kCFPropertyListBinaryFormat_v1_0;
+ RetainPtr<CFMutableDictionaryRef> propertyList = adoptCF((CFMutableDictionaryRef)CFPropertyListCreateWithData(kCFAllocatorDefault, webArchiveData, kCFPropertyListMutableContainersAndLeaves, &format, &error));
+
+ if (!propertyList) {
+ if (error)
+ return CFErrorCopyDescription(error);
+ return static_cast<CFStringRef>(CFRetain(CFSTR("An unknown error occurred converting data to property list.")));
+ }
+
+ RetainPtr<CFMutableArrayRef> resources = adoptCF(CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks));
+ CFArrayAppendValue(resources.get(), propertyList.get());
+
+ while (CFArrayGetCount(resources.get())) {
+ RetainPtr<CFMutableDictionaryRef> resourcePropertyList = (CFMutableDictionaryRef)CFArrayGetValueAtIndex(resources.get(), 0);
+ CFArrayRemoveValueAtIndex(resources.get(), 0);
+
+ CFMutableDictionaryRef mainResource = (CFMutableDictionaryRef)CFDictionaryGetValue(resourcePropertyList.get(), CFSTR("WebMainResource"));
+ normalizeWebResourceURL((CFMutableStringRef)CFDictionaryGetValue(mainResource, CFSTR("WebResourceURL")));
+ convertWebResourceDataToString(mainResource);
+
+ // Add subframeArchives to list for processing
+ CFMutableArrayRef subframeArchives = (CFMutableArrayRef)CFDictionaryGetValue(resourcePropertyList.get(), CFSTR("WebSubframeArchives")); // WebSubframeArchivesKey in WebArchive.m
+ if (subframeArchives)
+ CFArrayAppendArray(resources.get(), subframeArchives, CFRangeMake(0, CFArrayGetCount(subframeArchives)));
+
+ CFMutableArrayRef subresources = (CFMutableArrayRef)CFDictionaryGetValue(resourcePropertyList.get(), CFSTR("WebSubresources")); // WebSubresourcesKey in WebArchive.m
+ if (!subresources)
+ continue;
+
+ CFIndex subresourcesCount = CFArrayGetCount(subresources);
+ for (CFIndex i = 0; i < subresourcesCount; ++i) {
+ CFMutableDictionaryRef subresourcePropertyList = (CFMutableDictionaryRef)CFArrayGetValueAtIndex(subresources, i);
+ normalizeWebResourceURL((CFMutableStringRef)CFDictionaryGetValue(subresourcePropertyList, CFSTR("WebResourceURL")));
+ convertWebResourceResponseToDictionary(subresourcePropertyList);
+ convertWebResourceDataToString(subresourcePropertyList);
+ }
+
+ // Sort the subresources so they're always in a predictable order for the dump
+ CFArraySortValues(subresources, CFRangeMake(0, CFArrayGetCount(subresources)), compareResourceURLs, 0);
+ }
+
+ error = 0;
+
+ RetainPtr<CFDataRef> xmlData = adoptCF(CFPropertyListCreateData(kCFAllocatorDefault, propertyList.get(), kCFPropertyListXMLFormat_v1_0, 0, &error));
+
+ if (!xmlData) {
+ if (error)
+ return CFErrorCopyDescription(error);
+ return static_cast<CFStringRef>(CFRetain(CFSTR("An unknown error occurred converting property list to data.")));
+ }
+
+ RetainPtr<CFStringRef> xmlString = adoptCF(CFStringCreateFromExternalRepresentation(kCFAllocatorDefault, xmlData.get(), kCFStringEncodingUTF8));
+ RetainPtr<CFMutableStringRef> string = adoptCF(CFStringCreateMutableCopy(kCFAllocatorDefault, 0, xmlString.get()));
+
+ // Replace "Apple Computer" with "Apple" in the DTD declaration.
+ CFStringFindAndReplace(string.get(), CFSTR("-//Apple Computer//"), CFSTR("-//Apple//"), CFRangeMake(0, CFStringGetLength(string.get())), 0);
+
+ return string.leakRef();
+}
+
+} // namespace WebCoreTestSupport
</ins></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Tools/ChangeLog        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2017-01-06 Andy Estes <aestes@apple.com>
+
+ [Cocoa] Consolidate duplicate copies of WebArchiveDumpSupport in DRT and WKTR into WebCoreTestSupport
+ https://bugs.webkit.org/show_bug.cgi?id=166789
+
+ Reviewed by Alex Christensen.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/PlatformMac.cmake:
+ * DumpRenderTree/cf/WebArchiveDumpSupport.cpp: Removed.
+ * DumpRenderTree/cf/WebArchiveDumpSupport.h: Removed.
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ Called WebCoreTestSupport::createXMLStringFromWebArchiveData() instead of
+ createXMLStringFromWebArchiveData().
+ * DumpRenderTree/mac/WebArchiveDumpSupportMac.mm: Removed.
+ * WebKitTestRunner/Configurations/Base.xcconfig:
+ Added $(BUILT_PRODUCTS_DIR)/WebCoreTestSupport to HEADER_SEARCH_PATHS.
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::dumpDOMAsWebArchive):
+ Called WebCoreTestSupport::createXMLStringFromWebArchiveData() instead of
+ createXMLStringFromWebArchiveData().
+ * WebKitTestRunner/InjectedBundle/cocoa/WebArchiveDumpSupportCocoa.mm: Removed.
+ * WebKitTestRunner/PlatformMac.cmake:
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+ * WebKitTestRunner/cf/WebArchiveDumpSupport.h: Removed.
+
</ins><span class="cx"> 2017-01-06 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Minor cleanups to IndentOutdentCommand and related code
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeDumpRenderTreexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -80,8 +80,6 @@
</span><span class="cx">                 2D403F1B15087209005358D2 /* LayoutTestHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D403EA215087142005358D2 /* LayoutTestHelper.m */; };
</span><span class="cx">                 2DA2E3A51E1BA54100A3BBD0 /* DumpRenderTreeSpellChecker.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DA2E3A41E1BA54100A3BBD0 /* DumpRenderTreeSpellChecker.mm */; };
</span><span class="cx">                 31117B3D15D9A56A00163BC8 /* MockWebNotificationProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31117B3B15D9A56A00163BC8 /* MockWebNotificationProvider.mm */; };
</span><del>-                440590711268453800CFD48D /* WebArchiveDumpSupportMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */; };
-                4437730E125CBC3600AAE02C /* WebArchiveDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 44A997830FCDE86400580F10 /* WebArchiveDumpSupport.cpp */; };
</del><span class="cx">                 4464CABE1C20A08B00E5BB55 /* DumpRenderTreeAppMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4464CABD1C20A07000E5BB55 /* DumpRenderTreeAppMain.mm */; };
</span><span class="cx">                 4AD6A11413C8124000EA9737 /* FormValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AD6A11313C8124000EA9737 /* FormValue.cpp */; };
</span><span class="cx">                 5106803E15CC7B10001A8A23 /* SlowNPPNew.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5106803D15CC7B10001A8A23 /* SlowNPPNew.cpp */; };
</span><span class="lines">@@ -307,10 +305,7 @@
</span><span class="cx">                 375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher800.ttf; path = fonts/WebKitWeightWatcher800.ttf; sourceTree = "<group>"; };
</span><span class="cx">                 375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher900.ttf; path = fonts/WebKitWeightWatcher900.ttf; sourceTree = "<group>"; };
</span><span class="cx">                 417DAA1C137B3E24007C57FB /* WebCoreTestSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebCoreTestSupport.h; path = WebCoreTestSupport/WebCoreTestSupport.h; sourceTree = BUILT_PRODUCTS_DIR; };
</span><del>-                440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebArchiveDumpSupportMac.mm; path = mac/WebArchiveDumpSupportMac.mm; sourceTree = "<group>"; };
</del><span class="cx">                 4464CABD1C20A07000E5BB55 /* DumpRenderTreeAppMain.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DumpRenderTreeAppMain.mm; path = ios/DumpRenderTreeAppMain.mm; sourceTree = "<group>"; };
</span><del>-                44A997820FCDE86400580F10 /* WebArchiveDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebArchiveDumpSupport.h; path = cf/WebArchiveDumpSupport.h; sourceTree = "<group>"; };
-                44A997830FCDE86400580F10 /* WebArchiveDumpSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebArchiveDumpSupport.cpp; path = cf/WebArchiveDumpSupport.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 4AD6A11313C8124000EA9737 /* FormValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormValue.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 5106803D15CC7B10001A8A23 /* SlowNPPNew.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SlowNPPNew.cpp; path = TestNetscapePlugIn/Tests/SlowNPPNew.cpp; sourceTree = SOURCE_ROOT; };
</span><span class="cx">                 51134C9816014FDB001AA513 /* InvokeDestroysPluginWithinNPP_New.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InvokeDestroysPluginWithinNPP_New.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -499,9 +494,6 @@
</span><span class="cx">                                 A8D79CE80FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.h */,
</span><span class="cx">                                 A8D79CE90FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.m */,
</span><span class="cx">                                 2CE88FA117124CEE00734FC0 /* JavaScriptThreading.cpp */,
</span><del>-                                44A997820FCDE86400580F10 /* WebArchiveDumpSupport.h */,
-                                44A997830FCDE86400580F10 /* WebArchiveDumpSupport.cpp */,
-                                440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */,
</del><span class="cx">                                 BC9D90210C97472D0099A4A3 /* WorkQueue.cpp */,
</span><span class="cx">                                 BC9D90220C97472E0099A4A3 /* WorkQueue.h */,
</span><span class="cx">                                 BC9D90230C97472E0099A4A3 /* WorkQueueItem.h */,
</span><span class="lines">@@ -1152,8 +1144,6 @@
</span><span class="cx">                                 0F18E70D1D6BAC8C0027E547 /* UIScriptControllerIOS.mm in Sources */,
</span><span class="cx">                                 7CBBC3231DDFCF9A00786B9D /* TestOptions.mm in Sources */,
</span><span class="cx">                                 0F18E70F1D6BACB60027E547 /* UIScriptControllerMac.mm in Sources */,
</span><del>-                                4437730E125CBC3600AAE02C /* WebArchiveDumpSupport.cpp in Sources */,
-                                440590711268453800CFD48D /* WebArchiveDumpSupportMac.mm in Sources */,
</del><span class="cx">                                 BC9D90240C97472E0099A4A3 /* WorkQueue.cpp in Sources */,
</span><span class="cx">                                 BCA18B260C9B015C00114369 /* WorkQueueItemMac.mm in Sources */,
</span><span class="cx">                         );
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreePlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/PlatformMac.cmake (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/PlatformMac.cmake        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Tools/DumpRenderTree/PlatformMac.cmake        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -81,8 +81,6 @@
</span><span class="cx"> )
</span><span class="cx">
</span><span class="cx"> list(APPEND DumpRenderTree_Cpp_SOURCES
</span><del>- cf/WebArchiveDumpSupport.cpp
-
</del><span class="cx"> cg/PixelDumpSupportCG.cpp
</span><span class="cx"> )
</span><span class="cx">
</span><span class="lines">@@ -112,7 +110,6 @@
</span><span class="cx"> mac/TestRunnerMac.mm
</span><span class="cx"> mac/UIDelegate.mm
</span><span class="cx"> mac/UIScriptControllerMac.mm
</span><del>- mac/WebArchiveDumpSupportMac.mm
</del><span class="cx"> mac/WorkQueueItemMac.mm
</span><span class="cx"> )
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacDumpRenderTreemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -1743,11 +1743,11 @@
</span><span class="cx"> resultMimeType = @"application/pdf";
</span><span class="cx"> } else if (gTestRunner->dumpDOMAsWebArchive()) {
</span><span class="cx"> WebArchive *webArchive = [[mainFrame DOMDocument] webArchive];
</span><del>- resultString = CFBridgingRelease(createXMLStringFromWebArchiveData((CFDataRef)[webArchive data]));
</del><ins>+ resultString = CFBridgingRelease(WebCoreTestSupport::createXMLStringFromWebArchiveData((CFDataRef)[webArchive data]));
</ins><span class="cx"> resultMimeType = @"application/x-webarchive";
</span><span class="cx"> } else if (gTestRunner->dumpSourceAsWebArchive()) {
</span><span class="cx"> WebArchive *webArchive = [[mainFrame dataSource] webArchive];
</span><del>- resultString = CFBridgingRelease(createXMLStringFromWebArchiveData((CFDataRef)[webArchive data]));
</del><ins>+ resultString = CFBridgingRelease(WebCoreTestSupport::createXMLStringFromWebArchiveData((CFDataRef)[webArchive data]));
</ins><span class="cx"> resultMimeType = @"application/x-webarchive";
</span><span class="cx"> } else
</span><span class="cx"> resultString = [mainFrame renderTreeAsExternalRepresentationForPrinting:gTestRunner->isPrinting()];
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacWebArchiveDumpSupportMacmm"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -1,77 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "WebArchiveDumpSupport.h"
-
-#import <CFNetwork/CFHTTPMessage.h>
-#import <Foundation/Foundation.h>
-#import <WebKit/WebHTMLRepresentation.h>
-#import <wtf/RetainPtr.h>
-
-extern "C" {
-
-enum CFURLCacheStoragePolicy {
- kCFURLCacheStorageAllowed = 0,
- kCFURLCacheStorageAllowedInMemoryOnly = 1,
- kCFURLCacheStorageNotAllowed = 2
-};
-typedef enum CFURLCacheStoragePolicy CFURLCacheStoragePolicy;
-
-extern const CFStringRef kCFHTTPVersion1_1;
-
-CFURLResponseRef CFURLResponseCreate(CFAllocatorRef alloc, CFURLRef URL, CFStringRef mimeType, SInt64 expectedContentLength, CFStringRef textEncodingName, CFURLCacheStoragePolicy recommendedPolicy);
-CFURLResponseRef CFURLResponseCreateWithHTTPResponse(CFAllocatorRef alloc, CFURLRef URL, CFHTTPMessageRef httpResponse, CFURLCacheStoragePolicy recommendedPolicy);
-void CFURLResponseSetExpectedContentLength(CFURLResponseRef response, SInt64 length);
-void CFURLResponseSetMIMEType(CFURLResponseRef response, CFStringRef mimeType);
-
-}
-
-CFURLResponseRef createCFURLResponseFromResponseData(CFDataRef responseData)
-{
- // Decode NSURLResponse
- RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)responseData]);
- NSURLResponse *response = [unarchiver.get() decodeObjectForKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
- [unarchiver.get() finishDecoding];
-
- if (![response isKindOfClass:[NSHTTPURLResponse class]])
- return CFURLResponseCreate(kCFAllocatorDefault, (CFURLRef)[response URL], (CFStringRef)[response MIMEType], [response expectedContentLength], (CFStringRef)[response textEncodingName], kCFURLCacheStorageAllowed);
-
- NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
-
- // NSURLResponse is not toll-free bridged to CFURLResponse.
- RetainPtr<CFHTTPMessageRef> httpMessage = adoptCF(CFHTTPMessageCreateResponse(kCFAllocatorDefault, [httpResponse statusCode], 0, kCFHTTPVersion1_1));
-
- NSDictionary *headerFields = [httpResponse allHeaderFields];
- for (NSString *headerField in [headerFields keyEnumerator])
- CFHTTPMessageSetHeaderFieldValue(httpMessage.get(), (CFStringRef)headerField, (CFStringRef)[headerFields objectForKey:headerField]);
-
- return CFURLResponseCreateWithHTTPResponse(kCFAllocatorDefault, (CFURLRef)[response URL], httpMessage.get(), kCFURLCacheStorageAllowed);
-}
-
-CFArrayRef supportedNonImageMIMETypes()
-{
- return (CFArrayRef)[WebHTMLRepresentation supportedNonImageMIMETypes];
-}
</del></span></pre></div>
<a id="trunkToolsWebKitTestRunnerConfigurationsBasexcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/Configurations/Base.xcconfig (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/Configurations/Base.xcconfig        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Tools/WebKitTestRunner/Configurations/Base.xcconfig        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> CLANG_WARN_CXX0X_EXTENSIONS = NO;
</span><span class="cx"> CLANG_WARN_INFINITE_RECURSION = YES;
</span><span class="cx"> CLANG_WARN_SUSPICIOUS_MOVE = YES;
</span><del>-HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include $(WEBCORE_PRIVATE_HEADERS_DIR)/ForwardingHeaders $(SRCROOT)/../../Source/JavaScriptCore/icu $(NEXT_ROOT)/usr/local/include/WebCoreTestSupport;
</del><ins>+HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include $(BUILT_PRODUCTS_DIR)/WebCoreTestSupport $(WEBCORE_PRIVATE_HEADERS_DIR)/ForwardingHeaders $(SRCROOT)/../../Source/JavaScriptCore/icu $(NEXT_ROOT)/usr/local/include/WebCoreTestSupport;
</ins><span class="cx"> GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) ENABLE_DASHBOARD_SUPPORT;
</span><span class="cx"> DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
</span><span class="cx"> PREBINDING = NO
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -846,7 +846,7 @@
</span><span class="cx"> #if USE(CF)
</span><span class="cx"> WKRetainPtr<WKDataRef> wkData = adoptWK(WKBundleFrameCopyWebArchive(frame));
</span><span class="cx"> RetainPtr<CFDataRef> cfData = adoptCF(CFDataCreate(0, WKDataGetBytes(wkData.get()), WKDataGetSize(wkData.get())));
</span><del>- RetainPtr<CFStringRef> cfString = adoptCF(createXMLStringFromWebArchiveData(cfData.get()));
</del><ins>+ RetainPtr<CFStringRef> cfString = adoptCF(WebCoreTestSupport::createXMLStringFromWebArchiveData(cfData.get()));
</ins><span class="cx"> stringBuilder.append(cfString.get());
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundlecocoaWebArchiveDumpSupportCocoamm"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/WebKitTestRunner/InjectedBundle/cocoa/WebArchiveDumpSupportCocoa.mm (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/cocoa/WebArchiveDumpSupportCocoa.mm        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/cocoa/WebArchiveDumpSupportCocoa.mm        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -1,76 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010-2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "WebArchiveDumpSupport.h"
-
-#import <CFNetwork/CFHTTPMessage.h>
-#import <Foundation/Foundation.h>
-#import <WebKit/WebHTMLRepresentation.h>
-#import <wtf/RetainPtr.h>
-
-extern "C" {
-
-enum CFURLCacheStoragePolicy {
- kCFURLCacheStorageAllowed = 0,
- kCFURLCacheStorageAllowedInMemoryOnly = 1,
- kCFURLCacheStorageNotAllowed = 2
-};
-typedef enum CFURLCacheStoragePolicy CFURLCacheStoragePolicy;
-
-extern const CFStringRef kCFHTTPVersion1_1;
-
-CFURLResponseRef CFURLResponseCreate(CFAllocatorRef, CFURLRef, CFStringRef mimeType, SInt64 expectedContentLength, CFStringRef textEncodingName, CFURLCacheStoragePolicy recommendedPolicy);
-CFURLResponseRef CFURLResponseCreateWithHTTPResponse(CFAllocatorRef, CFURLRef, CFHTTPMessageRef httpResponse, CFURLCacheStoragePolicy recommendedPolicy);
-void CFURLResponseSetExpectedContentLength(CFURLResponseRef, SInt64 length);
-void CFURLResponseSetMIMEType(CFURLResponseRef, CFStringRef mimeType);
-
-}
-
-CFURLResponseRef createCFURLResponseFromResponseData(CFDataRef responseData)
-{
- RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)responseData]);
- NSURLResponse *response = [unarchiver decodeObjectForKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
- [unarchiver finishDecoding];
-
- if (![response isKindOfClass:[NSHTTPURLResponse class]])
- return CFURLResponseCreate(kCFAllocatorDefault, (CFURLRef)response.URL, (CFStringRef)response.MIMEType, response.expectedContentLength, (CFStringRef)response.textEncodingName, kCFURLCacheStorageAllowed);
-
- NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
-
- // NSURLResponse is not toll-free bridged to CFURLResponse.
- RetainPtr<CFHTTPMessageRef> httpMessage = adoptCF(CFHTTPMessageCreateResponse(kCFAllocatorDefault, httpResponse.statusCode, nullptr, kCFHTTPVersion1_1));
-
- NSDictionary *headerFields = httpResponse.allHeaderFields;
- for (NSString *headerField in [headerFields keyEnumerator])
- CFHTTPMessageSetHeaderFieldValue(httpMessage.get(), (CFStringRef)headerField, (CFStringRef)[headerFields objectForKey:headerField]);
-
- return CFURLResponseCreateWithHTTPResponse(kCFAllocatorDefault, (CFURLRef)response.URL, httpMessage.get(), kCFURLCacheStorageAllowed);
-}
-
-CFArrayRef supportedNonImageMIMETypes()
-{
- return (CFArrayRef)[WebHTMLRepresentation supportedNonImageMIMETypes];
-}
</del></span></pre></div>
<a id="trunkToolsWebKitTestRunnerPlatformMaccmake"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/PlatformMac.cmake (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/PlatformMac.cmake        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Tools/WebKitTestRunner/PlatformMac.cmake        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -33,11 +33,9 @@
</span><span class="cx">
</span><span class="cx"> list(APPEND WebKitTestRunnerInjectedBundle_SOURCES
</span><span class="cx"> ${WEBKIT_TESTRUNNER_DIR}/cocoa/CrashReporterInfo.mm
</span><del>- ${WEBKIT_TESTRUNNER_DIR}/cf/WebArchiveDumpSupport.cpp
</del><span class="cx">
</span><span class="cx"> ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/cocoa/ActivateFontsCocoa.mm
</span><span class="cx"> ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/cocoa/InjectedBundlePageCocoa.mm
</span><del>- ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/cocoa/WebArchiveDumpSupportCocoa.mm
</del><span class="cx">
</span><span class="cx"> ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/mac/AccessibilityControllerMac.mm
</span><span class="cx"> ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/mac/AccessibilityNotificationHandler.mm
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerWebKitTestRunnerxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj (210466 => 210467)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj        2017-01-07 02:59:12 UTC (rev 210466)
+++ trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj        2017-01-07 03:49:04 UTC (rev 210467)
</span><span class="lines">@@ -78,8 +78,6 @@
</span><span class="cx">                 5641E2D014335E95008307E5 /* JSTextInputController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5641E2CE14335E95008307E5 /* JSTextInputController.cpp */; };
</span><span class="cx">                 5664A49A14326384008881BE /* TextInputController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5664A49814326384008881BE /* TextInputController.cpp */; };
</span><span class="cx">                 5670B8281386FCA5002EB355 /* EventSenderProxy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5670B8271386FCA5002EB355 /* EventSenderProxy.mm */; };
</span><del>-                5C45C30F17398E290079714E /* WebArchiveDumpSupportCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C45C30E17398E290079714E /* WebArchiveDumpSupportCocoa.mm */; };
-                5C45C31317398E480079714E /* WebArchiveDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C45C31117398E480079714E /* WebArchiveDumpSupport.cpp */; };
</del><span class="cx">                 6510A78211EC643800410867 /* AHEM____.TTF in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77711EC643800410867 /* AHEM____.TTF */; };
</span><span class="cx">                 6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */; };
</span><span class="cx">                 6510A78511EC643800410867 /* WebKitWeightWatcher200.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */; };
</span><span class="lines">@@ -272,9 +270,6 @@
</span><span class="cx">                 5670B8271386FCA5002EB355 /* EventSenderProxy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EventSenderProxy.mm; sourceTree = "<group>"; };
</span><span class="cx">                 583913D014335E95008307E5 /* JSAccessibilityController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAccessibilityController.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 583913D114335E95008307E5 /* JSAccessibilityController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAccessibilityController.h; sourceTree = "<group>"; };
</span><del>-                5C45C30E17398E290079714E /* WebArchiveDumpSupportCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebArchiveDumpSupportCocoa.mm; sourceTree = "<group>"; };
-                5C45C31117398E480079714E /* WebArchiveDumpSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebArchiveDumpSupport.cpp; path = cf/WebArchiveDumpSupport.cpp; sourceTree = SOURCE_ROOT; };
-                5C45C31217398E480079714E /* WebArchiveDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebArchiveDumpSupport.h; path = cf/WebArchiveDumpSupport.h; sourceTree = SOURCE_ROOT; };
</del><span class="cx">                 6510A77711EC643800410867 /* AHEM____.TTF */ = {isa = PBXFileReference; lastKnownFileType = file; name = "AHEM____.TTF"; path = "fonts/AHEM____.TTF"; sourceTree = "<group>"; };
</span><span class="cx">                 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher100.ttf; path = fonts/WebKitWeightWatcher100.ttf; sourceTree = "<group>"; };
</span><span class="cx">                 6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher200.ttf; path = fonts/WebKitWeightWatcher200.ttf; sourceTree = "<group>"; };
</span><span class="lines">@@ -506,7 +501,6 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 65EB859F11EC67CC0034D300 /* ActivateFontsCocoa.mm */,
</span><span class="cx">                                 0FEB909E1905A776000FDBF3 /* InjectedBundlePageCocoa.mm */,
</span><del>-                                5C45C30E17398E290079714E /* WebArchiveDumpSupportCocoa.mm */,
</del><span class="cx">                         );
</span><span class="cx">                         path = cocoa;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -598,15 +592,6 @@
</span><span class="cx">                         path = ios;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="cx">                 };
</span><del>-                5C45C31017398E370079714E /* cf */ = {
-                        isa = PBXGroup;
-                        children = (
-                                5C45C31117398E480079714E /* WebArchiveDumpSupport.cpp */,
-                                5C45C31217398E480079714E /* WebArchiveDumpSupport.h */,
-                        );
-                        name = cf;
-                        sourceTree = "<group>";
-                };
</del><span class="cx">                 65EB859E11EC67CC0034D300 /* mac */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="lines">@@ -640,7 +625,6 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 BC952C0A11F3B939003398B4 /* Bindings */,
</span><del>-                                5C45C31017398E370079714E /* cf */,
</del><span class="cx">                                 0FEB909D1905A75D000FDBF3 /* cocoa */,
</span><span class="cx">                                 BC14E4E0120E02F900826C0C /* Controllers */,
</span><span class="cx">                                 BC952D3A11F3BF1F003398B4 /* Derived Sources */,
</span><span class="lines">@@ -1036,8 +1020,6 @@
</span><span class="cx">                                 2E63EDA61891BDC0002A7AFC /* TestRunner.cpp in Sources */,
</span><span class="cx">                                 C0CE720B1247C93300BC0EC4 /* TestRunnerMac.mm in Sources */,
</span><span class="cx">                                 5664A49A14326384008881BE /* TextInputController.cpp in Sources */,
</span><del>-                                5C45C31317398E480079714E /* WebArchiveDumpSupport.cpp in Sources */,
-                                5C45C30F17398E290079714E /* WebArchiveDumpSupportCocoa.mm in Sources */,
</del><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span></span></pre>
</div>
</div>
</body>
</html>