[BlackBerry] Credential save and autofill implemetation
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Mar 2012 15:23:33 +0000 (15:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Mar 2012 15:23:33 +0000 (15:23 +0000)
commit2dca2f5fc2c7a99b45137f7fbd0a59e56106bc11
treebdfafbf2c906167bfc6aeec75027ea147996e1be
parente5dcd273feef050bb6784e8229df03085530240c
[BlackBerry] Credential save and autofill implemetation
https://bugs.webkit.org/show_bug.cgi?id=80401

Patch by Jonathan Dong <jonathan.dong@torchmobile.com.cn> on 2012-03-21
Reviewed by Rob Buis.

Source/WebCore:

Added interface function authenticationChallenge() and
notifyShouldSaveCredential() into PageClientBlackBerry.
As this class is our platform specific interface,
by doing this we don't need to add an interface function
in class FrameLoaderClient which is a platform
independent interface.

No new tests.

* platform/blackberry/PageClientBlackBerry.h:
(WebCore):
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::sendRequestWithCredentials):

Source/WebKit/blackberry:

This patch is intended to implement the credential persist
and autofill feature for BlackBerry porting.

Moved interface authenticationChallenge() from class
FrameLoaderClientBlackBerry to WebPagePrivate (derived from
PageClientBlackBerry as changes made in its parent interface class);
Implemented notifyShouldSaveCredential() in WebPagePrivate
and WebPageClient as well.
Added credentialManager() to retrive CredentialManager instance
as a global singleton; removed its m_frameLoaderClient which is
replaced with a passed in PageClientBlackBerry pointer, and modified
the interface function accordingly.

For the http authentication, autofill the input dialog in
function authenticationChallenge() and save the credential
information in the same function;
For the in-form authentication, autofill the username and
password input fields in function dispatchDidFinishLoad(),
and save the credential information in function
dispatchWillSubmitForm() or dispatchWillSendSubmitEvent().

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::notifyShouldSaveCredential):
* Api/WebPageClient.h:
* Api/WebPage_p.h:
(WebPagePrivate):
* WebCoreSupport/CredentialManager.cpp:
(WebCore::credentialManager):
(WebCore::CredentialManager::saveCredentialIfConfirmed):
* WebCoreSupport/CredentialManager.h:
(CredentialManager):
(WebCore::CredentialManager::CredentialManager):
(WebCore):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
(WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
(WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent):
(WebCore):
* WebCoreSupport/FrameLoaderClientBlackBerry.h:
(FrameLoaderClientBlackBerry):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/blackberry/PageClientBlackBerry.h
Source/WebCore/platform/network/blackberry/NetworkJob.cpp
Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/Api/WebPageClient.h
Source/WebKit/blackberry/Api/WebPage_p.h
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/CredentialManager.cpp
Source/WebKit/blackberry/WebCoreSupport/CredentialManager.h
Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.h