Changeset 111810 in webkit
- Timestamp:
- Mar 22, 2012 7:24:00 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r111809 r111810 1 2012-03-22 Jonathan Dong <jonathan.dong@torchmobile.com.cn> 2 3 [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail 4 https://bugs.webkit.org/show_bug.cgi?id=80135 5 6 Reviewed by Rob Buis. 7 8 Modified the interface function authenticationChallenge() in class 9 PageClientBlackBerry, moved Credential from return value to the 10 function's reference parameter, and returned a bool to indicate if 11 user pressed Ok button or not. 12 Removed the logic which checks m_currentWebChallenge not null, 13 because we should challenge user again if the last provided credential 14 is not valid; also added the logic that will popup challenge 15 dialog again immediately if user press Ok buttton directly without 16 inputting anything. 17 18 No new tests. 19 20 * platform/blackberry/PageClientBlackBerry.h: 21 * platform/network/blackberry/NetworkJob.cpp: 22 (WebCore::NetworkJob::handleAuthHeader): 23 (WebCore::NetworkJob::sendRequestWithCredentials): 24 1 25 2012-03-22 Jason Liu <jason.liu@torchmobile.com.cn> 2 26 -
trunk/Source/WebCore/platform/blackberry/PageClientBlackBerry.h
r111546 r111810 70 70 virtual int showAlertDialog(BlackBerry::WebKit::WebPageClient::AlertType) = 0; 71 71 virtual bool isActive() const = 0; 72 virtual WebCore::Credential authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&) = 0;72 virtual bool authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&, WebCore::Credential&) = 0; 73 73 virtual SaveCredentialType notifyShouldSaveCredential(bool) = 0; 74 74 }; -
trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp
r111809 r111810 750 750 return false; 751 751 752 if (!m_handle->getInternal()->m_currentWebChallenge.isNull())753 return false;754 755 752 if (header.isEmpty()) 756 753 return false; … … 874 871 m_handle->getInternal()->m_pass = ""; 875 872 } else { 876 Credential inputCredential = m_frame->page()->chrome()->client()->platformPageClient()->authenticationChallenge(newURL, protectionSpace); 877 username = inputCredential.user(); 878 password = inputCredential.password(); 879 } 880 881 if (username.isEmpty() && password.isEmpty()) 882 return false; 873 Credential inputCredential; 874 bool isConfirmed = false; 875 do { 876 isConfirmed = m_frame->page()->chrome()->client()->platformPageClient()->authenticationChallenge(newURL, protectionSpace, inputCredential); 877 username = inputCredential.user(); 878 password = inputCredential.password(); 879 } while (isConfirmed && username.isEmpty() && password.isEmpty()); 880 } 883 881 884 882 credential = Credential(username, password, CredentialPersistenceForSession); -
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r111774 r111810 2020 2020 } 2021 2021 2022 Credential WebPagePrivate::authenticationChallenge(const KURL& url, const ProtectionSpace& protectionSpace)2022 bool WebPagePrivate::authenticationChallenge(const KURL& url, const ProtectionSpace& protectionSpace, Credential& inputCredential) 2023 2023 { 2024 2024 WebString username; … … 2030 2030 #endif 2031 2031 2032 m_client->authenticationChallenge(protectionSpace.realm().characters(), protectionSpace.realm().length(), username, password);2032 bool isConfirmed = m_client->authenticationChallenge(protectionSpace.realm().characters(), protectionSpace.realm().length(), username, password); 2033 2033 2034 2034 #if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST) 2035 Credential inputCredential(username, password, CredentialPersistencePermanent);2035 Credential credential(username, password, CredentialPersistencePermanent); 2036 2036 if (!m_webSettings->isPrivateBrowsingEnabled()) 2037 2037 credentialManager().saveCredentialIfConfirmed(this, CredentialTransformData(url, protectionSpace, inputCredential)); 2038 2038 #else 2039 Credential inputCredential(username, password, CredentialPersistenceNone); 2040 #endif 2041 return inputCredential; 2039 Credential credential(username, password, CredentialPersistenceNone); 2040 #endif 2041 inputCredential = credential; 2042 return isConfirmed; 2042 2043 } 2043 2044 -
trunk/Source/WebKit/blackberry/Api/WebPageClient.h
r111546 r111810 212 212 213 213 virtual void setPreventsScreenIdleDimming(bool noDimming) = 0; 214 virtual voidauthenticationChallenge(const unsigned short* realm, unsigned int realmLength, WebString& username, WebString& password) = 0;214 virtual bool authenticationChallenge(const unsigned short* realm, unsigned int realmLength, WebString& username, WebString& password) = 0; 215 215 virtual SaveCredentialType notifyShouldSaveCredential(bool isNew) = 0; 216 216 -
trunk/Source/WebKit/blackberry/Api/WebPage_p.h
r111546 r111810 177 177 virtual int showAlertDialog(WebPageClient::AlertType atype); 178 178 virtual bool isActive() const; 179 virtual WebCore::Credential authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&);179 virtual bool authenticationChallenge(const WebCore::KURL&, const WebCore::ProtectionSpace&, WebCore::Credential&); 180 180 virtual SaveCredentialType notifyShouldSaveCredential(bool); 181 181 -
trunk/Source/WebKit/blackberry/ChangeLog
r111774 r111810 1 2012-03-22 Jonathan Dong <jonathan.dong@torchmobile.com.cn> 2 3 [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail 4 https://bugs.webkit.org/show_bug.cgi?id=80135 5 6 Reviewed by Rob Buis. 7 8 Modified the interface function authenticationChallenge() in 9 class WebPagePrivate by returning a bool to indicate if user 10 pressed Ok button or not, and moved the Credential from return 11 value to the reference parameter. 12 Also updated the corresponding interface functions in class 13 WebPageClient. 14 15 * Api/WebPage.cpp: 16 (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge): 17 * Api/WebPageClient.h: 18 * Api/WebPage_p.h: 19 (WebPagePrivate): 20 1 21 2012-03-22 Mike Lattanzio <mlattanzio@rim.com> 2 22
Note: See TracChangeset
for help on using the changeset viewer.