[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
beidson at apple.com
beidson at apple.com
Wed Dec 22 18:17:28 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 67dc2b255bcc493e5d918b36fbe4397f06a553ac
Author: beidson at apple.com <beidson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 9 16:55:19 2010 +0000
<rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191
WebKit2 Authentication Support
Reviewed by Maciej Stachowiak.
WebCore:
* WebCore.exp.in:
WebKit2:
Implement authentication-related coders:
* Shared/WebCoreArgumentCoders.h:
Allow the ResourceResponse coders to handle null responses:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::encodeResourceResponse):
(CoreIPC::decodeResourceResponse):
Add new API and Impl casts for ProtectionSpace and Credential enums:
* UIProcess/API/C/WKAPICast.h:
(WebKit::toAPI):
(WebKit::toCredentialPersistence):
Move the DecisionListener to be accessed off the challenge itself, and fill in other
necessary API:
* UIProcess/API/C/WKAuthenticationChallenge.cpp:
(WKAuthenticationChallengeGetDecisionListener):
(WKAuthenticationChallengeGetProtectionSpace):
(WKAuthenticationChallengeGetProposedCredential):
(WKAuthenticationChallengeGetPreviousFailureCount):
* UIProcess/API/C/WKAuthenticationChallenge.h:
* UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
(WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
(WebKit::AuthenticationChallengeProxy::proposedCredential):
(WebKit::AuthenticationChallengeProxy::protectionSpace):
* UIProcess/Authentication/AuthenticationChallengeProxy.h:
(WebKit::AuthenticationChallengeProxy::previousFailureCount):
Fill in some credential API:
* UIProcess/API/C/WKCredential.cpp:
(WKCredentialCreate):
(WKCredentialCopyUser):
* UIProcess/API/C/WKCredential.h:
* UIProcess/API/C/WKCredentialTypes.h: Added.
* UIProcess/Authentication/WebCredential.cpp:
(WebKit::WebCredential::WebCredential):
(WebKit::WebCredential::user):
* UIProcess/Authentication/WebCredential.h:
(WebKit::WebCredential::create):
Fill in some protection space API:
* UIProcess/API/C/WKProtectionSpace.cpp:
(WKProtectionSpaceCopyHost):
(WKProtectionSpaceGetPort):
(WKProtectionSpaceCopyRealm):
(WKProtectionSpaceGetIsProxy):
(WKProtectionSpaceGetServerType):
(WKProtectionSpaceGetReceivesCredentialSecurely):
(WKProtectionSpaceGetAuthenticationScheme):
* UIProcess/API/C/WKProtectionSpace.h:
* UIProcess/API/C/WKProtectionSpaceTypes.h: Added.
* UIProcess/Authentication/WebProtectionSpace.cpp:
(WebKit::WebProtectionSpace::WebProtectionSpace):
(WebKit::WebProtectionSpace::host):
(WebKit::WebProtectionSpace::port):
(WebKit::WebProtectionSpace::realm):
(WebKit::WebProtectionSpace::isProxy):
(WebKit::WebProtectionSpace::serverType):
(WebKit::WebProtectionSpace::receivesCredentialSecurely):
(WebKit::WebProtectionSpace::authenticationScheme):
* UIProcess/Authentication/WebProtectionSpace.h:
Change the authentication challenge callback to reflect the new ownership of
the DecisionListener:
* UIProcess/API/C/WKPage.h:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didReceiveAuthenticationChallengeInFrame):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 306927d..d6d66bf 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,12 @@
+2010-12-09 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ <rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191
+ WebKit2 Authentication Support
+
+ * WebCore.exp.in:
+
2010-12-09 Peter Beverloo <peter at lvp-media.com>
Reviewed by Maciej Stachowiak.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 11e1287..d8018d2 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -137,6 +137,7 @@ __ZN3JSC8Bindings8Instance16newRuntimeObjectEPNS_9ExecStateE
__ZN3WTF10StringImplcvP8NSStringEv
__ZN3WTF6StringC1EP8NSString
__ZN3WTF6StringC1EPK10__CFString
+__ZN7WebCore10CredentialC1ERKN3WTF6StringES4_NS_21CredentialPersistenceE
__ZN7WebCore10CredentialC1Ev
__ZN7WebCore10JSDocument6s_infoE
__ZN7WebCore10MouseEventC1ERKN3WTF12AtomicStringEbbNS1_10PassRefPtrINS_9DOMWindowEEEiiiiibbbbtNS5_INS_11EventTargetEEENS5_INS_9ClipboardEEEb
@@ -371,6 +372,7 @@ __ZN7WebCore15GraphicsContext9translateEff
__ZN7WebCore15GraphicsContextC1EP9CGContext
__ZN7WebCore15GraphicsContextD1Ev
__ZN7WebCore15JSDOMWindowBase18commonJSGlobalDataEv
+__ZN7WebCore15ProtectionSpaceC1ERKN3WTF6StringEiNS_25ProtectionSpaceServerTypeES4_NS_35ProtectionSpaceAuthenticationSchemeE
__ZN7WebCore15ProtectionSpaceC1Ev
__ZN7WebCore15ScrollAlignment17alignCenterAlwaysE
__ZN7WebCore15ScrollAlignment19alignToEdgeIfNeededE
@@ -507,6 +509,7 @@ __ZN7WebCore22contextMenuItemTagBoldEv
__ZN7WebCore22counterValueForElementEPNS_7ElementE
__ZN7WebCore22createFragmentFromTextEPNS_5RangeERKN3WTF6StringE
__ZN7WebCore22externalRepresentationEPNS_5FrameEj
+__ZN7WebCore23AuthenticationChallengeC1ERKNS_15ProtectionSpaceERKNS_10CredentialEjRKNS_16ResourceResponseERKNS_13ResourceErrorE
__ZN7WebCore23ReplaceSelectionCommandC1EPNS_8DocumentEN3WTF10PassRefPtrINS_16DocumentFragmentEEEbbbbbNS_10EditActionE
__ZN7WebCore23createFragmentFromNodesEPNS_8DocumentERKN3WTF6VectorIPNS_4NodeELm0EEE
__ZN7WebCore23overrideDefaultLanguageERKN3WTF6StringE
@@ -914,6 +917,9 @@ __ZN7WebCore9plainTextEPKNS_5RangeENS_20TextIteratorBehaviorE
__ZN7WebCore9toElementEN3JSC7JSValueE
__ZNK3JSC8Bindings10RootObject12globalObjectEv
__ZNK3WTF6String14createCFStringEv
+__ZNK7WebCore10Credential11persistenceEv
+__ZNK7WebCore10Credential4userEv
+__ZNK7WebCore10Credential8passwordEv
__ZNK7WebCore10FloatPointcv8_NSPointEv
__ZNK7WebCore10PluginData16supportsMimeTypeERKN3WTF6StringE
__ZNK7WebCore10RenderText16linesBoundingBoxEv
@@ -1013,6 +1019,12 @@ __ZNK7WebCore15FocusController18focusedOrMainFrameEv
__ZNK7WebCore15GraphicsContext15platformContextEv
__ZNK7WebCore15GraphicsContext16paintingDisabledEv
__ZNK7WebCore15ProgressTracker17estimatedProgressEv
+__ZNK7WebCore15ProtectionSpace10serverTypeEv
+__ZNK7WebCore15ProtectionSpace26receivesCredentialSecurelyEv
+__ZNK7WebCore15ProtectionSpace4hostEv
+__ZNK7WebCore15ProtectionSpace4portEv
+__ZNK7WebCore15ProtectionSpace5realmEv
+__ZNK7WebCore15ProtectionSpace7isProxyEv
__ZNK7WebCore15ResourceRequest12nsURLRequestEv
__ZNK7WebCore15VisiblePosition14characterAfterEv
__ZNK7WebCore15VisiblePosition14localCaretRectERPNS_12RenderObjectE
@@ -1058,6 +1070,11 @@ __ZNK7WebCore23AuthenticationChallenge20authenticationClientEv
__ZNK7WebCore23FrameLoaderStateMachine15firstLayoutDoneEv
__ZNK7WebCore23FrameLoaderStateMachine23committingFirstRealLoadEv
__ZNK7WebCore26NetscapePlugInStreamLoader6isDoneEv
+__ZNK7WebCore27AuthenticationChallengeBase15failureResponseEv
+__ZNK7WebCore27AuthenticationChallengeBase15protectionSpaceEv
+__ZNK7WebCore27AuthenticationChallengeBase18proposedCredentialEv
+__ZNK7WebCore27AuthenticationChallengeBase20previousFailureCountEv
+__ZNK7WebCore27AuthenticationChallengeBase5errorEv
__ZNK7WebCore27AuthenticationChallengeBase6isNullEv
__ZNK7WebCore4Font10floatWidthERKNS_7TextRunEPN3WTF7HashSetIPKNS_14SimpleFontDataENS4_7PtrHashIS8_EENS4_10HashTraitsIS8_EEEEPNS_13GlyphOverflowE
__ZNK7WebCore4Font8drawTextEPNS_15GraphicsContextERKNS_7TextRunERKNS_10FloatPointEii
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index bbf401c..18bdef4 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,86 @@
+2010-12-09 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ <rdar://problem/7660733> and https://bugs.webkit.org/show_bug.cgi?id=50191
+ WebKit2 Authentication Support
+
+ Implement authentication-related coders:
+ * Shared/WebCoreArgumentCoders.h:
+
+ Allow the ResourceResponse coders to handle null responses:
+ * Shared/mac/WebCoreArgumentCodersMac.mm:
+ (CoreIPC::encodeResourceResponse):
+ (CoreIPC::decodeResourceResponse):
+
+ Add new API and Impl casts for ProtectionSpace and Credential enums:
+ * UIProcess/API/C/WKAPICast.h:
+ (WebKit::toAPI):
+ (WebKit::toCredentialPersistence):
+
+ Move the DecisionListener to be accessed off the challenge itself, and fill in other
+ necessary API:
+ * UIProcess/API/C/WKAuthenticationChallenge.cpp:
+ (WKAuthenticationChallengeGetDecisionListener):
+ (WKAuthenticationChallengeGetProtectionSpace):
+ (WKAuthenticationChallengeGetProposedCredential):
+ (WKAuthenticationChallengeGetPreviousFailureCount):
+ * UIProcess/API/C/WKAuthenticationChallenge.h:
+ * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
+ (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
+ (WebKit::AuthenticationChallengeProxy::proposedCredential):
+ (WebKit::AuthenticationChallengeProxy::protectionSpace):
+ * UIProcess/Authentication/AuthenticationChallengeProxy.h:
+ (WebKit::AuthenticationChallengeProxy::previousFailureCount):
+
+ Fill in some credential API:
+ * UIProcess/API/C/WKCredential.cpp:
+ (WKCredentialCreate):
+ (WKCredentialCopyUser):
+ * UIProcess/API/C/WKCredential.h:
+ * UIProcess/API/C/WKCredentialTypes.h: Added.
+ * UIProcess/Authentication/WebCredential.cpp:
+ (WebKit::WebCredential::WebCredential):
+ (WebKit::WebCredential::user):
+ * UIProcess/Authentication/WebCredential.h:
+ (WebKit::WebCredential::create):
+
+ Fill in some protection space API:
+ * UIProcess/API/C/WKProtectionSpace.cpp:
+ (WKProtectionSpaceCopyHost):
+ (WKProtectionSpaceGetPort):
+ (WKProtectionSpaceCopyRealm):
+ (WKProtectionSpaceGetIsProxy):
+ (WKProtectionSpaceGetServerType):
+ (WKProtectionSpaceGetReceivesCredentialSecurely):
+ (WKProtectionSpaceGetAuthenticationScheme):
+ * UIProcess/API/C/WKProtectionSpace.h:
+ * UIProcess/API/C/WKProtectionSpaceTypes.h: Added.
+ * UIProcess/Authentication/WebProtectionSpace.cpp:
+ (WebKit::WebProtectionSpace::WebProtectionSpace):
+ (WebKit::WebProtectionSpace::host):
+ (WebKit::WebProtectionSpace::port):
+ (WebKit::WebProtectionSpace::realm):
+ (WebKit::WebProtectionSpace::isProxy):
+ (WebKit::WebProtectionSpace::serverType):
+ (WebKit::WebProtectionSpace::receivesCredentialSecurely):
+ (WebKit::WebProtectionSpace::authenticationScheme):
+ * UIProcess/Authentication/WebProtectionSpace.h:
+
+ Change the authentication challenge callback to reflect the new ownership of
+ the DecisionListener:
+ * UIProcess/API/C/WKPage.h:
+ * UIProcess/WebLoaderClient.cpp:
+ (WebKit::WebLoaderClient::didReceiveAuthenticationChallengeInFrame):
+ * UIProcess/WebLoaderClient.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
+
+ * WebKit2.pro:
+ * WebKit2.xcodeproj/project.pbxproj:
+ * win/WebKit2.vcproj:
+ * win/WebKit2Generated.make:
+
2010-12-08 Sam Weinig <sam at webkit.org>
Reviewed by Geoffrey "Error" Garen.
diff --git a/WebKit2/Shared/WebCoreArgumentCoders.h b/WebKit2/Shared/WebCoreArgumentCoders.h
index bdbe834..f8ffe00 100644
--- a/WebKit2/Shared/WebCoreArgumentCoders.h
+++ b/WebKit2/Shared/WebCoreArgumentCoders.h
@@ -115,25 +115,45 @@ template<> struct ArgumentCoder<WebCore::HTTPHeaderMap> {
template<> struct ArgumentCoder<WebCore::AuthenticationChallenge> {
static void encode(ArgumentEncoder* encoder, const WebCore::AuthenticationChallenge& challenge)
{
- // FIXME: Implement
+ encoder->encode(CoreIPC::In(challenge.protectionSpace(), challenge.proposedCredential(), challenge.previousFailureCount(), challenge.failureResponse(), challenge.error()));
}
- static bool decode(ArgumentDecoder* decoder, WebCore::AuthenticationChallenge& credential)
- {
- // FIXME: Implement
+ static bool decode(ArgumentDecoder* decoder, WebCore::AuthenticationChallenge& challenge)
+ {
+ WebCore::ProtectionSpace protectionSpace;
+ WebCore::Credential proposedCredential;
+ unsigned previousFailureCount;
+ WebCore::ResourceResponse failureResponse;
+ WebCore::ResourceError error;
+
+ if (!decoder->decode(CoreIPC::Out(protectionSpace, proposedCredential, previousFailureCount, failureResponse, error)))
+ return false;
+
+ challenge = WebCore::AuthenticationChallenge(protectionSpace, proposedCredential, previousFailureCount, failureResponse, error);
+
return true;
}
};
template<> struct ArgumentCoder<WebCore::ProtectionSpace> {
- static void encode(ArgumentEncoder* encoder, const WebCore::ProtectionSpace& challenge)
+ static void encode(ArgumentEncoder* encoder, const WebCore::ProtectionSpace& space)
{
- // FIXME: Implement
+ encoder->encode(CoreIPC::In(space.host(), space.port(), static_cast<uint32_t>(space.serverType()), space.realm(), static_cast<uint32_t>(space.authenticationScheme())));
}
- static bool decode(ArgumentDecoder* decoder, WebCore::ProtectionSpace& credential)
+ static bool decode(ArgumentDecoder* decoder, WebCore::ProtectionSpace& space)
{
- // FIXME: Implement
+ String host;
+ int port;
+ uint32_t serverType;
+ String realm;
+ uint32_t authenticationScheme;
+
+ if (!decoder->decode(CoreIPC::Out(host, port, serverType, realm, authenticationScheme)))
+ return false;
+
+ space = WebCore::ProtectionSpace(host, port, static_cast<WebCore::ProtectionSpaceServerType>(serverType), realm, static_cast<WebCore::ProtectionSpaceAuthenticationScheme>(authenticationScheme));
+
return true;
}
};
@@ -141,12 +161,18 @@ template<> struct ArgumentCoder<WebCore::ProtectionSpace> {
template<> struct ArgumentCoder<WebCore::Credential> {
static void encode(ArgumentEncoder* encoder, const WebCore::Credential& credential)
{
- // FIXME: Implement
+ encoder->encode(CoreIPC::In(credential.user(), credential.password(), static_cast<uint32_t>(credential.persistence())));
}
static bool decode(ArgumentDecoder* decoder, WebCore::Credential& credential)
{
- // FIXME: Implement
+ String user;
+ String password;
+ int persistence;
+ if (!decoder->decode(CoreIPC::Out(user, password, persistence)))
+ return false;
+
+ credential = WebCore::Credential(user, password, static_cast<WebCore::CredentialPersistence>(persistence));
return true;
}
};
diff --git a/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm b/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm
index 1080949..120dc34 100644
--- a/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm
+++ b/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm
@@ -60,16 +60,26 @@ bool decodeResourceRequest(ArgumentDecoder* decoder, WebCore::ResourceRequest& r
void encodeResourceResponse(ArgumentEncoder* encoder, const WebCore::ResourceResponse& resourceResponse)
{
+ bool responseIsPresent = resourceResponse.nsURLResponse();
+ encoder->encode(responseIsPresent);
+
+ // FIXME: <rdar://problem/8741799> - We can't use NSKeyedArchiver here.
encodeWithNSKeyedArchiver(encoder, resourceResponse.nsURLResponse());
}
bool decodeResourceResponse(ArgumentDecoder* decoder, WebCore::ResourceResponse& resourceResponse)
{
+ bool responseIsPresent;
+ decoder->decode(responseIsPresent);
+
+ // FIXME: <rdar://problem/8741799> - We can't use NSKeyedArchiver here.
NSURLResponse *nsURLResponse = decodeWithNSKeyedArchiver(decoder);
- if (!nsURLResponse)
+ if (responseIsPresent && !nsURLResponse)
return false;
- resourceResponse = WebCore::ResourceResponse(nsURLResponse);
+ if (responseIsPresent)
+ resourceResponse = WebCore::ResourceResponse(nsURLResponse);
+
return true;
}
diff --git a/WebKit2/UIProcess/API/C/WKAPICast.h b/WebKit2/UIProcess/API/C/WKAPICast.h
index 4e1e400..fc33f39 100644
--- a/WebKit2/UIProcess/API/C/WKAPICast.h
+++ b/WebKit2/UIProcess/API/C/WKAPICast.h
@@ -29,9 +29,14 @@
#include "CacheModel.h"
#include "FontSmoothingLevel.h"
#include "WKContext.h"
+#include "WKCredentialTypes.h"
#include "WKPage.h"
#include "WKPreferencesPrivate.h"
+#include "WKProtectionSpaceTypes.h"
#include "WKSharedAPICast.h"
+#include <WebCore/Credential.h>
+#include <WebCore/FrameLoaderTypes.h>
+#include <WebCore/ProtectionSpace.h>
namespace WebKit {
@@ -147,6 +152,67 @@ inline WKFontSmoothingLevel toAPI(FontSmoothingLevel level)
return kWKFontSmoothingLevelMedium;
}
+inline WKProtectionSpaceServerType toAPI(WebCore::ProtectionSpaceServerType type)
+{
+ switch (type) {
+ case WebCore::ProtectionSpaceServerHTTP:
+ return kWKProtectionSpaceServerTypeHTTP;
+ case WebCore::ProtectionSpaceServerHTTPS:
+ return kWKProtectionSpaceServerTypeHTTPS;
+ case WebCore::ProtectionSpaceServerFTP:
+ return kWKProtectionSpaceServerTypeFTP;
+ case WebCore::ProtectionSpaceServerFTPS:
+ return kWKProtectionSpaceServerTypeFTPS;
+ case WebCore::ProtectionSpaceProxyHTTP:
+ return kWKProtectionSpaceProxyTypeHTTP;
+ case WebCore::ProtectionSpaceProxyHTTPS:
+ return kWKProtectionSpaceProxyTypeHTTPS;
+ case WebCore::ProtectionSpaceProxyFTP:
+ return kWKProtectionSpaceProxyTypeFTP;
+ case WebCore::ProtectionSpaceProxySOCKS:
+ return kWKProtectionSpaceProxyTypeSOCKS;
+ }
+ return kWKProtectionSpaceServerTypeHTTP;
+}
+
+inline WKProtectionSpaceAuthenticationScheme toAPI(WebCore::ProtectionSpaceAuthenticationScheme type)
+{
+ switch (type) {
+ case WebCore::ProtectionSpaceAuthenticationSchemeDefault:
+ return kWKProtectionSpaceAuthenticationSchemeDefault;
+ case WebCore::ProtectionSpaceAuthenticationSchemeHTTPBasic:
+ return kWKProtectionSpaceAuthenticationSchemeHTTPBasic;
+ case WebCore::ProtectionSpaceAuthenticationSchemeHTTPDigest:
+ return kWKProtectionSpaceAuthenticationSchemeHTTPDigest;
+ case WebCore::ProtectionSpaceAuthenticationSchemeHTMLForm:
+ return kWKProtectionSpaceAuthenticationSchemeHTMLForm;
+ case WebCore::ProtectionSpaceAuthenticationSchemeNTLM:
+ return kWKProtectionSpaceAuthenticationSchemeNTLM;
+ case WebCore::ProtectionSpaceAuthenticationSchemeNegotiate:
+ return kWKProtectionSpaceAuthenticationSchemeNegotiate;
+ case WebCore::ProtectionSpaceAuthenticationSchemeClientCertificateRequested:
+ return kWKProtectionSpaceAuthenticationSchemeClientCertificateRequested;
+ case WebCore::ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested:
+ return kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested;
+ default:
+ return kWKProtectionSpaceAuthenticationSchemeUnknown;
+ }
+}
+
+inline WebCore::CredentialPersistence toCredentialPersistence(WKCredentialPersistence type)
+{
+ switch (type) {
+ case kWKCredentialPersistenceNone:
+ return WebCore::CredentialPersistenceNone;
+ case kWKCredentialPersistenceForSession:
+ return WebCore::CredentialPersistenceForSession;
+ case kWKCredentialPersistencePermanent:
+ return WebCore::CredentialPersistencePermanent;
+ default:
+ return WebCore::CredentialPersistenceNone;
+ }
+}
+
} // namespace WebKit
#if defined(WIN32) || defined(_WIN32)
diff --git a/WebKit2/UIProcess/API/C/WKAuthenticationChallenge.cpp b/WebKit2/UIProcess/API/C/WKAuthenticationChallenge.cpp
index 0ca7acd..0997577 100644
--- a/WebKit2/UIProcess/API/C/WKAuthenticationChallenge.cpp
+++ b/WebKit2/UIProcess/API/C/WKAuthenticationChallenge.cpp
@@ -26,6 +26,8 @@
#include "WKAuthenticationChallenge.h"
#include "AuthenticationChallengeProxy.h"
+#include "WebCredential.h"
+#include "WebProtectionSpace.h"
#include "WKAPICast.h"
using namespace WebKit;
@@ -34,3 +36,23 @@ WKTypeID WKAuthenticationChallengeGetTypeID()
{
return toAPI(AuthenticationChallengeProxy::APIType);
}
+
+WKAuthenticationDecisionListenerRef WKAuthenticationChallengeGetDecisionListener(WKAuthenticationChallengeRef challenge)
+{
+ return toAPI(toImpl(challenge)->listener());
+}
+
+WKProtectionSpaceRef WKAuthenticationChallengeGetProtectionSpace(WKAuthenticationChallengeRef challenge)
+{
+ return toAPI(toImpl(challenge)->protectionSpace());
+}
+
+WKCredentialRef WKAuthenticationChallengeGetProposedCredential(WKAuthenticationChallengeRef challenge)
+{
+ return toAPI(toImpl(challenge)->proposedCredential());
+}
+
+int WKAuthenticationChallengeGetPreviousFailureCount(WKAuthenticationChallengeRef challenge)
+{
+ return toImpl(challenge)->previousFailureCount();
+}
diff --git a/WebKit2/UIProcess/API/C/WKAuthenticationChallenge.h b/WebKit2/UIProcess/API/C/WKAuthenticationChallenge.h
index 49b951f..3802f41 100644
--- a/WebKit2/UIProcess/API/C/WKAuthenticationChallenge.h
+++ b/WebKit2/UIProcess/API/C/WKAuthenticationChallenge.h
@@ -34,6 +34,11 @@ extern "C" {
WK_EXPORT WKTypeID WKAuthenticationChallengeGetTypeID();
+WK_EXPORT WKAuthenticationDecisionListenerRef WKAuthenticationChallengeGetDecisionListener(WKAuthenticationChallengeRef);
+WK_EXPORT WKProtectionSpaceRef WKAuthenticationChallengeGetProtectionSpace(WKAuthenticationChallengeRef);
+WK_EXPORT WKCredentialRef WKAuthenticationChallengeGetProposedCredential(WKAuthenticationChallengeRef);
+WK_EXPORT int WKAuthenticationChallengeGetPreviousFailureCount(WKAuthenticationChallengeRef);
+
#ifdef __cplusplus
}
#endif
diff --git a/WebKit2/UIProcess/API/C/WKCredential.cpp b/WebKit2/UIProcess/API/C/WKCredential.cpp
index 9afe284..25e1185 100644
--- a/WebKit2/UIProcess/API/C/WKCredential.cpp
+++ b/WebKit2/UIProcess/API/C/WKCredential.cpp
@@ -26,6 +26,7 @@
#include "WKCredential.h"
#include "WebCredential.h"
+#include "WebString.h"
#include "WKAPICast.h"
using namespace WebKit;
@@ -34,3 +35,15 @@ WKTypeID WKCredentialGetTypeID()
{
return toAPI(WebCredential::APIType);
}
+
+WKCredentialRef WKCredentialCreate(WKStringRef username, WKStringRef password, WKCredentialPersistence persistence)
+{
+ RefPtr<WebCredential> credential = WebCredential::create(toImpl(username), toImpl(password), toCredentialPersistence(persistence));
+ return toAPI(credential.release().releaseRef());
+}
+
+WKStringRef WKCredentialCopyUser(WKCredentialRef credentialRef)
+{
+ return toCopiedAPI(toImpl(credentialRef)->user());
+}
+
diff --git a/WebKit2/UIProcess/API/C/WKCredential.h b/WebKit2/UIProcess/API/C/WKCredential.h
index 3b64349..8b2602e 100644
--- a/WebKit2/UIProcess/API/C/WKCredential.h
+++ b/WebKit2/UIProcess/API/C/WKCredential.h
@@ -27,6 +27,7 @@
#define WKCredential_h
#include <WebKit2/WKBase.h>
+#include <WebKit2/WKCredentialTypes.h>
#ifdef __cplusplus
extern "C" {
@@ -34,6 +35,9 @@ extern "C" {
WK_EXPORT WKTypeID WKCredentialGetTypeID();
+WK_EXPORT WKCredentialRef WKCredentialCreate(WKStringRef username, WKStringRef password, WKCredentialPersistence);
+WK_EXPORT WKStringRef WKCredentialCopyUser(WKCredentialRef);
+
#ifdef __cplusplus
}
#endif
diff --git a/WebKit2/UIProcess/API/C/WKCredentialTypes.h b/WebKit2/UIProcess/API/C/WKCredentialTypes.h
new file mode 100644
index 0000000..bba31ac
--- /dev/null
+++ b/WebKit2/UIProcess/API/C/WKCredentialTypes.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE 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 WKCredentialTypes_h
+#define WKCredentialTypes_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+ kWKCredentialPersistenceNone,
+ kWKCredentialPersistenceForSession,
+ kWKCredentialPersistencePermanent
+};
+typedef uint32_t WKCredentialPersistence;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKCredentialTypes_h */
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index 7e48962..c97b8aa 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -57,7 +57,7 @@ typedef void (*WKPageDidRemoveFrameFromHierarchyCallback)(WKPageRef page, WKFram
typedef void (*WKPageDidDisplayInsecureContentForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo);
typedef void (*WKPageDidRunInsecureContentForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo);
typedef bool (*WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback)(WKPageRef page, WKFrameRef frame, WKProtectionSpaceRef protectionSpace, const void *clientInfo);
-typedef void (*WKPageDidReceiveAuthenticationChallengeInFrameCallback)(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge, WKAuthenticationDecisionListenerRef listener, const void *clientInfo);
+typedef void (*WKPageDidReceiveAuthenticationChallengeInFrameCallback)(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge, const void *clientInfo);
// Progress Client
typedef void (*WKPageDidStartProgressCallback)(WKPageRef page, const void *clientInfo);
diff --git a/WebKit2/UIProcess/API/C/WKProtectionSpace.cpp b/WebKit2/UIProcess/API/C/WKProtectionSpace.cpp
index 2ce1fc3..c72ee98 100644
--- a/WebKit2/UIProcess/API/C/WKProtectionSpace.cpp
+++ b/WebKit2/UIProcess/API/C/WKProtectionSpace.cpp
@@ -34,3 +34,38 @@ WKTypeID WKProtectionSpaceGetTypeID()
{
return toAPI(WebProtectionSpace::APIType);
}
+
+WKStringRef WKProtectionSpaceCopyHost(WKProtectionSpaceRef protectionSpaceRef)
+{
+ return toCopiedAPI(toImpl(protectionSpaceRef)->host());
+}
+
+int WKProtectionSpaceGetPort(WKProtectionSpaceRef protectionSpaceRef)
+{
+ return toImpl(protectionSpaceRef)->port();
+}
+
+WKStringRef WKProtectionSpaceCopyRealm(WKProtectionSpaceRef protectionSpaceRef)
+{
+ return toCopiedAPI(toImpl(protectionSpaceRef)->realm());
+}
+
+bool WKProtectionSpaceGetIsProxy(WKProtectionSpaceRef protectionSpaceRef)
+{
+ return toImpl(protectionSpaceRef)->isProxy();
+}
+
+WKProtectionSpaceServerType WKProtectionSpaceGetServerType(WKProtectionSpaceRef protectionSpaceRef)
+{
+ return toAPI(toImpl(protectionSpaceRef)->serverType());
+}
+
+bool WKProtectionSpaceGetReceivesCredentialSecurely(WKProtectionSpaceRef protectionSpaceRef)
+{
+ return toImpl(protectionSpaceRef)->receivesCredentialSecurely();
+}
+
+WKProtectionSpaceAuthenticationScheme WKProtectionSpaceGetAuthenticationScheme(WKProtectionSpaceRef protectionSpaceRef)
+{
+ return toAPI(toImpl(protectionSpaceRef)->authenticationScheme());
+}
diff --git a/WebKit2/UIProcess/API/C/WKProtectionSpace.h b/WebKit2/UIProcess/API/C/WKProtectionSpace.h
index 4f919cf..c77d93b 100644
--- a/WebKit2/UIProcess/API/C/WKProtectionSpace.h
+++ b/WebKit2/UIProcess/API/C/WKProtectionSpace.h
@@ -27,6 +27,7 @@
#define WKProtectionSpace_h
#include <WebKit2/WKBase.h>
+#include <WebKit2/WKProtectionSpaceTypes.h>
#ifdef __cplusplus
extern "C" {
@@ -34,6 +35,14 @@ extern "C" {
WK_EXPORT WKTypeID WKProtectionSpaceGetTypeID();
+WK_EXPORT WKStringRef WKProtectionSpaceCopyHost(WKProtectionSpaceRef);
+WK_EXPORT int WKProtectionSpaceGetPort(WKProtectionSpaceRef);
+WK_EXPORT WKStringRef WKProtectionSpaceCopyRealm(WKProtectionSpaceRef);
+WK_EXPORT bool WKProtectionSpaceGetIsProxy(WKProtectionSpaceRef);
+WK_EXPORT WKProtectionSpaceServerType WKProtectionSpaceGetServerType(WKProtectionSpaceRef);
+WK_EXPORT bool WKProtectionSpaceGetReceivesCredentialSecurely(WKProtectionSpaceRef);
+WK_EXPORT WKProtectionSpaceAuthenticationScheme WKProtectionSpaceGetAuthenticationScheme(WKProtectionSpaceRef);
+
#ifdef __cplusplus
}
#endif
diff --git a/WebKit2/UIProcess/API/C/WKProtectionSpaceTypes.h b/WebKit2/UIProcess/API/C/WKProtectionSpaceTypes.h
new file mode 100644
index 0000000..fd1bd09
--- /dev/null
+++ b/WebKit2/UIProcess/API/C/WKProtectionSpaceTypes.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE 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 WKProtectionSpaceTypes_h
+#define WKProtectionSpaceTypes_h
+
+#include <WebKit2/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+ kWKProtectionSpaceServerTypeHTTP = 1,
+ kWKProtectionSpaceServerTypeHTTPS,
+ kWKProtectionSpaceServerTypeFTP,
+ kWKProtectionSpaceServerTypeFTPS,
+ kWKProtectionSpaceProxyTypeHTTP,
+ kWKProtectionSpaceProxyTypeHTTPS,
+ kWKProtectionSpaceProxyTypeFTP,
+ kWKProtectionSpaceProxyTypeSOCKS,
+};
+typedef uint32_t WKProtectionSpaceServerType;
+
+enum {
+ kWKProtectionSpaceAuthenticationSchemeDefault = 1,
+ kWKProtectionSpaceAuthenticationSchemeHTTPBasic,
+ kWKProtectionSpaceAuthenticationSchemeHTTPDigest,
+ kWKProtectionSpaceAuthenticationSchemeHTMLForm,
+ kWKProtectionSpaceAuthenticationSchemeNTLM,
+ kWKProtectionSpaceAuthenticationSchemeNegotiate,
+ kWKProtectionSpaceAuthenticationSchemeClientCertificateRequested,
+ kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested,
+ kWKProtectionSpaceAuthenticationSchemeUnknown = 100,
+};
+typedef uint32_t WKProtectionSpaceAuthenticationScheme;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // WKProtectionSpaceTypes_h
diff --git a/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp b/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
index 519faa4..07b39b2 100644
--- a/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
+++ b/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
@@ -31,6 +31,7 @@
#include "WebCredential.h"
#include "WebPageProxy.h"
#include "WebProcessProxy.h"
+#include "WebProtectionSpace.h"
namespace WebKit {
@@ -47,7 +48,7 @@ AuthenticationChallengeProxy::~AuthenticationChallengeProxy()
{
// If an outstanding AuthenticationChallengeProxy is being destroyed even though it hasn't been responded to yet,
// we cancel it here so the WebProcess isn't waiting for an answer forever.
- if (m_challengeID)
+ if (m_challengeID && m_page->process())
m_page->process()->send(Messages::AuthenticationManager::CancelChallenge(m_challengeID), m_page->pageID());
if (m_listener)
@@ -77,4 +78,20 @@ void AuthenticationChallengeProxy::cancel()
m_challengeID = 0;
}
+WebCredential* AuthenticationChallengeProxy::proposedCredential() const
+{
+ if (!m_webCredential)
+ m_webCredential = WebCredential::create(m_coreAuthenticationChallenge.proposedCredential());
+
+ return m_webCredential.get();
+}
+
+WebProtectionSpace* AuthenticationChallengeProxy::protectionSpace() const
+{
+ if (!m_webProtectionSpace)
+ m_webProtectionSpace = WebProtectionSpace::create(m_coreAuthenticationChallenge.protectionSpace());
+
+ return m_webProtectionSpace.get();
+}
+
} // namespace WebKit
diff --git a/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.h b/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.h
index f8f8ee4..d4e76dd 100644
--- a/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.h
+++ b/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.h
@@ -41,6 +41,7 @@ namespace WebKit {
class AuthenticationDecisionListener;
class WebCredential;
class WebPageProxy;
+class WebProtectionSpace;
class AuthenticationChallengeProxy : public APIObject {
public:
@@ -57,6 +58,9 @@ public:
void cancel();
AuthenticationDecisionListener* listener() const { return m_listener.get(); }
+ WebCredential* proposedCredential() const;
+ WebProtectionSpace* protectionSpace() const;
+ int previousFailureCount() const { return m_coreAuthenticationChallenge.previousFailureCount(); }
private:
AuthenticationChallengeProxy(const WebCore::AuthenticationChallenge&, uint64_t challengeID, WebPageProxy* page);
@@ -67,6 +71,8 @@ private:
uint64_t m_challengeID;
RefPtr<WebPageProxy> m_page;
RefPtr<AuthenticationDecisionListener> m_listener;
+ mutable RefPtr<WebCredential> m_webCredential;
+ mutable RefPtr<WebProtectionSpace> m_webProtectionSpace;
};
} // namespace WebKit
diff --git a/WebKit2/UIProcess/Authentication/WebCredential.cpp b/WebKit2/UIProcess/Authentication/WebCredential.cpp
index 48bf7af..b9a346e 100644
--- a/WebKit2/UIProcess/Authentication/WebCredential.cpp
+++ b/WebKit2/UIProcess/Authentication/WebCredential.cpp
@@ -27,9 +27,19 @@
namespace WebKit {
+WebCredential::WebCredential(const WebCore::Credential& credential)
+ : m_coreCredential(credential)
+{
+}
+
const WebCore::Credential& WebCredential::core()
{
return m_coreCredential;
}
+const String& WebCredential::user() const
+{
+ return m_coreCredential.user();
+}
+
} // namespace WebKit
diff --git a/WebKit2/UIProcess/Authentication/WebCredential.h b/WebKit2/UIProcess/Authentication/WebCredential.h
index c157548..7beac04 100644
--- a/WebKit2/UIProcess/Authentication/WebCredential.h
+++ b/WebKit2/UIProcess/Authentication/WebCredential.h
@@ -27,6 +27,8 @@
#define WebCredential_h
#include "APIObject.h"
+#include "WebString.h"
+
#include <WebCore/Credential.h>
#include <wtf/PassRefPtr.h>
@@ -37,15 +39,22 @@ class WebCredential : public APIObject {
public:
static const Type APIType = TypeCredential;
- static PassRefPtr<WebCredential> create()
+ static PassRefPtr<WebCredential> create(const WebCore::Credential& credential)
{
- return adoptRef(new WebCredential());
+ return adoptRef(new WebCredential(credential));
+ }
+
+ static PassRefPtr<WebCredential> create(WebString* username, WebString* password, WebCore::CredentialPersistence persistence)
+ {
+ return adoptRef(new WebCredential(WebCore::Credential(username->string(), password->string(), persistence)));
}
const WebCore::Credential& core();
+ const String& user() const;
+
private:
- WebCredential();
+ WebCredential(const WebCore::Credential&);
virtual Type type() const { return APIType; }
diff --git a/WebKit2/UIProcess/Authentication/WebProtectionSpace.cpp b/WebKit2/UIProcess/Authentication/WebProtectionSpace.cpp
index 282543a..1671371 100644
--- a/WebKit2/UIProcess/Authentication/WebProtectionSpace.cpp
+++ b/WebKit2/UIProcess/Authentication/WebProtectionSpace.cpp
@@ -25,12 +25,48 @@
#include "WebProtectionSpace.h"
+#include <WebCore/SharedBuffer.h>
+
namespace WebKit {
WebProtectionSpace::WebProtectionSpace(const WebCore::ProtectionSpace& coreProtectionSpace)
: m_coreProtectionSpace(coreProtectionSpace)
{
+}
+
+const String& WebProtectionSpace::host() const
+{
+ return m_coreProtectionSpace.host();
+}
+
+int WebProtectionSpace::port() const
+{
+ return m_coreProtectionSpace.port();
+}
+
+const String& WebProtectionSpace::realm() const
+{
+ return m_coreProtectionSpace.realm();
+}
+bool WebProtectionSpace::isProxy() const
+{
+ return m_coreProtectionSpace.isProxy();
+}
+
+WebCore::ProtectionSpaceServerType WebProtectionSpace::serverType() const
+{
+ return m_coreProtectionSpace.serverType();
+}
+
+bool WebProtectionSpace::receivesCredentialSecurely() const
+{
+ return m_coreProtectionSpace.receivesCredentialSecurely();
+}
+
+WebCore::ProtectionSpaceAuthenticationScheme WebProtectionSpace::authenticationScheme() const
+{
+ return m_coreProtectionSpace.authenticationScheme();
}
} // namespace WebKit
diff --git a/WebKit2/UIProcess/Authentication/WebProtectionSpace.h b/WebKit2/UIProcess/Authentication/WebProtectionSpace.h
index 2337ce1..604236a 100644
--- a/WebKit2/UIProcess/Authentication/WebProtectionSpace.h
+++ b/WebKit2/UIProcess/Authentication/WebProtectionSpace.h
@@ -40,6 +40,15 @@ public:
{
return adoptRef(new WebProtectionSpace(protectionSpace));
}
+
+ const String& protocol() const;
+ const String& host() const;
+ int port() const;
+ const String& realm() const;
+ bool isProxy() const;
+ WebCore::ProtectionSpaceServerType serverType() const;
+ bool receivesCredentialSecurely() const;
+ WebCore::ProtectionSpaceAuthenticationScheme authenticationScheme() const;
private:
WebProtectionSpace(const WebCore::ProtectionSpace&);
diff --git a/WebKit2/UIProcess/WebLoaderClient.cpp b/WebKit2/UIProcess/WebLoaderClient.cpp
index 1cd51a8..0b14a17 100644
--- a/WebKit2/UIProcess/WebLoaderClient.cpp
+++ b/WebKit2/UIProcess/WebLoaderClient.cpp
@@ -152,12 +152,12 @@ bool WebLoaderClient::canAuthenticateAgainstProtectionSpaceInFrame(WebPageProxy*
return m_client.canAuthenticateAgainstProtectionSpaceInFrame(toAPI(page), toAPI(frame), toAPI(protectionSpace), m_client.clientInfo);
}
-void WebLoaderClient::didReceiveAuthenticationChallengeInFrame(WebPageProxy* page, WebFrameProxy* frame, AuthenticationChallengeProxy* authenticationChallenge, AuthenticationDecisionListener* listener)
+void WebLoaderClient::didReceiveAuthenticationChallengeInFrame(WebPageProxy* page, WebFrameProxy* frame, AuthenticationChallengeProxy* authenticationChallenge)
{
if (!m_client.didReceiveAuthenticationChallengeInFrame)
return;
- m_client.didReceiveAuthenticationChallengeInFrame(toAPI(page), toAPI(frame), toAPI(authenticationChallenge), toAPI(listener), m_client.clientInfo);
+ m_client.didReceiveAuthenticationChallengeInFrame(toAPI(page), toAPI(frame), toAPI(authenticationChallenge), m_client.clientInfo);
}
void WebLoaderClient::didStartProgress(WebPageProxy* page)
diff --git a/WebKit2/UIProcess/WebLoaderClient.h b/WebKit2/UIProcess/WebLoaderClient.h
index b736552..0c250fe 100644
--- a/WebKit2/UIProcess/WebLoaderClient.h
+++ b/WebKit2/UIProcess/WebLoaderClient.h
@@ -62,7 +62,7 @@ public:
void didRunInsecureContentForFrame(WebPageProxy*, WebFrameProxy*, APIObject*);
bool canAuthenticateAgainstProtectionSpaceInFrame(WebPageProxy*, WebFrameProxy*, WebProtectionSpace*);
- void didReceiveAuthenticationChallengeInFrame(WebPageProxy*, WebFrameProxy*, AuthenticationChallengeProxy*, AuthenticationDecisionListener*);
+ void didReceiveAuthenticationChallengeInFrame(WebPageProxy*, WebFrameProxy*, AuthenticationChallengeProxy*);
void didStartProgress(WebPageProxy*);
void didChangeProgress(WebPageProxy*);
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index 27fdc4f..5ed3bc8 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -1559,7 +1559,7 @@ void WebPageProxy::didReceiveAuthenticationChallenge(uint64_t frameID, const Web
WebFrameProxy* frame = process()->webFrame(frameID);
RefPtr<AuthenticationChallengeProxy> authenticationChallenge = AuthenticationChallengeProxy::create(coreChallenge, challengeID, this);
- m_loaderClient.didReceiveAuthenticationChallengeInFrame(this, frame, authenticationChallenge.get(), authenticationChallenge->listener());
+ m_loaderClient.didReceiveAuthenticationChallengeInFrame(this, frame, authenticationChallenge.get());
}
void WebPageProxy::exceededDatabaseQuota(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentUsage, uint64_t expectedUsage, uint64_t& newQuota)
diff --git a/WebKit2/WebKit2.pro b/WebKit2/WebKit2.pro
index a2aed08..46fbd68 100644
--- a/WebKit2/WebKit2.pro
+++ b/WebKit2/WebKit2.pro
@@ -275,6 +275,7 @@ HEADERS += \
UIProcess/API/C/WKContext.h \
UIProcess/API/C/WKContextPrivate.h \
UIProcess/API/C/WKCredential.h \
+ UIProcess/API/C/WKCredentialTypes.h \
UIProcess/API/C/WKDownload.h \
UIProcess/API/C/WKFrame.h \
UIProcess/API/C/WKFramePolicyListener.h \
@@ -287,6 +288,7 @@ HEADERS += \
UIProcess/API/C/WKPreferences.h \
UIProcess/API/C/WKPreferencesPrivate.h \
UIProcess/API/C/WKProtectionSpace.h \
+ UIProcess/API/C/WKProtectionSpaceTypes.h \
UIProcess/API/C/WebKit2.h \
UIProcess/API/C/qt/WKNativeEvent.h \
UIProcess/API/cpp/WKRetainPtr.h \
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 7c7ab65..648317e 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -232,6 +232,8 @@
516A4A5D120A2CCD00C05B7F /* WebError.h in Headers */ = {isa = PBXBuildFile; fileRef = 516A4A5B120A2CCD00C05B7F /* WebError.h */; };
51871B5B127CB89D00F76232 /* WebContextMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51871B59127CB89D00F76232 /* WebContextMenu.cpp */; };
51871B5C127CB89D00F76232 /* WebContextMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 51871B5A127CB89D00F76232 /* WebContextMenu.h */; };
+ 518ACAEA12AEE6BB00B04B83 /* WKProtectionSpaceTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 518ACAE912AEE6BB00B04B83 /* WKProtectionSpaceTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 518ACF1112B015F800B04B83 /* WKCredentialTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 518ACF1012B015F800B04B83 /* WKCredentialTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
51A555F5128C6C47009ABCEC /* WKContextMenuItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51A555F3128C6C47009ABCEC /* WKContextMenuItem.cpp */; };
51A555F6128C6C47009ABCEC /* WKContextMenuItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A555F4128C6C47009ABCEC /* WKContextMenuItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
51A55601128C6D92009ABCEC /* WKContextMenuItemTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A55600128C6D92009ABCEC /* WKContextMenuItemTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -863,6 +865,8 @@
516A4A5B120A2CCD00C05B7F /* WebError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebError.h; sourceTree = "<group>"; };
51871B59127CB89D00F76232 /* WebContextMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebContextMenu.cpp; sourceTree = "<group>"; };
51871B5A127CB89D00F76232 /* WebContextMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContextMenu.h; sourceTree = "<group>"; };
+ 518ACAE912AEE6BB00B04B83 /* WKProtectionSpaceTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKProtectionSpaceTypes.h; sourceTree = "<group>"; };
+ 518ACF1012B015F800B04B83 /* WKCredentialTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKCredentialTypes.h; sourceTree = "<group>"; };
51A555F3128C6C47009ABCEC /* WKContextMenuItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKContextMenuItem.cpp; sourceTree = "<group>"; };
51A555F4128C6C47009ABCEC /* WKContextMenuItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuItem.h; sourceTree = "<group>"; };
51A55600128C6D92009ABCEC /* WKContextMenuItemTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuItemTypes.h; sourceTree = "<group>"; };
@@ -1904,6 +1908,7 @@
BCC938E01180DE440085E5FE /* WKContextPrivate.h */,
512F58F112A88A5400629530 /* WKCredential.cpp */,
512F58F212A88A5400629530 /* WKCredential.h */,
+ 518ACF1012B015F800B04B83 /* WKCredentialTypes.h */,
1AB7D78C1288CD9A00CFD08C /* WKDownload.cpp */,
1AB7D78B1288CD9A00CFD08C /* WKDownload.h */,
BCE469571214EDF4000B98EB /* WKFormSubmissionListener.cpp */,
@@ -1929,6 +1934,7 @@
762B7484120BBA2D00819339 /* WKPreferencesPrivate.h */,
512F58F312A88A5400629530 /* WKProtectionSpace.cpp */,
512F58F412A88A5400629530 /* WKProtectionSpace.h */,
+ 518ACAE912AEE6BB00B04B83 /* WKProtectionSpaceTypes.h */,
);
path = C;
sourceTree = "<group>";
@@ -2634,6 +2640,8 @@
512F58FC12A88A5400629530 /* WKProtectionSpace.h in Headers */,
F634445612A885C8000612D8 /* WebSecurityOrigin.h in Headers */,
F634445D12A885E9000612D8 /* WKSecurityOrigin.h in Headers */,
+ 518ACAEA12AEE6BB00B04B83 /* WKProtectionSpaceTypes.h in Headers */,
+ 518ACF1112B015F800B04B83 /* WKCredentialTypes.h in Headers */,
BC2D021712AC41CB00E732A3 /* SameDocumentNavigationType.h in Headers */,
BC2D021912AC426C00E732A3 /* WKPageLoadTypes.h in Headers */,
F6A25FDD12ADC6CC00DC40CC /* WebDatabaseManager.h in Headers */,
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index add5939..f898bc9 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -2125,6 +2125,10 @@
>
</File>
<File
+ RelativePath="..\UIProcess\API\C\WKCredentialTypes.h"
+ >
+ </File>
+ <File
RelativePath="..\UIProcess\API\C\WKDownload.cpp"
>
</File>
@@ -2224,6 +2228,10 @@
RelativePath="..\UIProcess\API\C\WKProtectionSpace.h"
>
</File>
+ <File
+ RelativePath="..\UIProcess\API\C\WKProtectionSpaceTypes.h"
+ >
+ </File>
<Filter
Name="win"
>
diff --git a/WebKit2/win/WebKit2Generated.make b/WebKit2/win/WebKit2Generated.make
index df7c5c1..4e8aca9 100644
--- a/WebKit2/win/WebKit2Generated.make
+++ b/WebKit2/win/WebKit2Generated.make
@@ -40,6 +40,7 @@ all:
xcopy /y /d "..\UIProcess\API\C\WKContext.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\WKContextPrivate.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\WKCredential.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
+ xcopy /y /d "..\UIProcess\API\C\WKCredentialTypes.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\WKDownload.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\WKFormSubmissionListener.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\WKFrame.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
@@ -53,6 +54,7 @@ all:
xcopy /y /d "..\UIProcess\API\C\WKPreferences.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\WKPreferencesPrivate.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\WKProtectionSpace.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
+ xcopy /y /d "..\UIProcess\API\C\WKProtectionSpaceTypes.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\win\WKContextPrivateWin.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\win\WKView.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\win\WKViewPrivate.h" "$(WEBKITOUTPUTDIR)\include\WebKit2"
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list