<!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>[171540] trunk/Source</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/171540">171540</a></dd>
<dt>Author</dt> <dd>mitz@apple.com</dd>
<dt>Date</dt> <dd>2014-07-24 15:51:12 -0700 (Thu, 24 Jul 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>
Source/WebCore: &lt;rdar://problem/17766348&gt; [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
https://bugs.webkit.org/show_bug.cgi?id=135229

Reviewed by Alexey Proskuryakov.

* CMakeLists.txt: Updated for rename of a source file.

* WebCore.exp.in: Updated.

* WebCore.vcxproj/WebCore.vcxproj: Updated for rename of source files, added
ProtectionSpaceCFNet.{cpp,h}.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.

* WebCore.xcodeproj/project.pbxproj: Updated for rename of source files, added
ProtectionSpaceCococa.{h.mm}.

* platform/network/ProtectionSpace.cpp: Renamed to ProtectionSpaceBase.cpp.
* platform/network/ProtectionSpace.h: This file was renamed to ProtectionSpaceBase.h, and
in its place added a generic ProtectionSpace class that just derives from
ProtectionSpaceBase. For Cocoa and CFNetwork, ProtectionSpace{Cocoa,CFNet}.h is included
instead of the generic class.

* platform/network/ProtectionSpaceBase.cpp: Renamed ProtectionSpace.cpp to this.
(WebCore::ProtectionSpaceBase::ProtectionSpaceBase): Updated for rename.
(WebCore::ProtectionSpaceBase::host): Ditto.
(WebCore::ProtectionSpaceBase::port): Ditto.
(WebCore::ProtectionSpaceBase::serverType): Ditto.
(WebCore::ProtectionSpaceBase::isProxy): Ditto.
(WebCore::ProtectionSpaceBase::realm): Ditto.
(WebCore::ProtectionSpaceBase::authenticationScheme): Ditto.
(WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Removed CFNetwork-specific part,
which is now implemented in ProtectionSpaceCFNet.cpp.
(WebCore::ProtectionSpaceBase::compare): Replaced operator== with this, and made it call
ProtectionSpace::platformCompare at the end if needed.

* platform/network/ProtectionSpaceBase.h: Renamed ProtectionSpace.h to this.
(WebCore::ProtectionSpaceBase::encodingRequiresPlatformData): Added with a default
implementation that returns false, for ProtectionSpace implementations to override.
(WebCore::ProtectionSpaceBase::platformCompare): Added with a default implementation that
returns true, for ProtectionSpace implementations to override.
(WebCore::operator==): Changed to call compare.

* platform/network/cf/AuthenticationCF.cpp:
(WebCore::AuthenticationChallenge::AuthenticationChallenge): Changed to use the
ProtectionSpace constructor that takes a CFURLProtectionSpaceRef.
(WebCore::createCF): Changed to use ProtectionSpace::cfSpace.

* platform/network/cf/AuthenticationCF.h: Guarded a couple of functiosn that aren’t used in
Cocoa with #if PLATFORM(WIN).

* platform/network/cf/CredentialStorageCFNet.cpp:
(WebCore::CredentialStorage::getFromPersistentStorage): Changed to use
ProtectionSpace::cfSpace.
(WebCore::CredentialStorage::saveToPersistentStorage): Ditto.

* platform/network/cf/ProtectionSpaceCFNet.cpp: Added.
(WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Override with the
CFNetwork-specific test that was previously in ProtectionSpace.cpp.

* platform/network/cf/ProtectionSpaceCFNet.h: Copied from Source/WebCore/platform/network/ProtectionSpace.h.
Declare ProtectionSpace and override receivesCredentialSecurely.

* platform/network/mac/AuthenticationMac.h: Deleted the ProtectionSpace core() and mac().
* platform/network/mac/AuthenticationMac.mm:
(WebCore::AuthenticationChallenge::AuthenticationChallenge): Changed to use the
ProtectionSpace constructor that takes an NSURLProtectionSpace.
(WebCore::mac): Changed to use ProtectionSpace::nsSpace.

* platform/network/mac/CredentialStorageMac.mm:
(WebCore::CredentialStorage::getFromPersistentStorage): Ditto.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::receivedCredential): Changed to use the ProtectionSpace
constructor that takes an NSURLProtectionSpace.

* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]):
Ditto.

* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
Ditto.

Source/WebKit/mac: WebKit part of &lt;rdar://problem/17766348&gt; [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
https://bugs.webkit.org/show_bug.cgi?id=135229

Reviewed by Alexey Proskuryakov.

* Misc/WebDownload.mm:
(-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]): Chanegd to use the
ProtectionSpace constructor that takes an NSURLProtectionSpace.

* Plugins/WebBaseNetscapePluginView.mm:
(WebKit::getAuthenticationInfo): Ditto.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace): Changed to use
ProtectionSpace::nsSpace.

Source/WebKit2: WebKit2 part of &lt;rdar://problem/17766348&gt; [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
https://bugs.webkit.org/show_bug.cgi?id=135229

Reviewed by Alexey Proskuryakov.

* Shared/Cocoa/WKNSURLProtectionSpace.mm: Changed to use ProtectionSpace::nsSpace.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder&lt;ProtectionSpace&gt;::encode): If encoding the space requires encoding the
platform data, do that.
(IPC::ArgumentCoder&lt;ProtectionSpace&gt;::decode): If platform data was encoded, decode it.
* Shared/WebCoreArgumentCoders.h:

* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder&lt;ProtectionSpace&gt;::encodePlatformData): Archive the NSURLProtectionSpace.
(IPC::ArgumentCoder&lt;ProtectionSpace&gt;::decodePlatformData): Unarchive it.

* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder&lt;ProtectionSpace&gt;::encodePlatformData): Added.
(IPC::ArgumentCoder&lt;ProtectionSpace&gt;::decodePlatformData): Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkProtectionSpaceh">trunk/Source/WebCore/platform/network/ProtectionSpace.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfAuthenticationCFcpp">trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfAuthenticationCFh">trunk/Source/WebCore/platform/network/cf/AuthenticationCF.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfCredentialStorageCFNetcpp">trunk/Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceHandleCFURLConnectionDelegateWithOperationQueuecpp">trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfSynchronousResourceHandleCFURLConnectionDelegatecpp">trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacAuthenticationMach">trunk/Source/WebCore/platform/network/mac/AuthenticationMac.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacAuthenticationMacmm">trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacCredentialStorageMacmm">trunk/Source/WebCore/platform/network/mac/CredentialStorageMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacResourceHandleMacmm">trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsDelegatemm">trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsOperationQueueDelegatemm">trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacMiscWebDownloadmm">trunk/Source/WebKit/mac/Misc/WebDownload.mm</a></li>
<li><a href="#trunkSourceWebKitmacPluginsWebBaseNetscapePluginViewmm">trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedCocoaWKNSURLProtectionSpacemm">trunk/Source/WebKit2/Shared/Cocoa/WKNSURLProtectionSpace.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCoderscpp">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCodersh">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h</a></li>
<li><a href="#trunkSourceWebKit2SharedmacWebCoreArgumentCodersMacmm">trunk/Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedsoupWebCoreArgumentCodersSoupcpp">trunk/Source/WebKit2/Shared/soup/WebCoreArgumentCodersSoup.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformnetworkProtectionSpaceBasecpp">trunk/Source/WebCore/platform/network/ProtectionSpaceBase.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkProtectionSpaceBaseh">trunk/Source/WebCore/platform/network/ProtectionSpaceBase.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfProtectionSpaceCFNetcpp">trunk/Source/WebCore/platform/network/cf/ProtectionSpaceCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfProtectionSpaceCFNeth">trunk/Source/WebCore/platform/network/cf/ProtectionSpaceCFNet.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcocoaProtectionSpaceCocoah">trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcocoaProtectionSpaceCocoamm">trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformnetworkProtectionSpacecpp">trunk/Source/WebCore/platform/network/ProtectionSpace.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/CMakeLists.txt        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -2219,7 +2219,7 @@
</span><span class="cx">     platform/network/MIMEHeader.cpp
</span><span class="cx">     platform/network/NetworkStateNotifier.cpp
</span><span class="cx">     platform/network/ParsedContentType.cpp
</span><del>-    platform/network/ProtectionSpace.cpp
</del><ins>+    platform/network/ProtectionSpaceBase.cpp
</ins><span class="cx">     platform/network/ProxyServer.cpp
</span><span class="cx">     platform/network/ResourceErrorBase.cpp
</span><span class="cx">     platform/network/ResourceHandle.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/ChangeLog        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -1,3 +1,88 @@
</span><ins>+2014-07-24  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        &lt;rdar://problem/17766348&gt; [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
+        https://bugs.webkit.org/show_bug.cgi?id=135229
+
+        Reviewed by Alexey Proskuryakov.
+
+        * CMakeLists.txt: Updated for rename of a source file.
+
+        * WebCore.exp.in: Updated.
+
+        * WebCore.vcxproj/WebCore.vcxproj: Updated for rename of source files, added
+        ProtectionSpaceCFNet.{cpp,h}.
+        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
+
+        * WebCore.xcodeproj/project.pbxproj: Updated for rename of source files, added
+        ProtectionSpaceCococa.{h.mm}.
+
+        * platform/network/ProtectionSpace.cpp: Renamed to ProtectionSpaceBase.cpp.
+        * platform/network/ProtectionSpace.h: This file was renamed to ProtectionSpaceBase.h, and
+        in its place added a generic ProtectionSpace class that just derives from
+        ProtectionSpaceBase. For Cocoa and CFNetwork, ProtectionSpace{Cocoa,CFNet}.h is included
+        instead of the generic class.
+
+        * platform/network/ProtectionSpaceBase.cpp: Renamed ProtectionSpace.cpp to this.
+        (WebCore::ProtectionSpaceBase::ProtectionSpaceBase): Updated for rename.
+        (WebCore::ProtectionSpaceBase::host): Ditto.
+        (WebCore::ProtectionSpaceBase::port): Ditto.
+        (WebCore::ProtectionSpaceBase::serverType): Ditto.
+        (WebCore::ProtectionSpaceBase::isProxy): Ditto.
+        (WebCore::ProtectionSpaceBase::realm): Ditto.
+        (WebCore::ProtectionSpaceBase::authenticationScheme): Ditto.
+        (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Removed CFNetwork-specific part,
+        which is now implemented in ProtectionSpaceCFNet.cpp.
+        (WebCore::ProtectionSpaceBase::compare): Replaced operator== with this, and made it call
+        ProtectionSpace::platformCompare at the end if needed.
+
+        * platform/network/ProtectionSpaceBase.h: Renamed ProtectionSpace.h to this.
+        (WebCore::ProtectionSpaceBase::encodingRequiresPlatformData): Added with a default
+        implementation that returns false, for ProtectionSpace implementations to override.
+        (WebCore::ProtectionSpaceBase::platformCompare): Added with a default implementation that
+        returns true, for ProtectionSpace implementations to override.
+        (WebCore::operator==): Changed to call compare.
+
+        * platform/network/cf/AuthenticationCF.cpp:
+        (WebCore::AuthenticationChallenge::AuthenticationChallenge): Changed to use the
+        ProtectionSpace constructor that takes a CFURLProtectionSpaceRef.
+        (WebCore::createCF): Changed to use ProtectionSpace::cfSpace.
+
+        * platform/network/cf/AuthenticationCF.h: Guarded a couple of functiosn that aren’t used in
+        Cocoa with #if PLATFORM(WIN).
+
+        * platform/network/cf/CredentialStorageCFNet.cpp:
+        (WebCore::CredentialStorage::getFromPersistentStorage): Changed to use
+        ProtectionSpace::cfSpace.
+        (WebCore::CredentialStorage::saveToPersistentStorage): Ditto.
+
+        * platform/network/cf/ProtectionSpaceCFNet.cpp: Added.
+        (WebCore::ProtectionSpaceBase::receivesCredentialSecurely): Override with the
+        CFNetwork-specific test that was previously in ProtectionSpace.cpp.
+
+        * platform/network/cf/ProtectionSpaceCFNet.h: Copied from Source/WebCore/platform/network/ProtectionSpace.h.
+        Declare ProtectionSpace and override receivesCredentialSecurely.
+
+        * platform/network/mac/AuthenticationMac.h: Deleted the ProtectionSpace core() and mac().
+        * platform/network/mac/AuthenticationMac.mm:
+        (WebCore::AuthenticationChallenge::AuthenticationChallenge): Changed to use the
+        ProtectionSpace constructor that takes an NSURLProtectionSpace.
+        (WebCore::mac): Changed to use ProtectionSpace::nsSpace.
+
+        * platform/network/mac/CredentialStorageMac.mm:
+        (WebCore::CredentialStorage::getFromPersistentStorage): Ditto.
+
+        * platform/network/mac/ResourceHandleMac.mm:
+        (WebCore::ResourceHandle::receivedCredential): Changed to use the ProtectionSpace
+        constructor that takes an NSURLProtectionSpace.
+
+        * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
+        (-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]):
+        Ditto.
+
+        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
+        (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
+        Ditto.
+
</ins><span class="cx"> 2014-07-24  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -612,8 +612,7 @@
</span><span class="cx"> __ZN7WebCore15PlatformCALayer17drawLayerContentsEP9CGContextPS0_RN3WTF6VectorINS_9FloatRectELm5ENS4_15CrashOnOverflowEEE
</span><span class="cx"> __ZN7WebCore15PlatformCALayerC2ENS0_9LayerTypeEPNS_21PlatformCALayerClientE
</span><span class="cx"> __ZN7WebCore15PlatformCALayerD2Ev
</span><del>-__ZN7WebCore15ProtectionSpaceC1ERKN3WTF6StringEiNS_25ProtectionSpaceServerTypeES4_NS_35ProtectionSpaceAuthenticationSchemeE
-__ZN7WebCore15ProtectionSpaceC1Ev
</del><ins>+__ZN7WebCore15ProtectionSpaceC1EP20NSURLProtectionSpace
</ins><span class="cx"> __ZN7WebCore15ResourceRequest21httpPipeliningEnabledEv
</span><span class="cx"> __ZN7WebCore15ResourceRequest24setHTTPPipeliningEnabledEb
</span><span class="cx"> __ZN7WebCore15RunLoopObserver10invalidateEv
</span><span class="lines">@@ -826,6 +825,8 @@
</span><span class="cx"> __ZN7WebCore19MediaSessionManager17removeRestrictionENS_12MediaSession9MediaTypeEj
</span><span class="cx"> __ZN7WebCore19MediaSessionManager30didReceiveRemoteControlCommandENS_12MediaSession24RemoteControlCommandTypeE
</span><span class="cx"> __ZN7WebCore19MediaSessionManager9addClientEPNS_25MediaSessionManagerClientE
</span><ins>+__ZN7WebCore19ProtectionSpaceBaseC2ERKN3WTF6StringEiNS_25ProtectionSpaceServerTypeES4_NS_35ProtectionSpaceAuthenticationSchemeE
+__ZN7WebCore19ProtectionSpaceBaseC2Ev
</ins><span class="cx"> __ZN7WebCore19ResourceRequestBase11setHTTPBodyEN3WTF10PassRefPtrINS_8FormDataEEE
</span><span class="cx"> __ZN7WebCore19ResourceRequestBase13setHTTPMethodERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore19ResourceRequestBase15setHTTPReferrerERKN3WTF6StringE
</span><span class="lines">@@ -1146,7 +1147,6 @@
</span><span class="cx"> __ZN7WebCore4PathC1Ev
</span><span class="cx"> __ZN7WebCore4PathD1Ev
</span><span class="cx"> __ZN7WebCore4coreEP15NSURLCredential
</span><del>-__ZN7WebCore4coreEP20NSURLProtectionSpace
</del><span class="cx"> __ZN7WebCore4coreEP28NSURLAuthenticationChallenge
</span><span class="cx"> __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS0_7ProfileE
</span><span class="cx"> __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10ClientRectE
</span><span class="lines">@@ -1741,12 +1741,7 @@
</span><span class="cx"> __ZNK7WebCore15GraphicsLayerCA49platformCALayerContentsScaleMultiplierForNewTilesEPNS_15PlatformCALayerE
</span><span class="cx"> __ZNK7WebCore15GraphicsLayerCA49platformCALayerShouldTemporarilyRetainTileCohortsEPNS_15PlatformCALayerE
</span><span class="cx"> __ZNK7WebCore15ProgressTracker17estimatedProgressEv
</span><del>-__ZNK7WebCore15ProtectionSpace10serverTypeEv
-__ZNK7WebCore15ProtectionSpace26receivesCredentialSecurelyEv
-__ZNK7WebCore15ProtectionSpace4hostEv
-__ZNK7WebCore15ProtectionSpace4portEv
-__ZNK7WebCore15ProtectionSpace5realmEv
-__ZNK7WebCore15ProtectionSpace7isProxyEv
</del><ins>+__ZNK7WebCore15ProtectionSpace7nsSpaceEv
</ins><span class="cx"> __ZNK7WebCore15ResourceRequest12cfURLRequestENS_20HTTPBodyUpdatePolicyE
</span><span class="cx"> __ZNK7WebCore15ResourceRequest12nsURLRequestENS_20HTTPBodyUpdatePolicyE
</span><span class="cx"> __ZNK7WebCore15StyleProperties11mutableCopyEv
</span><span class="lines">@@ -1805,6 +1800,13 @@
</span><span class="cx"> __ZNK7WebCore19InspectorController29buildObjectForHighlightedNodeEv
</span><span class="cx"> __ZNK7WebCore19MediaSessionManager30applicationWillEnterBackgroundEv
</span><span class="cx"> __ZNK7WebCore19MediaSessionManager30applicationWillEnterForegroundEv
</span><ins>+__ZNK7WebCore19ProtectionSpaceBase10serverTypeEv
+__ZNK7WebCore19ProtectionSpaceBase20authenticationSchemeEv
+__ZNK7WebCore19ProtectionSpaceBase26receivesCredentialSecurelyEv
+__ZNK7WebCore19ProtectionSpaceBase4hostEv
+__ZNK7WebCore19ProtectionSpaceBase4portEv
+__ZNK7WebCore19ProtectionSpaceBase5realmEv
+__ZNK7WebCore19ProtectionSpaceBase7isProxyEv
</ins><span class="cx"> __ZNK7WebCore19ResourceRequestBase10httpMethodEv
</span><span class="cx"> __ZNK7WebCore19ResourceRequestBase15httpContentTypeEv
</span><span class="cx"> __ZNK7WebCore19ResourceRequestBase20firstPartyForCookiesEv
</span><span class="lines">@@ -2830,6 +2832,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
</span><ins>+__ZN7WebCore15ProtectionSpace28encodingRequiresPlatformDataEP20NSURLProtectionSpace
</ins><span class="cx"> __ZN7WebCore23wrapSerializedCryptoKeyERKN3WTF6VectorIhLm0ENS0_15CrashOnOverflowEEES5_RS3_
</span><span class="cx"> __ZN7WebCore25unwrapSerializedCryptoKeyERKN3WTF6VectorIhLm0ENS0_15CrashOnOverflowEEES5_RS3_
</span><span class="cx"> __ZN7WebCore28getDefaultWebCryptoMasterKeyERN3WTF6VectorIhLm0ENS0_15CrashOnOverflowEEE
</span><span class="lines">@@ -3318,15 +3321,6 @@
</span><span class="cx"> __ZN7WebCore10MouseEvent6createERKN3WTF12AtomicStringEbbdNS1_10PassRefPtrINS_9DOMWindowEEEiiiiibbbbtNS5_INS_11EventTargetEEENS5_INS_12DataTransferEEEb
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
-__ZN7WebCore3macERKNS_15ProtectionSpaceE
-__ZNK7WebCore15ProtectionSpace20authenticationSchemeEv
-#endif
-
-#if USE(PROTECTION_SPACE_AUTH_CALLBACK) &amp;&amp; USE(CFNETWORK)
-__ZN7WebCore8createCFERKNS_15ProtectionSpaceE
-#endif
-
</del><span class="cx"> #if ENABLE(PUBLIC_SUFFIX_LIST)
</span><span class="cx"> __ZN7WebCore14isPublicSuffixERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore28topPrivatelyControlledDomainERKN3WTF6StringE
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -8554,7 +8554,7 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\ParsedContentType.cpp&quot; /&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\platform\network\ProtectionSpace.cpp&quot; /&gt;
</del><ins>+    &lt;ClCompile Include=&quot;..\platform\network\ProtectionSpaceBase.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\ProxyServer.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\ResourceErrorBase.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\ResourceHandle.cpp&quot; /&gt;
</span><span class="lines">@@ -8607,6 +8607,12 @@
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\platform\network\cf\ProtectionSpaceCFNet.cpp&quot;&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\cf\ProxyServerCFNet.cpp&quot;&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="cx">       &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
</span><span class="lines">@@ -19793,6 +19799,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\network\cf\DownloadBundle.h&quot; /&gt;
</span><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\FormDataStreamCFNet.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\platform\network\cf\LoaderRunLoopCF.h&quot; /&gt;
</span><ins>+    &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ProtectionSpaceCFNet.h&quot; /&gt;
</ins><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ResourceError.h&quot; /&gt;
</span><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ResourceHandleCFURLConnectionDelegate.h&quot; /&gt;
</span><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ResourceRequest.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -1827,7 +1827,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\ParsedContentType.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><del>-    &lt;ClCompile Include=&quot;..\platform\network\ProtectionSpace.cpp&quot;&gt;
</del><ins>+    &lt;ClCompile Include=&quot;..\platform\network\ProtectionSpaceBase.cpp&quot;&gt;
</ins><span class="cx">       &lt;Filter&gt;platform\network&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\ProxyServer.cpp&quot;&gt;
</span><span class="lines">@@ -1881,6 +1881,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\cf\NetworkStorageSessionCFNet.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\platform\network\cf\ProtectionSpaceCFNet.cpp&quot;&gt;
+      &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\platform\network\cf\ProxyServerCFNet.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -15362,6 +15365,9 @@
</span><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\FormDataStreamCFNet.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
</span><span class="cx">     &lt;/CustomBuildStep&gt;
</span><ins>+    &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ProtectionSpaceCFNet.h&quot;&gt;
+      &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
+    &lt;/CustomBuildStep&gt;
</ins><span class="cx">     &lt;CustomBuildStep Include=&quot;..\platform\network\cf\ResourceError.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;platform\network\cf&lt;/Filter&gt;
</span><span class="cx">     &lt;/CustomBuildStep&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -1301,6 +1301,8 @@
</span><span class="cx">                 371F53EA0D2704F900ECE0D5 /* CSSUnicodeRangeValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 371F53E80D2704F900ECE0D5 /* CSSUnicodeRangeValue.cpp */; };
</span><span class="cx">                 37202199106213C600F25C4B /* FontSmoothingMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 37202198106213C600F25C4B /* FontSmoothingMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 3727DFD5142AAE4500D449CB /* FontCacheIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3727DFD4142AAE4500D449CB /* FontCacheIOS.mm */; };
</span><ins>+                372ADA38197F47B900FC501E /* ProtectionSpaceCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 372ADA37197F47B900FC501E /* ProtectionSpaceCocoa.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                372ADA3B197F687600FC501E /* ProtectionSpaceCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 372ADA39197F687600FC501E /* ProtectionSpaceCocoa.mm */; };
</ins><span class="cx">                 372C00C4129611F1005C9575 /* TextBoundaries.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 372C00C3129611F1005C9575 /* TextBoundaries.cpp */; };
</span><span class="cx">                 372C00D9129619F8005C9575 /* FindOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 372C00D8129619F8005C9575 /* FindOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 3744570F0DB05FA500AE0992 /* SVGGlyphMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 3744570E0DB05FA500AE0992 /* SVGGlyphMap.h */; };
</span><span class="lines">@@ -1322,6 +1324,7 @@
</span><span class="cx">                 379E61CC126CA5C400B63E8D /* BaseCheckableInputType.h in Headers */ = {isa = PBXBuildFile; fileRef = 379E61C8126CA5C300B63E8D /* BaseCheckableInputType.h */; };
</span><span class="cx">                 37ACCE420DA2980F0089E602 /* FontRenderingMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 37ACCE410DA2980F0089E602 /* FontRenderingMode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 37ACCF690DA414E70089E602 /* FontDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37ACCE620DA2AA960089E602 /* FontDescription.cpp */; };
</span><ins>+                37BAAE581980D1DD005DFE71 /* ProtectionSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = 37BAAE571980D1DD005DFE71 /* ProtectionSpace.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 37C2360B1097EDED00EF9F72 /* FontComplexTextMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37C2360A1097EDED00EF9F72 /* FontComplexTextMac.cpp */; };
</span><span class="cx">                 37C236101097EE7700EF9F72 /* ComplexTextController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37C2360E1097EE7700EF9F72 /* ComplexTextController.cpp */; };
</span><span class="cx">                 37C236111097EE7700EF9F72 /* ComplexTextController.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C2360F1097EE7700EF9F72 /* ComplexTextController.h */; };
</span><span class="lines">@@ -1862,8 +1865,8 @@
</span><span class="cx">                 514C76710CE923A1007EF3CD /* HTTPHeaderMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C765C0CE923A1007EF3CD /* HTTPHeaderMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 514C76720CE923A1007EF3CD /* HTTPParsers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C765D0CE923A1007EF3CD /* HTTPParsers.cpp */; };
</span><span class="cx">                 514C76730CE923A1007EF3CD /* HTTPParsers.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C765E0CE923A1007EF3CD /* HTTPParsers.h */; };
</span><del>-                514C76740CE923A1007EF3CD /* ProtectionSpace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C765F0CE923A1007EF3CD /* ProtectionSpace.cpp */; };
-                514C76750CE923A1007EF3CD /* ProtectionSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C76600CE923A1007EF3CD /* ProtectionSpace.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                514C76740CE923A1007EF3CD /* ProtectionSpaceBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C765F0CE923A1007EF3CD /* ProtectionSpaceBase.cpp */; };
+                514C76750CE923A1007EF3CD /* ProtectionSpaceBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C76600CE923A1007EF3CD /* ProtectionSpaceBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 514C76780CE923A1007EF3CD /* ResourceHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C76630CE923A1007EF3CD /* ResourceHandle.cpp */; };
</span><span class="cx">                 514C76790CE923A1007EF3CD /* ResourceHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C76640CE923A1007EF3CD /* ResourceHandle.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 514C767A0CE923A1007EF3CD /* ResourceHandleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C76650CE923A1007EF3CD /* ResourceHandleClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -8317,6 +8320,8 @@
</span><span class="cx">                 371F53E80D2704F900ECE0D5 /* CSSUnicodeRangeValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSUnicodeRangeValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37202198106213C600F25C4B /* FontSmoothingMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontSmoothingMode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 3727DFD4142AAE4500D449CB /* FontCacheIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FontCacheIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                372ADA37197F47B900FC501E /* ProtectionSpaceCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProtectionSpaceCocoa.h; path = cocoa/ProtectionSpaceCocoa.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                372ADA39197F687600FC501E /* ProtectionSpaceCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ProtectionSpaceCocoa.mm; path = cocoa/ProtectionSpaceCocoa.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 372C00C3129611F1005C9575 /* TextBoundaries.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextBoundaries.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 372C00D8129619F8005C9575 /* FindOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FindOptions.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 3744570E0DB05FA500AE0992 /* SVGGlyphMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGGlyphMap.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -8341,6 +8346,7 @@
</span><span class="cx">                 379E61C8126CA5C300B63E8D /* BaseCheckableInputType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseCheckableInputType.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37ACCE410DA2980F0089E602 /* FontRenderingMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontRenderingMode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37ACCE620DA2AA960089E602 /* FontDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontDescription.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                37BAAE571980D1DD005DFE71 /* ProtectionSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProtectionSpace.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 37C2360A1097EDED00EF9F72 /* FontComplexTextMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontComplexTextMac.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37C2360E1097EE7700EF9F72 /* ComplexTextController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComplexTextController.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 37C2360F1097EE7700EF9F72 /* ComplexTextController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComplexTextController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -8944,8 +8950,8 @@
</span><span class="cx">                 514C765C0CE923A1007EF3CD /* HTTPHeaderMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPHeaderMap.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 514C765D0CE923A1007EF3CD /* HTTPParsers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPParsers.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 514C765E0CE923A1007EF3CD /* HTTPParsers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPParsers.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                514C765F0CE923A1007EF3CD /* ProtectionSpace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProtectionSpace.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                514C76600CE923A1007EF3CD /* ProtectionSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProtectionSpace.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                514C765F0CE923A1007EF3CD /* ProtectionSpaceBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProtectionSpaceBase.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                514C76600CE923A1007EF3CD /* ProtectionSpaceBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProtectionSpaceBase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 514C76630CE923A1007EF3CD /* ResourceHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceHandle.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 514C76640CE923A1007EF3CD /* ResourceHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceHandle.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 514C76650CE923A1007EF3CD /* ResourceHandleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceHandleClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16342,8 +16348,9 @@
</span><span class="cx">                                 E13EF3421684ECF40034C83F /* NetworkStorageSession.h */,
</span><span class="cx">                                 447958021643B47B001E0A7F /* ParsedContentType.cpp */,
</span><span class="cx">                                 447958031643B47B001E0A7F /* ParsedContentType.h */,
</span><del>-                                514C765F0CE923A1007EF3CD /* ProtectionSpace.cpp */,
-                                514C76600CE923A1007EF3CD /* ProtectionSpace.h */,
</del><ins>+                                37BAAE571980D1DD005DFE71 /* ProtectionSpace.h */,
+                                514C765F0CE923A1007EF3CD /* ProtectionSpaceBase.cpp */,
+                                514C76600CE923A1007EF3CD /* ProtectionSpaceBase.h */,
</ins><span class="cx">                                 51A052551058874000CC9E95 /* ProtectionSpaceHash.h */,
</span><span class="cx">                                 1AF8E13212565A4400230FF7 /* ProxyServer.cpp */,
</span><span class="cx">                                 1AF8E1191256592600230FF7 /* ProxyServer.h */,
</span><span class="lines">@@ -16750,6 +16757,8 @@
</span><span class="cx">                 7E7DE1FE195CEF2D0035363B /* cocoa */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                372ADA37197F47B900FC501E /* ProtectionSpaceCocoa.h */,
+                                372ADA39197F687600FC501E /* ProtectionSpaceCocoa.mm */,
</ins><span class="cx">                                 7E7DE1FC195CEF260035363B /* ResourceRequestCocoa.mm */,
</span><span class="cx">                         );
</span><span class="cx">                         name = cocoa;
</span><span class="lines">@@ -25573,7 +25582,7 @@
</span><span class="cx">                                 1A2A68240B5BEDE70002A480 /* ProgressTracker.h in Headers */,
</span><span class="cx">                                 1ACADD791880D91C00D8B71D /* ProgressTrackerClient.h in Headers */,
</span><span class="cx">                                 E4BBED0F14F4025D003F0B98 /* PropertySetCSSStyleDeclaration.h in Headers */,
</span><del>-                                514C76750CE923A1007EF3CD /* ProtectionSpace.h in Headers */,
</del><ins>+                                514C76750CE923A1007EF3CD /* ProtectionSpaceBase.h in Headers */,
</ins><span class="cx">                                 51A052561058874000CC9E95 /* ProtectionSpaceHash.h in Headers */,
</span><span class="cx">                                 1AF8E11A1256592600230FF7 /* ProxyServer.h in Headers */,
</span><span class="cx">                                 FF945ECC161F7F3600971BC8 /* PseudoElement.h in Headers */,
</span><span class="lines">@@ -26149,6 +26158,8 @@
</span><span class="cx">                                 B22279EC0D00BF220071B782 /* SVGFEGaussianBlurElement.h in Headers */,
</span><span class="cx">                                 B25599850D00D8BA00BB825C /* SVGFEImage.h in Headers */,
</span><span class="cx">                                 B22279EF0D00BF220071B782 /* SVGFEImageElement.h in Headers */,
</span><ins>+                                372ADA38197F47B900FC501E /* ProtectionSpaceCocoa.h in Headers */,
+                                37BAAE581980D1DD005DFE71 /* ProtectionSpace.h in Headers */,
</ins><span class="cx">                                 B22279F20D00BF220071B782 /* SVGFELightElement.h in Headers */,
</span><span class="cx">                                 B22279F40D00BF220071B782 /* SVGFEMergeElement.h in Headers */,
</span><span class="cx">                                 B22279F70D00BF220071B782 /* SVGFEMergeNodeElement.h in Headers */,
</span><span class="lines">@@ -29072,7 +29083,7 @@
</span><span class="cx">                                 A715E652134BBBEC00D8E713 /* ProgressShadowElement.cpp in Sources */,
</span><span class="cx">                                 1A2A68230B5BEDE70002A480 /* ProgressTracker.cpp in Sources */,
</span><span class="cx">                                 E4BBED0E14F4025D003F0B98 /* PropertySetCSSStyleDeclaration.cpp in Sources */,
</span><del>-                                514C76740CE923A1007EF3CD /* ProtectionSpace.cpp in Sources */,
</del><ins>+                                514C76740CE923A1007EF3CD /* ProtectionSpaceBase.cpp in Sources */,
</ins><span class="cx">                                 1AF8E13312565A4400230FF7 /* ProxyServer.cpp in Sources */,
</span><span class="cx">                                 1AF8E1C3125673E000230FF7 /* ProxyServerCFNet.cpp in Sources */,
</span><span class="cx">                                 FF945ECB161F7F3600971BC8 /* PseudoElement.cpp in Sources */,
</span><span class="lines">@@ -29165,6 +29176,7 @@
</span><span class="cx">                                 1A3FF9C315265359002288A1 /* RenderNamedFlowThread.cpp in Sources */,
</span><span class="cx">                                 BCEA487F097D93020094C9E4 /* RenderObject.cpp in Sources */,
</span><span class="cx">                                 A43BF59C1149292800C643CA /* RenderProgress.cpp in Sources */,
</span><ins>+                                372ADA3B197F687600FC501E /* ProtectionSpaceCocoa.mm in Sources */,
</ins><span class="cx">                                 5A574F24131DB93900471B88 /* RenderQuote.cpp in Sources */,
</span><span class="cx">                                 D70AD65713E1342B005B50B4 /* RenderRegion.cpp in Sources */,
</span><span class="cx">                                 BCE93F471517C6D5008CCF74 /* RenderRegionSet.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkProtectionSpacecpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/network/ProtectionSpace.cpp (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ProtectionSpace.cpp        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/platform/network/ProtectionSpace.cpp        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -1,125 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007 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. ``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
- * 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. 
- */
-#include &quot;config.h&quot;
-#include &quot;ProtectionSpace.h&quot;
-
-#if USE(CFNETWORK) &amp;&amp; !PLATFORM(COCOA)
-#include &quot;AuthenticationCF.h&quot;
-#include &lt;CFNetwork/CFURLProtectionSpacePriv.h&gt;
-#include &lt;wtf/RetainPtr.h&gt;
-#endif
-
-namespace WebCore {
-
-// Need to enforce empty, non-null strings due to the pickiness of the String == String operator
-// combined with the semantics of the String(NSString*) constructor
-ProtectionSpace::ProtectionSpace()
-    : m_host(&quot;&quot;)
-    , m_port(0)
-    , m_serverType(ProtectionSpaceServerHTTP)
-    , m_realm(&quot;&quot;)
-    , m_authenticationScheme(ProtectionSpaceAuthenticationSchemeDefault)
-    , m_isHashTableDeletedValue(false)
-{
-}

-// Need to enforce empty, non-null strings due to the pickiness of the String == String operator
-// combined with the semantics of the String(NSString*) constructor
-ProtectionSpace::ProtectionSpace(const String&amp; host, int port, ProtectionSpaceServerType serverType, const String&amp; realm, ProtectionSpaceAuthenticationScheme authenticationScheme)
-    : m_host(host.length() ? host : &quot;&quot;)
-    , m_port(port)
-    , m_serverType(serverType)
-    , m_realm(realm.length() ? realm : &quot;&quot;)
-    , m_authenticationScheme(authenticationScheme)
-    , m_isHashTableDeletedValue(false)
-{    
-}
-    
-const String&amp; ProtectionSpace::host() const 
-{ 
-    return m_host; 
-}
-
-int ProtectionSpace::port() const 
-{
-    return m_port; 
-}
-
-ProtectionSpaceServerType ProtectionSpace::serverType() const 
-{
-    return m_serverType; 
-}
-
-bool ProtectionSpace::isProxy() const
-{
-    return (m_serverType == ProtectionSpaceProxyHTTP ||
-            m_serverType == ProtectionSpaceProxyHTTPS ||
-            m_serverType == ProtectionSpaceProxyFTP ||
-            m_serverType == ProtectionSpaceProxySOCKS);
-}
-
-const String&amp; ProtectionSpace::realm() const 
-{ 
-    return m_realm; 
-}
-
-ProtectionSpaceAuthenticationScheme ProtectionSpace::authenticationScheme() const 
-{ 
-    return m_authenticationScheme; 
-}
-
-bool ProtectionSpace::receivesCredentialSecurely() const
-{
-#if USE(CFNETWORK) &amp;&amp; !PLATFORM(COCOA)
-    RetainPtr&lt;CFURLProtectionSpaceRef&gt; cfSpace = adoptCF(createCF(*this));
-    return cfSpace &amp;&amp; CFURLProtectionSpaceReceivesCredentialSecurely(cfSpace.get());
-#else
-    return (m_serverType == ProtectionSpaceServerHTTPS || 
-            m_serverType == ProtectionSpaceServerFTPS || 
-            m_serverType == ProtectionSpaceProxyHTTPS || 
-            m_authenticationScheme == ProtectionSpaceAuthenticationSchemeHTTPDigest); 
-#endif
-}
-
-bool operator==(const ProtectionSpace&amp; a, const ProtectionSpace&amp; b)
-{
-    if (a.host() != b.host())
-        return false;
-    if (a.port() != b.port())
-        return false;
-    if (a.serverType() != b.serverType())
-        return false;
-    // Ignore realm for proxies
-    if (!a.isProxy() &amp;&amp; a.realm() != b.realm())
-        return false;
-    if (a.authenticationScheme() != b.authenticationScheme())
-        return false;
-    
-    return true;
-}
-
-}
-
-
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkProtectionSpaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ProtectionSpace.h (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ProtectionSpace.h        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/platform/network/ProtectionSpace.h        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -26,64 +26,29 @@
</span><span class="cx"> #ifndef ProtectionSpace_h
</span><span class="cx"> #define ProtectionSpace_h
</span><span class="cx"> 
</span><del>-#include &lt;wtf/text/WTFString.h&gt;
</del><ins>+#if PLATFORM(COCOA)
+#include &quot;ProtectionSpaceCocoa.h&quot;
+#elif USE(CFNETWORK)
+#include &quot;ProtectionSpaceCFNet.h&quot;
+#else
</ins><span class="cx"> 
</span><ins>+#include &quot;ProtectionSpaceBase.h&quot;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-enum ProtectionSpaceServerType {
-    ProtectionSpaceServerHTTP = 1,
-    ProtectionSpaceServerHTTPS = 2,
-    ProtectionSpaceServerFTP = 3,
-    ProtectionSpaceServerFTPS = 4,
-    ProtectionSpaceProxyHTTP = 5,
-    ProtectionSpaceProxyHTTPS = 6,
-    ProtectionSpaceProxyFTP = 7,
-    ProtectionSpaceProxySOCKS = 8
-};
-
-enum ProtectionSpaceAuthenticationScheme {
-    ProtectionSpaceAuthenticationSchemeDefault = 1,
-    ProtectionSpaceAuthenticationSchemeHTTPBasic = 2,
-    ProtectionSpaceAuthenticationSchemeHTTPDigest = 3,
-    ProtectionSpaceAuthenticationSchemeHTMLForm = 4,
-    ProtectionSpaceAuthenticationSchemeNTLM = 5,
-    ProtectionSpaceAuthenticationSchemeNegotiate = 6,
-    ProtectionSpaceAuthenticationSchemeClientCertificateRequested = 7,
-    ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested = 8,
-    ProtectionSpaceAuthenticationSchemeUnknown = 100
-};
-  
-class ProtectionSpace {
-
</del><ins>+class ProtectionSpace : public ProtectionSpaceBase {
</ins><span class="cx"> public:
</span><del>-    ProtectionSpace();
-    ProtectionSpace(const String&amp; host, int port, ProtectionSpaceServerType, const String&amp; realm, ProtectionSpaceAuthenticationScheme);
</del><ins>+    ProtectionSpace() : ProtectionSpaceBase() { }
+    ProtectionSpace(const String&amp; host, int port, ProtectionSpaceServerType serverType, const String&amp; realm, ProtectionSpaceAuthenticationScheme authenticationScheme)
+        : ProtectionSpaceBase(host, port, serverType, realm, authenticationScheme)
+    {
+    }
</ins><span class="cx"> 
</span><del>-    // Hash table deleted values, which are only constructed and never copied or destroyed.
-    ProtectionSpace(WTF::HashTableDeletedValueType) : m_isHashTableDeletedValue(true) { }
-    bool isHashTableDeletedValue() const { return m_isHashTableDeletedValue; }
-    
-    const String&amp; host() const;
-    int port() const;
-    ProtectionSpaceServerType serverType() const;
-    bool isProxy() const;
-    const String&amp; realm() const;
-    ProtectionSpaceAuthenticationScheme authenticationScheme() const;
-    
-    bool receivesCredentialSecurely() const;
-
-private:
-    String m_host;
-    int m_port;
-    ProtectionSpaceServerType m_serverType;
-    String m_realm;
-    ProtectionSpaceAuthenticationScheme m_authenticationScheme;
-    bool m_isHashTableDeletedValue;
</del><ins>+    ProtectionSpace(WTF::HashTableDeletedValueType deletedValue) : ProtectionSpaceBase(deletedValue) { }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-bool operator==(const ProtectionSpace&amp; a, const ProtectionSpace&amp; b);
-inline bool operator!=(const ProtectionSpace&amp; a, const ProtectionSpace&amp; b) { return !(a == b); }
-    
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><ins>+#endif
+
</ins><span class="cx"> #endif // ProtectionSpace_h
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkProtectionSpaceBasecppfromrev171526trunkSourceWebCoreplatformnetworkProtectionSpacecpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/network/ProtectionSpaceBase.cpp (from rev 171526, trunk/Source/WebCore/platform/network/ProtectionSpace.cpp) (0 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ProtectionSpaceBase.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/network/ProtectionSpaceBase.cpp        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -0,0 +1,120 @@
</span><ins>+/*
+ * Copyright (C) 2007 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. ``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
+ * 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. 
+ */
+#include &quot;config.h&quot;
+#include &quot;ProtectionSpaceBase.h&quot;
+
+#include &quot;ProtectionSpace.h&quot;
+
+#if USE(CFNETWORK) &amp;&amp; !PLATFORM(COCOA)
+#include &quot;AuthenticationCF.h&quot;
+#include &lt;CFNetwork/CFURLProtectionSpacePriv.h&gt;
+#include &lt;wtf/RetainPtr.h&gt;
+#endif
+
+namespace WebCore {
+
+// Need to enforce empty, non-null strings due to the pickiness of the String == String operator
+// combined with the semantics of the String(NSString*) constructor
+ProtectionSpaceBase::ProtectionSpaceBase()
+    : m_host(&quot;&quot;)
+    , m_port(0)
+    , m_serverType(ProtectionSpaceServerHTTP)
+    , m_realm(&quot;&quot;)
+    , m_authenticationScheme(ProtectionSpaceAuthenticationSchemeDefault)
+    , m_isHashTableDeletedValue(false)
+{
+}

+// Need to enforce empty, non-null strings due to the pickiness of the String == String operator
+// combined with the semantics of the String(NSString*) constructor
+ProtectionSpaceBase::ProtectionSpaceBase(const String&amp; host, int port, ProtectionSpaceServerType serverType, const String&amp; realm, ProtectionSpaceAuthenticationScheme authenticationScheme)
+    : m_host(host.length() ? host : &quot;&quot;)
+    , m_port(port)
+    , m_serverType(serverType)
+    , m_realm(realm.length() ? realm : &quot;&quot;)
+    , m_authenticationScheme(authenticationScheme)
+    , m_isHashTableDeletedValue(false)
+{    
+}
+    
+const String&amp; ProtectionSpaceBase::host() const
+{
+    return m_host; 
+}
+
+int ProtectionSpaceBase::port() const
+{
+    return m_port; 
+}
+
+ProtectionSpaceServerType ProtectionSpaceBase::serverType() const
+{
+    return m_serverType;
+}
+
+bool ProtectionSpaceBase::isProxy() const
+{
+    return (m_serverType == ProtectionSpaceProxyHTTP ||
+            m_serverType == ProtectionSpaceProxyHTTPS ||
+            m_serverType == ProtectionSpaceProxyFTP ||
+            m_serverType == ProtectionSpaceProxySOCKS);
+}
+
+const String&amp; ProtectionSpaceBase::realm() const
+{ 
+    return m_realm; 
+}
+
+ProtectionSpaceAuthenticationScheme ProtectionSpaceBase::authenticationScheme() const
+{ 
+    return m_authenticationScheme; 
+}
+
+bool ProtectionSpaceBase::receivesCredentialSecurely() const
+{
+    return (m_serverType == ProtectionSpaceServerHTTPS ||
+            m_serverType == ProtectionSpaceServerFTPS || 
+            m_serverType == ProtectionSpaceProxyHTTPS || 
+            m_authenticationScheme == ProtectionSpaceAuthenticationSchemeHTTPDigest); 
+}
+
+bool ProtectionSpaceBase::compare(const ProtectionSpace&amp; a, const ProtectionSpace&amp; b)
+{
+    if (a.host() != b.host())
+        return false;
+    if (a.port() != b.port())
+        return false;
+    if (a.serverType() != b.serverType())
+        return false;
+    // Ignore realm for proxies
+    if (!a.isProxy() &amp;&amp; a.realm() != b.realm())
+        return false;
+    if (a.authenticationScheme() != b.authenticationScheme())
+        return false;
+
+    return ProtectionSpace::platformCompare(a, b);
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkProtectionSpaceBasehfromrev171526trunkSourceWebCoreplatformnetworkProtectionSpaceh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/network/ProtectionSpaceBase.h (from rev 171526, trunk/Source/WebCore/platform/network/ProtectionSpace.h) (0 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ProtectionSpaceBase.h                                (rev 0)
+++ trunk/Source/WebCore/platform/network/ProtectionSpaceBase.h        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -0,0 +1,99 @@
</span><ins>+/*
+ * Copyright (C) 2007 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. ``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
+ * 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. 
+ */
+
+#ifndef ProtectionSpaceBase_h
+#define ProtectionSpaceBase_h
+
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+class ProtectionSpace;
+
+enum ProtectionSpaceServerType {
+    ProtectionSpaceServerHTTP = 1,
+    ProtectionSpaceServerHTTPS = 2,
+    ProtectionSpaceServerFTP = 3,
+    ProtectionSpaceServerFTPS = 4,
+    ProtectionSpaceProxyHTTP = 5,
+    ProtectionSpaceProxyHTTPS = 6,
+    ProtectionSpaceProxyFTP = 7,
+    ProtectionSpaceProxySOCKS = 8
+};
+
+enum ProtectionSpaceAuthenticationScheme {
+    ProtectionSpaceAuthenticationSchemeDefault = 1,
+    ProtectionSpaceAuthenticationSchemeHTTPBasic = 2,
+    ProtectionSpaceAuthenticationSchemeHTTPDigest = 3,
+    ProtectionSpaceAuthenticationSchemeHTMLForm = 4,
+    ProtectionSpaceAuthenticationSchemeNTLM = 5,
+    ProtectionSpaceAuthenticationSchemeNegotiate = 6,
+    ProtectionSpaceAuthenticationSchemeClientCertificateRequested = 7,
+    ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested = 8,
+    ProtectionSpaceAuthenticationSchemeUnknown = 100
+};
+  
+class ProtectionSpaceBase {
+
+public:
+    bool isHashTableDeletedValue() const { return m_isHashTableDeletedValue; }
+    
+    const String&amp; host() const;
+    int port() const;
+    ProtectionSpaceServerType serverType() const;
+    bool isProxy() const;
+    const String&amp; realm() const;
+    ProtectionSpaceAuthenticationScheme authenticationScheme() const;
+    
+    bool receivesCredentialSecurely() const;
+
+    bool encodingRequiresPlatformData() const { return false; }
+
+    static bool compare(const ProtectionSpace&amp; a, const ProtectionSpace&amp; b);
+
+protected:
+    ProtectionSpaceBase();
+    ProtectionSpaceBase(const String&amp; host, int port, ProtectionSpaceServerType, const String&amp; realm, ProtectionSpaceAuthenticationScheme);
+
+    // Hash table deleted values, which are only constructed and never copied or destroyed.
+    ProtectionSpaceBase(WTF::HashTableDeletedValueType) : m_isHashTableDeletedValue(true) { }
+
+    static bool platformCompare(const ProtectionSpace&amp;, const ProtectionSpace&amp;) { return true; }
+
+private:
+    String m_host;
+    int m_port;
+    ProtectionSpaceServerType m_serverType;
+    String m_realm;
+    ProtectionSpaceAuthenticationScheme m_authenticationScheme;
+    bool m_isHashTableDeletedValue;
+};
+
+inline bool operator==(const ProtectionSpace&amp; a, const ProtectionSpace&amp; b) { return ProtectionSpaceBase::compare(a, b); }
+inline bool operator!=(const ProtectionSpace&amp; a, const ProtectionSpace&amp; b) { return !(a == b); }
+    
+} // namespace WebCore
+
+#endif // ProtectionSpaceBase_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfAuthenticationCFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/platform/network/cf/AuthenticationCF.cpp        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -32,11 +32,6 @@
</span><span class="cx"> #include &quot;AuthenticationClient.h&quot;
</span><span class="cx"> #include &quot;Credential.h&quot;
</span><span class="cx"> #include &quot;ProtectionSpace.h&quot;
</span><del>-
-// This header must come before all other CFNetwork headers to work around a CFNetwork bug. It can
-// be removed entirely once &lt;rdar://problem/9042114&gt; is fixed.
-#include &lt;CFNetwork/CFURLConnectionPriv.h&gt;
-
</del><span class="cx"> #include &lt;CFNetwork/CFURLAuthChallengePriv.h&gt;
</span><span class="cx"> #include &lt;CFNetwork/CFURLCredentialPriv.h&gt;
</span><span class="cx"> #include &lt;CFNetwork/CFURLProtectionSpacePriv.h&gt;
</span><span class="lines">@@ -58,7 +53,7 @@
</span><span class="cx"> 
</span><span class="cx"> AuthenticationChallenge::AuthenticationChallenge(CFURLAuthChallengeRef cfChallenge,
</span><span class="cx">                                                  AuthenticationClient* authenticationClient)
</span><del>-    : AuthenticationChallengeBase(core(CFURLAuthChallengeGetProtectionSpace(cfChallenge)),
</del><ins>+    : AuthenticationChallengeBase(ProtectionSpace(CFURLAuthChallengeGetProtectionSpace(cfChallenge)),
</ins><span class="cx">                                   core(CFURLAuthChallengeGetProposedCredential(cfChallenge)),
</span><span class="cx">                                   CFURLAuthChallengeGetPreviousFailureCount(cfChallenge),
</span><span class="cx">                                   (CFURLResponseRef)CFURLAuthChallengeGetFailureResponse(cfChallenge),
</span><span class="lines">@@ -93,14 +88,12 @@
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Why not cache CFURLAuthChallengeRef in m_cfChallenge? Foundation counterpart does that.
</span><span class="cx"> 
</span><del>-    CFURLProtectionSpaceRef protectionSpace = createCF(coreChallenge.protectionSpace());
</del><span class="cx">     CFURLCredentialRef credential = createCF(coreChallenge.proposedCredential());
</span><span class="cx">     
</span><del>-    CFURLAuthChallengeRef result = CFURLAuthChallengeCreate(0, protectionSpace, credential,
</del><ins>+    CFURLAuthChallengeRef result = CFURLAuthChallengeCreate(0, coreChallenge.protectionSpace().cfSpace(), credential,
</ins><span class="cx">                                         coreChallenge.previousFailureCount(),
</span><span class="cx">                                         coreChallenge.failureResponse().cfURLResponse(),
</span><span class="cx">                                         coreChallenge.error());
</span><del>-    CFRelease(protectionSpace);
</del><span class="cx">     CFRelease(credential);
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="lines">@@ -129,6 +122,7 @@
</span><span class="cx">     return CFURLCredentialCreate(0, coreCredential.user().createCFString().get(), coreCredential.password().createCFString().get(), 0, persistence);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(WIN)
</ins><span class="cx"> CFURLProtectionSpaceRef createCF(const ProtectionSpace&amp; coreSpace)
</span><span class="cx"> {
</span><span class="cx">     CFURLProtectionSpaceServerType serverType = kCFURLProtectionSpaceServerHTTP;
</span><span class="lines">@@ -195,6 +189,7 @@
</span><span class="cx"> 
</span><span class="cx">     return CFURLProtectionSpaceCreate(0, coreSpace.host().createCFString().get(), coreSpace.port(), serverType, coreSpace.realm().createCFString().get(), scheme);
</span><span class="cx"> }
</span><ins>+#endif // PLATFORM(WIN)
</ins><span class="cx"> 
</span><span class="cx"> Credential core(CFURLCredentialRef cfCredential)
</span><span class="cx"> {
</span><span class="lines">@@ -225,6 +220,7 @@
</span><span class="cx">     return Credential(CFURLCredentialGetUsername(cfCredential), password.get(), persistence);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(WIN)
</ins><span class="cx"> ProtectionSpace core(CFURLProtectionSpaceRef cfSpace)
</span><span class="cx"> {
</span><span class="cx">     ProtectionSpaceServerType serverType = ProtectionSpaceServerHTTP;
</span><span class="lines">@@ -297,6 +293,7 @@
</span><span class="cx">                            CFURLProtectionSpaceGetRealm(cfSpace),
</span><span class="cx">                            scheme);
</span><span class="cx"> }
</span><ins>+#endif // PLATFORM(WIN)
</ins><span class="cx"> 
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfAuthenticationCFh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/AuthenticationCF.h (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/AuthenticationCF.h        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/platform/network/cf/AuthenticationCF.h        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -41,14 +41,17 @@
</span><span class="cx"> 
</span><span class="cx"> CFURLAuthChallengeRef createCF(const AuthenticationChallenge&amp;);
</span><span class="cx"> CFURLCredentialRef createCF(const Credential&amp;);
</span><ins>+#if PLATFORM(WIN)
</ins><span class="cx"> CFURLProtectionSpaceRef createCF(const ProtectionSpace&amp;);
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> AuthenticationChallenge core(CFURLAuthChallengeRef);
</span><span class="cx"> #endif
</span><span class="cx"> Credential core(CFURLCredentialRef);
</span><ins>+#if PLATFORM(WIN)
</ins><span class="cx"> ProtectionSpace core(CFURLProtectionSpaceRef);
</span><del>-
</del><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // USE(CFNETWORK)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfCredentialStorageCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/platform/network/cf/CredentialStorageCFNet.cpp        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -47,8 +47,7 @@
</span><span class="cx"> 
</span><span class="cx"> Credential CredentialStorage::getFromPersistentStorage(const ProtectionSpace&amp; protectionSpace)
</span><span class="cx"> {
</span><del>-    RetainPtr&lt;CFURLProtectionSpaceRef&gt; protectionSpaceCF = adoptCF(createCF(protectionSpace));
-    RetainPtr&lt;CFURLCredentialRef&gt; credentialCF = adoptCF(wkCopyCredentialFromCFPersistentStorage(protectionSpaceCF.get()));
</del><ins>+    RetainPtr&lt;CFURLCredentialRef&gt; credentialCF = adoptCF(wkCopyCredentialFromCFPersistentStorage(protectionSpace.cfSpace()));
</ins><span class="cx">     return core(credentialCF.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -56,15 +55,14 @@
</span><span class="cx"> void CredentialStorage::saveToPersistentStorage(const ProtectionSpace&amp; protectionSpace, const Credential&amp; credential)
</span><span class="cx"> {
</span><span class="cx">     RetainPtr&lt;CFURLCredentialStorageRef&gt; storageCF = adoptCF(CFURLCredentialStorageCreate(0));
</span><del>-    RetainPtr&lt;CFURLProtectionSpaceRef&gt; protectionSpaceCF = adoptCF(createCF(protectionSpace));
</del><span class="cx"> 
</span><span class="cx">     if (credential.persistence() == CredentialPersistenceNone) {
</span><span class="cx">         Credential sessionCredential(credential, CredentialPersistenceForSession);
</span><span class="cx">         RetainPtr&lt;CFURLCredentialRef&gt; sessionCredentialCF = adoptCF(createCF(sessionCredential));
</span><del>-        CFURLCredentialStorageSetDefaultCredentialForProtectionSpace(storageCF.get(), sessionCredentialCF.get(), protectionSpaceCF.get());
</del><ins>+        CFURLCredentialStorageSetDefaultCredentialForProtectionSpace(storageCF.get(), sessionCredentialCF.get(), protectionSpace.cfSpace());
</ins><span class="cx">     } else {
</span><span class="cx">         RetainPtr&lt;CFURLCredentialRef&gt; credentialCF = adoptCF(createCF(credential));
</span><del>-        CFURLCredentialStorageSetDefaultCredentialForProtectionSpace(storageCF.get(), credentialCF.get(), protectionSpaceCF.get());
</del><ins>+        CFURLCredentialStorageSetDefaultCredentialForProtectionSpace(storageCF.get(), credentialCF.get(), protectionSpace.cfSpace());
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfProtectionSpaceCFNetcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/network/cf/ProtectionSpaceCFNet.cpp (0 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ProtectionSpaceCFNet.cpp                                (rev 0)
+++ trunk/Source/WebCore/platform/network/cf/ProtectionSpaceCFNet.cpp        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+/*
+ * Copyright (C) 2007 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. ``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
+ * 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. 
+ */
+
+#include &quot;config.h&quot;
+#include &quot;ProtectionSpaceCFNet.h&quot;
+
+#if USE(CFNETWORK)
+
+#include &quot;AuthenticationCF.h&quot;
+#include &lt;CFNetwork/CFURLProtectionSpacePriv.h&gt;
+#include &lt;wtf/RetainPtr.h&gt;
+
+namespace WebCore {
+
+bool ProtectionSpaceBase::receivesCredentialSecurely() const
+{
+    RetainPtr&lt;CFURLProtectionSpaceRef&gt; cfSpace = adoptCF(createCF(*this));
+    return cfSpace &amp;&amp; CFURLProtectionSpaceReceivesCredentialSecurely(cfSpace.get());
+}
+
+} // namespace WebCore
+
+#endif // USE(CFNETWORK)
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfProtectionSpaceCFNethfromrev171526trunkSourceWebCoreplatformnetworkProtectionSpaceh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/network/cf/ProtectionSpaceCFNet.h (from rev 171526, trunk/Source/WebCore/platform/network/ProtectionSpace.h) (0 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ProtectionSpaceCFNet.h                                (rev 0)
+++ trunk/Source/WebCore/platform/network/cf/ProtectionSpaceCFNet.h        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+/*
+ * Copyright (C) 2007 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. ``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
+ * 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. 
+ */
+
+#ifndef ProtectionSpaceCFNet_h
+#define ProtectionSpaceCFNet_h
+
+#if !PLATFORM(WIN) || !USE(CFNETWORK)
+#error This header should only be included when targeting Windows and using CFNetwork.
+#endif
+
+#include &quot;ProtectionSpaceBase.h&quot;
+
+namespace WebCore {
+
+class ProtectionSpace : public ProtectionSpaceBase {
+public:
+    ProtectionSpace() : ProtectionSpaceBase() { }
+    ProtectionSpace(const String&amp; host, int port, ProtectionSpaceServerType serverType, const String&amp; realm, ProtectionSpaceAuthenticationScheme authenticationScheme)
+        : ProtectionSpaceBase(host, port, serverType, realm, authenticationScheme)
+    {
+    }
+
+    ProtectionSpace(WTF::HashTableDeletedValueType deletedValue) : ProtectionSpaceBase(deletedValue) { }
+
+    bool receivesCredentialSecurely() const;
+};
+
+} // namespace WebCore
+
+#endif // ProtectionSpaceCFNet_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceHandleCFURLConnectionDelegateWithOperationQueuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -258,7 +258,7 @@
</span><span class="cx"> 
</span><span class="cx">         LOG(Network, &quot;CFNet - ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace(handle=%p) (%s)&quot;, m_handle, m_handle-&gt;firstRequest().url().string().utf8().data());
</span><span class="cx"> 
</span><del>-        ProtectionSpace coreProtectionSpace = core(protectionSpace);
</del><ins>+        ProtectionSpace coreProtectionSpace = ProtectionSpace(protectionSpace);
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">         if (coreProtectionSpace.authenticationScheme() == ProtectionSpaceAuthenticationSchemeUnknown) {
</span><span class="cx">             m_boolResult = false;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfSynchronousResourceHandleCFURLConnectionDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx">     LOG(Network, &quot;CFNet - SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace(handle=%p (%s)&quot;, m_handle, m_handle-&gt;firstRequest().url().string().utf8().data());
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    ProtectionSpace coreProtectionSpace = core(protectionSpace);
</del><ins>+    ProtectionSpace coreProtectionSpace = ProtectionSpace(protectionSpace);
</ins><span class="cx">     if (coreProtectionSpace.authenticationScheme() == ProtectionSpaceAuthenticationSchemeUnknown)
</span><span class="cx">         return false;
</span><span class="cx">     return m_handle-&gt;canAuthenticateAgainstProtectionSpace(coreProtectionSpace);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcocoaProtectionSpaceCocoah"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.h (0 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.h                                (rev 0)
+++ trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.h        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+/*
+ * Copyright (C) 2014 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.
+ */
+
+#ifndef ProtectionSpaceCocoa_h
+#define ProtectionSpaceCocoa_h
+
+#include &quot;ProtectionSpaceBase.h&quot;
+#include &lt;wtf/RetainPtr.h&gt;
+
+#if USE(CFNETWORK)
+typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
+#endif
+
+OBJC_CLASS NSURLProtectionSpace;
+
+namespace WebCore {
+
+class ProtectionSpace : public ProtectionSpaceBase {
+public:
+    ProtectionSpace() : ProtectionSpaceBase() { }
+    ProtectionSpace(const String&amp; host, int port, ProtectionSpaceServerType serverType, const String&amp; realm, ProtectionSpaceAuthenticationScheme authenticationScheme)
+        : ProtectionSpaceBase(host, port, serverType, realm, authenticationScheme)
+    {
+    }
+
+    ProtectionSpace(WTF::HashTableDeletedValueType deletedValue) : ProtectionSpaceBase(deletedValue) { }
+
+#if USE(CFNETWORK)
+    explicit ProtectionSpace(CFURLProtectionSpaceRef);
+#endif
+    explicit ProtectionSpace(NSURLProtectionSpace *);
+
+    static bool platformCompare(const ProtectionSpace&amp; a, const ProtectionSpace&amp; b);
+
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
+    bool encodingRequiresPlatformData() const { return m_nsSpace &amp;&amp; encodingRequiresPlatformData(m_nsSpace.get()); }
+#endif
+
+#if USE(CFNETWORK)
+    CFURLProtectionSpaceRef cfSpace() const;
+#endif
+    NSURLProtectionSpace *nsSpace() const;
+
+private:
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
+    static bool encodingRequiresPlatformData(NSURLProtectionSpace *);
+#endif
+
+    mutable RetainPtr&lt;NSURLProtectionSpace&gt; m_nsSpace;
+};
+
+} // namespace WebCore
+
+#endif // ProtectionSpaceCocoa_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcocoaProtectionSpaceCocoamm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm (0 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm                                (rev 0)
+++ trunk/Source/WebCore/platform/network/cocoa/ProtectionSpaceCocoa.mm        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -0,0 +1,205 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 &quot;config.h&quot;
+#import &quot;ProtectionSpaceCocoa.h&quot;
+
+#if USE(CFNETWORK)
+@interface NSURLProtectionSpace (WebDetails)
+- (CFURLProtectionSpaceRef) _CFURLProtectionSpace;
+- (id)_initWithCFURLProtectionSpace:(CFURLProtectionSpaceRef)cfProtSpace;
+@end
+#endif
+
+namespace WebCore {
+
+#if USE(CFNETWORK)
+ProtectionSpace::ProtectionSpace(CFURLProtectionSpaceRef space)
+    : ProtectionSpace(adoptNS([[NSURLProtectionSpace alloc] _initWithCFURLProtectionSpace:space]).get())
+{
+}
+#endif
+
+static ProtectionSpaceServerType type(NSURLProtectionSpace *space)
+{
+    if ([space isProxy]) {
+        NSString *proxyType = space.proxyType;
+        if ([proxyType isEqualToString:NSURLProtectionSpaceHTTPProxy])
+            return ProtectionSpaceProxyHTTP;
+        if ([proxyType isEqualToString:NSURLProtectionSpaceHTTPSProxy])
+            return ProtectionSpaceProxyHTTPS;
+        if ([proxyType isEqualToString:NSURLProtectionSpaceFTPProxy])
+            return ProtectionSpaceProxyFTP;
+        if ([proxyType isEqualToString:NSURLProtectionSpaceSOCKSProxy])
+            return ProtectionSpaceProxySOCKS;
+
+        ASSERT_NOT_REACHED();
+        return ProtectionSpaceProxyHTTP;
+    }
+
+    NSString *protocol = space.protocol;
+    if ([protocol caseInsensitiveCompare:@&quot;http&quot;] == NSOrderedSame)
+        return ProtectionSpaceServerHTTP;
+    if ([protocol caseInsensitiveCompare:@&quot;https&quot;] == NSOrderedSame)
+        return ProtectionSpaceServerHTTPS;
+    if ([protocol caseInsensitiveCompare:@&quot;ftp&quot;] == NSOrderedSame)
+        return ProtectionSpaceServerFTP;
+    if ([protocol caseInsensitiveCompare:@&quot;ftps&quot;] == NSOrderedSame)
+        return ProtectionSpaceServerFTPS;
+
+    ASSERT_NOT_REACHED();
+    return ProtectionSpaceServerHTTP;
+}
+
+static ProtectionSpaceAuthenticationScheme scheme(NSURLProtectionSpace *space)
+{
+    NSString *method = space.authenticationMethod;
+    if ([method isEqualToString:NSURLAuthenticationMethodDefault])
+        return ProtectionSpaceAuthenticationSchemeDefault;
+    if ([method isEqualToString:NSURLAuthenticationMethodHTTPBasic])
+        return ProtectionSpaceAuthenticationSchemeHTTPBasic;
+    if ([method isEqualToString:NSURLAuthenticationMethodHTTPDigest])
+        return ProtectionSpaceAuthenticationSchemeHTTPDigest;
+    if ([method isEqualToString:NSURLAuthenticationMethodHTMLForm])
+        return ProtectionSpaceAuthenticationSchemeHTMLForm;
+    if ([method isEqualToString:NSURLAuthenticationMethodNTLM])
+        return ProtectionSpaceAuthenticationSchemeNTLM;
+    if ([method isEqualToString:NSURLAuthenticationMethodNegotiate])
+        return ProtectionSpaceAuthenticationSchemeNegotiate;
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+    if ([method isEqualToString:NSURLAuthenticationMethodClientCertificate])
+        return ProtectionSpaceAuthenticationSchemeClientCertificateRequested;
+    if ([method isEqualToString:NSURLAuthenticationMethodServerTrust])
+        return ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested;
+#endif
+
+    ASSERT_NOT_REACHED();
+    return ProtectionSpaceAuthenticationSchemeUnknown;
+}
+
+ProtectionSpace::ProtectionSpace(NSURLProtectionSpace *space)
+    : ProtectionSpace(space.host, space.port, type(space), space.realm, scheme(space))
+{
+    m_nsSpace = space;
+}
+
+#if USE(CFNETWORK)
+CFURLProtectionSpaceRef ProtectionSpace::cfSpace() const
+{
+    return [nsSpace() _CFURLProtectionSpace];
+}
+#endif
+
+NSURLProtectionSpace *ProtectionSpace::nsSpace() const
+{
+    if (m_nsSpace)
+        return m_nsSpace.get();
+
+    NSString *proxyType = nil;
+    NSString *protocol = nil;
+    switch (serverType()) {
+    case ProtectionSpaceServerHTTP:
+        protocol = @&quot;http&quot;;
+        break;
+    case ProtectionSpaceServerHTTPS:
+        protocol = @&quot;https&quot;;
+        break;
+    case ProtectionSpaceServerFTP:
+        protocol = @&quot;ftp&quot;;
+        break;
+    case ProtectionSpaceServerFTPS:
+        protocol = @&quot;ftps&quot;;
+        break;
+    case ProtectionSpaceProxyHTTP:
+        proxyType = NSURLProtectionSpaceHTTPProxy;
+        break;
+    case ProtectionSpaceProxyHTTPS:
+        proxyType = NSURLProtectionSpaceHTTPSProxy;
+        break;
+    case ProtectionSpaceProxyFTP:
+        proxyType = NSURLProtectionSpaceFTPProxy;
+        break;
+    case ProtectionSpaceProxySOCKS:
+        proxyType = NSURLProtectionSpaceSOCKSProxy;
+        break;
+    default:
+        ASSERT_NOT_REACHED();
+    }
+  
+    NSString *method = nil;
+    switch (authenticationScheme()) {
+    case ProtectionSpaceAuthenticationSchemeDefault:
+        method = NSURLAuthenticationMethodDefault;
+        break;
+    case ProtectionSpaceAuthenticationSchemeHTTPBasic:
+        method = NSURLAuthenticationMethodHTTPBasic;
+        break;
+    case ProtectionSpaceAuthenticationSchemeHTTPDigest:
+        method = NSURLAuthenticationMethodHTTPDigest;
+        break;
+    case ProtectionSpaceAuthenticationSchemeHTMLForm:
+        method = NSURLAuthenticationMethodHTMLForm;
+        break;
+    case ProtectionSpaceAuthenticationSchemeNTLM:
+        method = NSURLAuthenticationMethodNTLM;
+        break;
+    case ProtectionSpaceAuthenticationSchemeNegotiate:
+        method = NSURLAuthenticationMethodNegotiate;
+        break;
+#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
+    case ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested:
+        method = NSURLAuthenticationMethodServerTrust;
+        break;
+    case ProtectionSpaceAuthenticationSchemeClientCertificateRequested:
+        method = NSURLAuthenticationMethodClientCertificate;
+        break;
+#endif
+    default:
+        ASSERT_NOT_REACHED();
+    }
+    
+    m_nsSpace = adoptNS(proxyType
+        ? [[NSURLProtectionSpace alloc] initWithProxyHost:host() port:port() type:proxyType realm:realm() authenticationMethod:method]
+        : [[NSURLProtectionSpace alloc] initWithHost:host() port:port() protocol:protocol realm:realm() authenticationMethod:method]);
+
+    return m_nsSpace.get();
+}
+
+bool ProtectionSpace::platformCompare(const ProtectionSpace&amp; a, const ProtectionSpace&amp; b)
+{
+    if (!a.m_nsSpace &amp;&amp; !b.m_nsSpace)
+        return true;
+
+    return [a.nsSpace() isEqual:b.nsSpace()];
+}
+
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1090
+bool ProtectionSpace::encodingRequiresPlatformData(NSURLProtectionSpace *space)
+{
+    return space.distinguishedNames || space.serverTrust;
+}
+#endif
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacAuthenticationMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/AuthenticationMac.h (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/AuthenticationMac.h        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/platform/network/mac/AuthenticationMac.h        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -29,20 +29,16 @@
</span><span class="cx"> 
</span><span class="cx"> @class NSURLAuthenticationChallenge;
</span><span class="cx"> @class NSURLCredential;
</span><del>-@class NSURLProtectionSpace;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class AuthenticationChallenge;
</span><span class="cx"> class Credential;
</span><del>-class ProtectionSpace;
</del><span class="cx"> 
</span><span class="cx"> NSURLAuthenticationChallenge *mac(const AuthenticationChallenge&amp;);
</span><del>-NSURLProtectionSpace *mac(const ProtectionSpace&amp;);
</del><span class="cx"> NSURLCredential *mac(const Credential&amp;);
</span><span class="cx"> 
</span><span class="cx"> AuthenticationChallenge core(NSURLAuthenticationChallenge *);
</span><del>-ProtectionSpace core(NSURLProtectionSpace *);
</del><span class="cx"> Credential core(NSURLCredential *);
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacAuthenticationMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/platform/network/mac/AuthenticationMac.mm        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -29,19 +29,12 @@
</span><span class="cx"> #import &quot;AuthenticationChallenge.h&quot;
</span><span class="cx"> #import &quot;AuthenticationClient.h&quot;
</span><span class="cx"> #import &quot;Credential.h&quot;
</span><del>-#import &quot;ProtectionSpace.h&quot;
-
</del><span class="cx"> #import &lt;Foundation/NSURLAuthenticationChallenge.h&gt;
</span><span class="cx"> #import &lt;Foundation/NSURLCredential.h&gt;
</span><span class="cx"> #import &lt;Foundation/NSURLProtectionSpace.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if USE(CFNETWORK)
</span><span class="cx"> 
</span><del>-@interface NSURLProtectionSpace (Details)
-- (CFURLProtectionSpaceRef) _cfurlprotectionspace;
-- (id)_initWithCFURLProtectionSpace:(CFURLProtectionSpaceRef)cfProtSpace;
-@end
-
</del><span class="cx"> @interface NSURLAuthenticationChallenge (Details)
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> +(NSURLAuthenticationChallenge *)_createAuthenticationChallengeForCFAuthChallenge:(CFURLAuthChallengeRef)cfChallenge sender:(id &lt;NSURLAuthenticationChallengeSender&gt;)sender;
</span><span class="lines">@@ -139,17 +132,6 @@
</span><span class="cx">     return core([macCredential _cfurlcredential]);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ProtectionSpace core(NSURLProtectionSpace *macSpace)
-{
-    return core([macSpace _cfurlprotectionspace]);
-}
-
-NSURLProtectionSpace *mac(const ProtectionSpace&amp; coreSpace)
-{
-    RetainPtr&lt;CFURLProtectionSpaceRef&gt; protectionSpace = adoptCF(createCF(coreSpace));
-    return [[[NSURLProtectionSpace alloc] _initWithCFURLProtectionSpace:protectionSpace.get()] autorelease];
-}
-
</del><span class="cx"> NSURLAuthenticationChallenge *mac(const AuthenticationChallenge&amp; coreChallenge)
</span><span class="cx"> {
</span><span class="cx">     AuthenticationClient* authClient = coreChallenge.authenticationClient();
</span><span class="lines">@@ -187,7 +169,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> AuthenticationChallenge::AuthenticationChallenge(NSURLAuthenticationChallenge *challenge)
</span><del>-    : AuthenticationChallengeBase(core([challenge protectionSpace]),
</del><ins>+    : AuthenticationChallengeBase(ProtectionSpace([challenge protectionSpace]),
</ins><span class="cx">                                   core([challenge proposedCredential]),
</span><span class="cx">                                   [challenge previousFailureCount],
</span><span class="cx">                                   [challenge failureResponse],
</span><span class="lines">@@ -233,7 +215,7 @@
</span><span class="cx">     if (coreChallenge.nsURLAuthenticationChallenge())
</span><span class="cx">         return coreChallenge.nsURLAuthenticationChallenge();
</span><span class="cx">         
</span><del>-    return [[[NSURLAuthenticationChallenge alloc] initWithProtectionSpace:mac(coreChallenge.protectionSpace())
</del><ins>+    return [[[NSURLAuthenticationChallenge alloc] initWithProtectionSpace:coreChallenge.protectionSpace().nsSpace()
</ins><span class="cx">                                                        proposedCredential:mac(coreChallenge.proposedCredential())
</span><span class="cx">                                                      previousFailureCount:coreChallenge.previousFailureCount()
</span><span class="cx">                                                           failureResponse:coreChallenge.failureResponse().nsURLResponse()
</span><span class="lines">@@ -241,84 +223,6 @@
</span><span class="cx">                                                                    sender:coreChallenge.sender()] autorelease];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-NSURLProtectionSpace *mac(const ProtectionSpace&amp; coreSpace)
-{
-    NSString *proxyType = nil;
-    NSString *protocol = nil;
-    switch (coreSpace.serverType()) {
-        case ProtectionSpaceServerHTTP:
-            protocol = @&quot;http&quot;;
-            break;
-        case ProtectionSpaceServerHTTPS:
-            protocol = @&quot;https&quot;;
-            break;
-        case ProtectionSpaceServerFTP:
-            protocol = @&quot;ftp&quot;;
-            break;
-        case ProtectionSpaceServerFTPS:
-            protocol = @&quot;ftps&quot;;
-            break;
-        case ProtectionSpaceProxyHTTP:
-            proxyType = NSURLProtectionSpaceHTTPProxy;
-            break;
-        case ProtectionSpaceProxyHTTPS:
-            proxyType = NSURLProtectionSpaceHTTPSProxy;
-            break;
-        case ProtectionSpaceProxyFTP:
-            proxyType = NSURLProtectionSpaceFTPProxy;
-            break;
-        case ProtectionSpaceProxySOCKS:
-            proxyType = NSURLProtectionSpaceSOCKSProxy;
-            break;
-        default:
-            ASSERT_NOT_REACHED();
-    }
-  
-    NSString *method = nil;
-    switch (coreSpace.authenticationScheme()) {
-        case ProtectionSpaceAuthenticationSchemeDefault:
-            method = NSURLAuthenticationMethodDefault;
-            break;
-        case ProtectionSpaceAuthenticationSchemeHTTPBasic:
-            method = NSURLAuthenticationMethodHTTPBasic;
-            break;
-        case ProtectionSpaceAuthenticationSchemeHTTPDigest:
-            method = NSURLAuthenticationMethodHTTPDigest;
-            break;
-        case ProtectionSpaceAuthenticationSchemeHTMLForm:
-            method = NSURLAuthenticationMethodHTMLForm;
-            break;
-        case ProtectionSpaceAuthenticationSchemeNTLM:
-            method = NSURLAuthenticationMethodNTLM;
-            break;
-        case ProtectionSpaceAuthenticationSchemeNegotiate:
-            method = NSURLAuthenticationMethodNegotiate;
-            break;
-#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
-        case ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested:
-            method = NSURLAuthenticationMethodServerTrust;
-            break;
-        case ProtectionSpaceAuthenticationSchemeClientCertificateRequested:
-            method = NSURLAuthenticationMethodClientCertificate;
-            break;
-#endif
-        default:
-            ASSERT_NOT_REACHED();
-    }
-    
-    if (proxyType)
-        return [[[NSURLProtectionSpace alloc] initWithProxyHost:coreSpace.host()
-                                                           port:coreSpace.port()
-                                                           type:proxyType
-                                                          realm:coreSpace.realm()
-                                           authenticationMethod:method] autorelease];
-    return [[[NSURLProtectionSpace alloc] initWithHost:coreSpace.host()
-                                                  port:coreSpace.port()
-                                              protocol:protocol
-                                                 realm:coreSpace.realm()
-                                  authenticationMethod:method] autorelease];
-}
-
</del><span class="cx"> NSURLCredential *mac(const Credential&amp; coreCredential)
</span><span class="cx"> {
</span><span class="cx">     if (coreCredential.isEmpty())
</span><span class="lines">@@ -358,65 +262,6 @@
</span><span class="cx">     return AuthenticationChallenge(macChallenge);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ProtectionSpace core(NSURLProtectionSpace *macSpace)
-{
-    ProtectionSpaceServerType serverType = ProtectionSpaceProxyHTTP;
-    
-    if ([macSpace isProxy]) {
-        NSString *proxyType = [macSpace proxyType];
-        if ([proxyType isEqualToString:NSURLProtectionSpaceHTTPProxy])
-            serverType = ProtectionSpaceProxyHTTP;
-        else if ([proxyType isEqualToString:NSURLProtectionSpaceHTTPSProxy])
-            serverType = ProtectionSpaceProxyHTTPS;
-        else if ([proxyType isEqualToString:NSURLProtectionSpaceFTPProxy])
-            serverType = ProtectionSpaceProxyFTP;
-        else if ([proxyType isEqualToString:NSURLProtectionSpaceSOCKSProxy])
-            serverType = ProtectionSpaceProxySOCKS;
-        else 
-            ASSERT_NOT_REACHED();
-    } else {
-        NSString *protocol = [macSpace protocol];
-        if ([protocol caseInsensitiveCompare:@&quot;http&quot;] == NSOrderedSame)
-            serverType = ProtectionSpaceServerHTTP;
-        else if ([protocol caseInsensitiveCompare:@&quot;https&quot;] == NSOrderedSame)
-            serverType = ProtectionSpaceServerHTTPS;
-        else if ([protocol caseInsensitiveCompare:@&quot;ftp&quot;] == NSOrderedSame)
-            serverType = ProtectionSpaceServerFTP;
-        else if ([protocol caseInsensitiveCompare:@&quot;ftps&quot;] == NSOrderedSame)
-            serverType = ProtectionSpaceServerFTPS;
-        else
-            ASSERT_NOT_REACHED();
-    }
-
-    ProtectionSpaceAuthenticationScheme scheme = ProtectionSpaceAuthenticationSchemeDefault;
-    NSString *method = [macSpace authenticationMethod];
-    if ([method isEqualToString:NSURLAuthenticationMethodDefault])
-        scheme = ProtectionSpaceAuthenticationSchemeDefault;
-    else if ([method isEqualToString:NSURLAuthenticationMethodHTTPBasic])
-        scheme = ProtectionSpaceAuthenticationSchemeHTTPBasic;
-    else if ([method isEqualToString:NSURLAuthenticationMethodHTTPDigest])
-        scheme = ProtectionSpaceAuthenticationSchemeHTTPDigest;
-    else if ([method isEqualToString:NSURLAuthenticationMethodHTMLForm])
-        scheme = ProtectionSpaceAuthenticationSchemeHTMLForm;
-    else if ([method isEqualToString:NSURLAuthenticationMethodNTLM])
-        scheme = ProtectionSpaceAuthenticationSchemeNTLM;
-    else if ([method isEqualToString:NSURLAuthenticationMethodNegotiate])
-        scheme = ProtectionSpaceAuthenticationSchemeNegotiate;
-#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
-    else if ([method isEqualToString:NSURLAuthenticationMethodClientCertificate])
-        scheme = ProtectionSpaceAuthenticationSchemeClientCertificateRequested;
-    else if ([method isEqualToString:NSURLAuthenticationMethodServerTrust])
-        scheme = ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested;
-#endif
-    else {
-        scheme = ProtectionSpaceAuthenticationSchemeUnknown;
-        ASSERT_NOT_REACHED();
-    }
-        
-    return ProtectionSpace([macSpace host], [macSpace port], serverType, [macSpace realm], scheme);
-
-}
-
</del><span class="cx"> Credential core(NSURLCredential *macCredential)
</span><span class="cx"> {
</span><span class="cx">     CredentialPersistence persistence = CredentialPersistenceNone;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacCredentialStorageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/CredentialStorageMac.mm (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/CredentialStorageMac.mm        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/platform/network/mac/CredentialStorageMac.mm        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -30,12 +30,13 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;AuthenticationMac.h&quot;
</span><span class="cx"> #include &quot;Credential.h&quot;
</span><ins>+#include &quot;ProtectionSpace.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> Credential CredentialStorage::getFromPersistentStorage(const ProtectionSpace&amp; protectionSpace)
</span><span class="cx"> {
</span><del>-    NSURLCredential *credential = [[NSURLCredentialStorage sharedCredentialStorage] defaultCredentialForProtectionSpace:mac(protectionSpace)];
</del><ins>+    NSURLCredential *credential = [[NSURLCredentialStorage sharedCredentialStorage] defaultCredentialForProtectionSpace:protectionSpace.nsSpace()];
</ins><span class="cx">     return credential ? core(credential) : Credential();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacResourceHandleMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -658,7 +658,7 @@
</span><span class="cx">         URL urlToStore;
</span><span class="cx">         if (challenge.failureResponse().httpStatusCode() == 401)
</span><span class="cx">             urlToStore = challenge.failureResponse().url();
</span><del>-        CredentialStorage::set(webCredential, core([d-&gt;m_currentMacChallenge protectionSpace]), urlToStore);
</del><ins>+        CredentialStorage::set(webCredential, ProtectionSpace([d-&gt;m_currentMacChallenge protectionSpace]), urlToStore);
</ins><span class="cx">         [[d-&gt;m_currentMacChallenge sender] useCredential:mac(webCredential) forAuthenticationChallenge:d-&gt;m_currentMacChallenge];
</span><span class="cx">     } else
</span><span class="cx">         [[d-&gt;m_currentMacChallenge sender] useCredential:mac(credential) forAuthenticationChallenge:d-&gt;m_currentMacChallenge];
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -139,7 +139,7 @@
</span><span class="cx">     if (!m_handle)
</span><span class="cx">         return NO;
</span><span class="cx"> 
</span><del>-    return m_handle-&gt;canAuthenticateAgainstProtectionSpace(core(protectionSpace));
</del><ins>+    return m_handle-&gt;canAuthenticateAgainstProtectionSpace(ProtectionSpace(protectionSpace));
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsOperationQueueDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -182,7 +182,7 @@
</span><span class="cx">             dispatch_semaphore_signal(m_semaphore);
</span><span class="cx">             return;
</span><span class="cx">         }
</span><del>-        m_handle-&gt;canAuthenticateAgainstProtectionSpace(core(protectionSpace));
</del><ins>+        m_handle-&gt;canAuthenticateAgainstProtectionSpace(ProtectionSpace(protectionSpace));
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     dispatch_semaphore_wait(m_semaphore, DISPATCH_TIME_FOREVER);
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-07-24  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        WebKit part of &lt;rdar://problem/17766348&gt; [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
+        https://bugs.webkit.org/show_bug.cgi?id=135229
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Misc/WebDownload.mm:
+        (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]): Chanegd to use the
+        ProtectionSpace constructor that takes an NSURLProtectionSpace.
+
+        * Plugins/WebBaseNetscapePluginView.mm:
+        (WebKit::getAuthenticationInfo): Ditto.
+
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace): Changed to use
+        ProtectionSpace::nsSpace.
+
</ins><span class="cx"> 2014-07-23  Bem Jones-Bey  &lt;bjonesbe@adobe.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove CSS_EXCLUSIONS compile flag and leftover code
</span></span></pre></div>
<a id="trunkSourceWebKitmacMiscWebDownloadmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Misc/WebDownload.mm (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Misc/WebDownload.mm        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebKit/mac/Misc/WebDownload.mm        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -128,7 +128,7 @@
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx">     // Try previously stored credential first.
</span><span class="cx">     if (![challenge previousFailureCount]) {
</span><del>-        NSURLCredential *credential = mac(CredentialStorage::get(core([challenge protectionSpace])));
</del><ins>+        NSURLCredential *credential = mac(CredentialStorage::get(ProtectionSpace([challenge protectionSpace])));
</ins><span class="cx">         if (credential) {
</span><span class="cx">             [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge];
</span><span class="cx">             return;
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsWebBaseNetscapePluginViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -928,7 +928,7 @@
</span><span class="cx">     
</span><span class="cx">     RetainPtr&lt;NSURLProtectionSpace&gt; protectionSpace = adoptNS([[NSURLProtectionSpace alloc] initWithHost:host port:port protocol:protocol realm:realm authenticationMethod:authenticationMethod]);
</span><span class="cx">     
</span><del>-    NSURLCredential *credential = mac(CredentialStorage::get(core(protectionSpace.get())));
</del><ins>+    NSURLCredential *credential = mac(CredentialStorage::get(ProtectionSpace(protectionSpace.get())));
</ins><span class="cx">     if (!credential)
</span><span class="cx">         credential = [[NSURLCredentialStorage sharedCredentialStorage] defaultCredentialForProtectionSpace:protectionSpace.get()];
</span><span class="cx">     if (!credential)
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -406,7 +406,7 @@
</span><span class="cx">     WebView *webView = getWebView(m_webFrame.get());
</span><span class="cx">     WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
</span><span class="cx">     
</span><del>-    NSURLProtectionSpace *webProtectionSpace = mac(protectionSpace);
</del><ins>+    NSURLProtectionSpace *webProtectionSpace = protectionSpace.nsSpace();
</ins><span class="cx">     
</span><span class="cx">     if (implementations-&gt;canAuthenticateAgainstProtectionSpaceFunc) {
</span><span class="cx">         if (id resource = [webView _objectForIdentifier:identifier]) {
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebKit2/ChangeLog        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-07-24  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        WebKit2 part of &lt;rdar://problem/17766348&gt; [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
+        https://bugs.webkit.org/show_bug.cgi?id=135229
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Shared/Cocoa/WKNSURLProtectionSpace.mm: Changed to use ProtectionSpace::nsSpace.
+
+        * Shared/WebCoreArgumentCoders.cpp:
+        (IPC::ArgumentCoder&lt;ProtectionSpace&gt;::encode): If encoding the space requires encoding the
+        platform data, do that.
+        (IPC::ArgumentCoder&lt;ProtectionSpace&gt;::decode): If platform data was encoded, decode it.
+        * Shared/WebCoreArgumentCoders.h:
+
+        * Shared/mac/WebCoreArgumentCodersMac.mm:
+        (IPC::ArgumentCoder&lt;ProtectionSpace&gt;::encodePlatformData): Archive the NSURLProtectionSpace.
+        (IPC::ArgumentCoder&lt;ProtectionSpace&gt;::decodePlatformData): Unarchive it.
+
+        * Shared/soup/WebCoreArgumentCodersSoup.cpp:
+        (IPC::ArgumentCoder&lt;ProtectionSpace&gt;::encodePlatformData): Added.
+        (IPC::ArgumentCoder&lt;ProtectionSpace&gt;::decodePlatformData): Added.
+
</ins><span class="cx"> 2014-07-24  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedCocoaWKNSURLProtectionSpacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Cocoa/WKNSURLProtectionSpace.mm (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Cocoa/WKNSURLProtectionSpace.mm        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebKit2/Shared/Cocoa/WKNSURLProtectionSpace.mm        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (NSObject *)_web_createTarget
</span><span class="cx"> {
</span><del>-    return [mac(reinterpret_cast&lt;WebProtectionSpace*&gt;(&amp;self._apiObject)-&gt;protectionSpace()) copy];
</del><ins>+    return [reinterpret_cast&lt;WebProtectionSpace*&gt;(&amp;self._apiObject)-&gt;protectionSpace().nsSpace() copy];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #pragma mark NSCopying protocol implementation
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -459,6 +459,13 @@
</span><span class="cx"> 
</span><span class="cx"> void ArgumentCoder&lt;ProtectionSpace&gt;::encode(ArgumentEncoder&amp; encoder, const ProtectionSpace&amp; space)
</span><span class="cx"> {
</span><ins>+    if (space.encodingRequiresPlatformData()) {
+        encoder &lt;&lt; true;
+        encodePlatformData(encoder, space);
+        return;
+    }
+
+    encoder &lt;&lt; false;
</ins><span class="cx">     encoder &lt;&lt; space.host() &lt;&lt; space.port() &lt;&lt; space.realm();
</span><span class="cx">     encoder.encodeEnum(space.authenticationScheme());
</span><span class="cx">     encoder.encodeEnum(space.serverType());
</span><span class="lines">@@ -466,6 +473,13 @@
</span><span class="cx"> 
</span><span class="cx"> bool ArgumentCoder&lt;ProtectionSpace&gt;::decode(ArgumentDecoder&amp; decoder, ProtectionSpace&amp; space)
</span><span class="cx"> {
</span><ins>+    bool hasPlatformData;
+    if (!decoder.decode(hasPlatformData))
+        return false;
+
+    if (hasPlatformData)
+        return decodePlatformData(decoder, space);
+
</ins><span class="cx">     String host;
</span><span class="cx">     if (!decoder.decode(host))
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCodersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -228,6 +228,8 @@
</span><span class="cx"> template&lt;&gt; struct ArgumentCoder&lt;WebCore::ProtectionSpace&gt; {
</span><span class="cx">     static void encode(ArgumentEncoder&amp;, const WebCore::ProtectionSpace&amp;);
</span><span class="cx">     static bool decode(ArgumentDecoder&amp;, WebCore::ProtectionSpace&amp;);
</span><ins>+    static void encodePlatformData(ArgumentEncoder&amp;, const WebCore::ProtectionSpace&amp;);
+    static bool decodePlatformData(ArgumentDecoder&amp;, WebCore::ProtectionSpace&amp;);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct ArgumentCoder&lt;WebCore::Credential&gt; {
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacWebCoreArgumentCodersMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #import &lt;WebCore/CertificateInfo.h&gt;
</span><span class="cx"> #import &lt;WebCore/ContentFilter.h&gt;
</span><span class="cx"> #import &lt;WebCore/KeyboardEvent.h&gt;
</span><ins>+#import &lt;WebCore/ProtectionSpace.h&gt;
</ins><span class="cx"> #import &lt;WebCore/ResourceError.h&gt;
</span><span class="cx"> #import &lt;WebCore/ResourceRequest.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -285,6 +286,35 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void ArgumentCoder&lt;ProtectionSpace&gt;::encodePlatformData(ArgumentEncoder&amp; encoder, const ProtectionSpace&amp; space)
+{
+    RetainPtr&lt;NSMutableData&gt; data = adoptNS([[NSMutableData alloc] init]);
+    RetainPtr&lt;NSKeyedArchiver&gt; archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+    [archiver setRequiresSecureCoding:YES];
+    [archiver encodeObject:space.nsSpace() forKey:@&quot;protectionSpace&quot;];
+    [archiver finishEncoding];
+    IPC::encode(encoder, reinterpret_cast&lt;CFDataRef&gt;(data.get()));
+}
+
+bool ArgumentCoder&lt;ProtectionSpace&gt;::decodePlatformData(ArgumentDecoder&amp; decoder, ProtectionSpace&amp; space)
+{
+    RetainPtr&lt;CFDataRef&gt; data;
+    if (!IPC::decode(decoder, data))
+        return false;
+
+    RetainPtr&lt;NSKeyedUnarchiver&gt; unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)data.get()]);
+    [unarchiver setRequiresSecureCoding:YES];
+    @try {
+        if (RetainPtr&lt;NSURLProtectionSpace&gt; nsSpace = [unarchiver decodeObjectOfClass:[NSURLProtectionSpace class] forKey:@&quot;protectionSpace&quot;])
+            space = ProtectionSpace(nsSpace.get());
+    } @catch (NSException *exception) {
+        LOG_ERROR(&quot;Failed to decode NSURLProtectionSpace: %@&quot;, exception);
+    }
+
+    [unarchiver finishDecoding];
+    return true;
+}
+
</ins><span class="cx"> void ArgumentCoder&lt;KeypressCommand&gt;::encode(ArgumentEncoder&amp; encoder, const KeypressCommand&amp; keypressCommand)
</span><span class="cx"> {
</span><span class="cx">     encoder &lt;&lt; keypressCommand.commandName &lt;&lt; keypressCommand.text;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedsoupWebCoreArgumentCodersSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/soup/WebCoreArgumentCodersSoup.cpp (171539 => 171540)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/soup/WebCoreArgumentCodersSoup.cpp        2014-07-24 22:42:40 UTC (rev 171539)
+++ trunk/Source/WebKit2/Shared/soup/WebCoreArgumentCodersSoup.cpp        2014-07-24 22:51:12 UTC (rev 171540)
</span><span class="lines">@@ -141,5 +141,16 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void ArgumentCoder&lt;ProtectionSpace&gt;::encodePlatformData(ArgumentEncoder&amp;, const ProtectionSpace&amp;)
+{
+    ASSERT_NOT_REACHED();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool ArgumentCoder&lt;ProtectionSpace&gt;::decodePlatformData(ArgumentDecoder&amp;, ProtectionSpace&amp;)
+{
+    ASSERT_NOT_REACHED();
+    return false;
+}
+
+}
+
</ins></span></pre>
</div>
</div>

</body>
</html>