Changeset 119713 in webkit
- Timestamp:
- Jun 7, 2012 5:59:54 AM (12 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r119679 r119713 314 314 void WebPage::autofillTextField(const string& item) 315 315 { 316 if (!d->m_webSettings->isFormAutofillEnabled()) 317 return; 318 316 319 d->m_autofillManager->autofillTextField(item.c_str()); 317 320 } … … 2158 2161 2159 2162 #if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST) 2160 if ( !m_webSettings->isPrivateBrowsingEnabled())2163 if (m_webSettings->isCredentialAutofillEnabled() && !m_webSettings->isPrivateBrowsingEnabled()) 2161 2164 credentialManager().autofillAuthenticationChallenge(protectionSpace, username, password); 2162 2165 #endif … … 2166 2169 #if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST) 2167 2170 Credential credential(username, password, CredentialPersistencePermanent); 2168 if ( !m_webSettings->isPrivateBrowsingEnabled() && isConfirmed)2171 if (m_webSettings->isCredentialAutofillEnabled() && !m_webSettings->isPrivateBrowsingEnabled() && isConfirmed) 2169 2172 credentialManager().saveCredentialIfConfirmed(this, CredentialTransformData(url, protectionSpace, credential)); 2170 2173 #else … … 5286 5289 { 5287 5290 #if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST) 5288 credentialManager().clearCredentials(); 5291 if (d->m_webSettings->isCredentialAutofillEnabled()) 5292 credentialManager().clearCredentials(); 5289 5293 #endif 5290 5294 } … … 5292 5296 void WebPage::clearAutofillData() 5293 5297 { 5294 AutofillManager::clear(); 5298 if (d->m_webSettings->isFormAutofillEnabled()) 5299 AutofillManager::clear(); 5295 5300 } 5296 5301 … … 5298 5303 { 5299 5304 #if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST) 5300 credentialManager().clearNeverRememberSites(); 5305 if (d->m_webSettings->isCredentialAutofillEnabled()) 5306 credentialManager().clearNeverRememberSites(); 5301 5307 #endif 5302 5308 } -
trunk/Source/WebKit/blackberry/Api/WebSettings.cpp
r119566 r119713 56 56 DEFINE_STATIC_LOCAL(String, BlackBerryZoomToFitOnLoadEnabled, ("BlackBerryZoomToFitOnLoadEnabled")); 57 57 DEFINE_STATIC_LOCAL(String, BlackBerryFullScreenVideoCapable, ("BlackBerryFullScreenVideoCapable")); 58 DEFINE_STATIC_LOCAL(String, BlackBerryCredentialAutofillEnabled, ("BlackBerryCredentialAutofillEnabled")); 59 DEFINE_STATIC_LOCAL(String, BlackBerryFormAutofillEnabled, ("BlackBerryFormAutofillEnabled")); 58 60 DEFINE_STATIC_LOCAL(String, SpatialNavigationEnabled, ("SpatialNavigationEnabled")); 59 61 DEFINE_STATIC_LOCAL(String, WebKitDatabasePath, ("WebKitDatabasePath")); … … 166 168 settings->m_private->setBoolean(BlackBerryZoomToFitOnLoadEnabled, true); 167 169 settings->m_private->setBoolean(BlackBerryFullScreenVideoCapable, false); 170 settings->m_private->setBoolean(BlackBerryCredentialAutofillEnabled, false); 171 settings->m_private->setBoolean(BlackBerryFormAutofillEnabled, false); 168 172 169 173 settings->m_private->setInteger(WebKitDefaultFontSize, 16); … … 773 777 } 774 778 779 bool WebSettings::isCredentialAutofillEnabled() const 780 { 781 return m_private->getBoolean(BlackBerryCredentialAutofillEnabled); 782 } 783 784 void WebSettings::setCredentialAutofillEnabled(bool enable) 785 { 786 return m_private->setBoolean(BlackBerryCredentialAutofillEnabled, enable); 787 } 788 789 bool WebSettings::isFormAutofillEnabled() const 790 { 791 return m_private->getBoolean(BlackBerryFormAutofillEnabled); 792 } 793 794 void WebSettings::setFormAutofillEnabled(bool enable) 795 { 796 return m_private->setBoolean(BlackBerryFormAutofillEnabled, enable); 797 } 798 775 799 } // namespace WebKit 776 800 } // namespace BlackBerry -
trunk/Source/WebKit/blackberry/Api/WebSettings.h
r119566 r119713 227 227 void setFullScreenVideoCapable(bool); 228 228 229 bool isCredentialAutofillEnabled() const; 230 void setCredentialAutofillEnabled(bool); 231 232 bool isFormAutofillEnabled() const; 233 void setFormAutofillEnabled(bool); 234 229 235 private: 230 236 WebSettingsPrivate* m_private; -
trunk/Source/WebKit/blackberry/ChangeLog
r119681 r119713 1 2012-06-07 Jonathan Dong <jonathan.dong@torchmobile.com.cn> 2 3 [BlackBerry] Add enable credential autofill and enable form autofill feature control in WebSetting 4 https://bugs.webkit.org/show_bug.cgi?id=88513 5 6 Reviewed by Rob Buis. 7 8 RIM PR: #163391 9 Implemented credential autofill setting and form autofill setting. 10 11 Internally reviewed by Leo Yang <leo.yang@torchmobile.com.cn>. 12 13 * Api/WebPage.cpp: 14 (BlackBerry::WebKit::WebPage::autofillTextField): 15 (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge): 16 (BlackBerry::WebKit::WebPage::clearCredentials): 17 (BlackBerry::WebKit::WebPage::clearAutofillData): 18 (BlackBerry::WebKit::WebPage::clearNeverRememberSites): 19 * Api/WebSettings.cpp: 20 (WebKit): 21 (BlackBerry::WebKit::WebSettings::standardSettings): 22 (BlackBerry::WebKit::WebSettings::isCredentialAutofillEnabled): 23 (BlackBerry::WebKit::WebSettings::setCredentialAutofillEnabled): 24 (BlackBerry::WebKit::WebSettings::isFormAutofillEnabled): 25 (BlackBerry::WebKit::WebSettings::setFormAutofillEnabled): 26 * Api/WebSettings.h: 27 * WebCoreSupport/EditorClientBlackBerry.cpp: 28 (WebCore::EditorClientBlackBerry::textFieldDidEndEditing): 29 (WebCore::EditorClientBlackBerry::textDidChangeInTextField): 30 * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: 31 (WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad): 32 (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm): 33 (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent): 34 1 35 2012-06-06 Antonio Gomes <agomes@rim.com> 2 36 -
trunk/Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
r119239 r119713 510 510 void EditorClientBlackBerry::textFieldDidEndEditing(Element* element) 511 511 { 512 if (HTMLInputElement* inputElement = element->toInputElement()) 513 m_webPagePrivate->m_autofillManager->textFieldDidEndEditing(inputElement); 512 if (m_webPagePrivate->m_webSettings->isFormAutofillEnabled()) { 513 if (HTMLInputElement* inputElement = element->toInputElement()) 514 m_webPagePrivate->m_autofillManager->textFieldDidEndEditing(inputElement); 515 } 514 516 } 515 517 516 518 void EditorClientBlackBerry::textDidChangeInTextField(Element* element) 517 519 { 518 if (HTMLInputElement* inputElement = element->toInputElement()) 519 m_webPagePrivate->m_autofillManager->didChangeInTextField(inputElement); 520 if (m_webPagePrivate->m_webSettings->isFormAutofillEnabled()) { 521 if (HTMLInputElement* inputElement = element->toInputElement()) 522 m_webPagePrivate->m_autofillManager->didChangeInTextField(inputElement); 523 } 520 524 } 521 525 -
trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
r118109 r119713 609 609 610 610 #if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST) 611 if (!m_webPagePrivate->m_webSettings->isPrivateBrowsingEnabled()) 611 if (m_webPagePrivate->m_webSettings->isCredentialAutofillEnabled() 612 && !m_webPagePrivate->m_webSettings->isPrivateBrowsingEnabled()) 612 613 credentialManager().autofillPasswordForms(m_frame->document()->forms()); 613 614 #endif … … 707 708 { 708 709 if (!m_webPagePrivate->m_webSettings->isPrivateBrowsingEnabled()) { 709 m_webPagePrivate->m_autofillManager->saveTextFields(formState->form()); 710 if (m_webPagePrivate->m_webSettings->isFormAutofillEnabled()) 711 m_webPagePrivate->m_autofillManager->saveTextFields(formState->form()); 710 712 #if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST) 711 credentialManager().saveCredentialIfConfirmed(m_webPagePrivate, CredentialTransformData(formState->form())); 713 if (m_webPagePrivate->m_webSettings->isCredentialAutofillEnabled()) 714 credentialManager().saveCredentialIfConfirmed(m_webPagePrivate, CredentialTransformData(formState->form())); 712 715 #endif 713 716 } … … 720 723 { 721 724 if (!m_webPagePrivate->m_webSettings->isPrivateBrowsingEnabled()) { 722 m_webPagePrivate->m_autofillManager->saveTextFields(prpFormState->form()); 725 if (m_webPagePrivate->m_webSettings->isFormAutofillEnabled()) 726 m_webPagePrivate->m_autofillManager->saveTextFields(prpFormState->form()); 723 727 #if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST) 724 credentialManager().saveCredentialIfConfirmed(m_webPagePrivate, CredentialTransformData(prpFormState->form())); 728 if (m_webPagePrivate->m_webSettings->isCredentialAutofillEnabled()) 729 credentialManager().saveCredentialIfConfirmed(m_webPagePrivate, CredentialTransformData(prpFormState->form())); 725 730 #endif 726 731 }
Note: See TracChangeset
for help on using the changeset viewer.