From: rahul.dutt Date: Fri, 24 May 2013 04:28:16 +0000 (+0530) Subject: Fixed Nabi issues N_SE-39262, N_SE-39349, N_SE-38797 X-Git-Tag: submit/tizen_2.2/20130714.134441~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10d13bdcd0cc0dfdecaa450d302319f475db034f;p=apps%2Fosp%2FInternet.git Fixed Nabi issues N_SE-39262, N_SE-39349, N_SE-38797 Change-Id: I8276ddb60fde90a59b9d0d96563174c7148ad203 --- diff --git a/inc/IntSettingForm.h b/inc/IntSettingForm.h index 6d3f745..5292679 100644 --- a/inc/IntSettingForm.h +++ b/inc/IntSettingForm.h @@ -113,7 +113,9 @@ public: SETTING_SHOW_SECURITY_WARNINGS, //13 SETTING_ACCEPT_COOKIES, //14 SETTING_CLEAR_COOKIE_DATA, //15 + SETTING_REMEMBER_FORM_DATA, SETTING_CLEAR_FORM_DATA, //16 + SETTING_REMEMBER_PASSWORD, SETTING_CLEAR_PASSWORDS, //17 SETTING_SEARCH_ENGINE_TITLE, //20 SETTING_SEARCH_ENGINE_YAHOO, //21 diff --git a/src/IntHistoryPresentationModel.cpp b/src/IntHistoryPresentationModel.cpp index eb2c369..893f9ba 100644 --- a/src/IntHistoryPresentationModel.cpp +++ b/src/IntHistoryPresentationModel.cpp @@ -334,6 +334,9 @@ void HistoryPresentationModel::UpdateHistoryFavIcon(History& history, Tizen::Gra pImage->Construct(); Tizen::Base::ByteBuffer* pFavBuffer = pImage->EncodeToBufferN(favIconImage, IMG_FORMAT_PNG); + // added because conversion may fail + if(GetLastResult() != E_SUCCESS) + return; history.SetFavIconBitmap(favIconImage); delete pImage; diff --git a/src/IntMainForm.cpp b/src/IntMainForm.cpp index fba060f..8412589 100644 --- a/src/IntMainForm.cpp +++ b/src/IntMainForm.cpp @@ -2819,7 +2819,12 @@ void MainForm::OnFaviconReceived(const Tizen::Graphics::Bitmap& favicon) AppLog("MainForm::OnFaviconReceived"); if (__pWebViewer != null && __pHistory != null && __pWindowInfo != null && (__pWindowInfo->pageUrl.CompareTo(__pHistory->GetHistoryUrl()) == 0)) { - HistoryPresentationModel::GetInstance()->UpdateHistoryFavIcon(*__pHistory, *(__pWebViewer->GetFaviconN())); + Bitmap* favIcon = __pWebViewer->GetFaviconN(); + if(favIcon != null) + { + HistoryPresentationModel::GetInstance()->UpdateHistoryFavIcon(*__pHistory, *favIcon); + delete favIcon; + } } } @@ -4090,7 +4095,22 @@ MainForm::OnSettingsChange(int settingvalue) __pWebViewer->SetCookieEnabled(SettingPresentationModel::GetInstance()->IsCookiesEnabled()); } } - + else if(settingvalue == (int) REGISTRY_SETTING_REMEMBER_FORM_DATA) + { + if (__pWebViewer) + { + WebSetting settings = __pWebViewer->GetSetting(); + settings.SetAutoFormDataShowEnabled(SettingPresentationModel::GetInstance()->IsRememberFormData()); + } + } + else if(settingvalue == (int) REGISTRY_SETTING_REMEMBER_PASSWORD) + { + if (__pWebViewer) + { + WebSetting settings = __pWebViewer->GetSetting(); + settings.SetAutoFormDataShowEnabled(SettingPresentationModel::GetInstance()->IsRememberPassword()); + } + } else if (settingvalue == (int) REGISTRY_SETTING_SHOW_SECURITY_WARNINGS) { WebSetting settings = __pWebViewer->GetSetting(); diff --git a/src/IntSettingForm.cpp b/src/IntSettingForm.cpp index 4418985..f99963a 100644 --- a/src/IntSettingForm.cpp +++ b/src/IntSettingForm.cpp @@ -192,10 +192,21 @@ SettingForm::InitializeSettingValues(void) settingInfo[SETTING_CLEAR_COOKIE_DATA].subText = CommonUtil::GetString(L"IDS_BR_HEADER_COOKIES"); settingInfo[SETTING_CLEAR_COOKIE_DATA].itemType = ITEM_TYPE_NORMAL; + settingInfo[SETTING_REMEMBER_FORM_DATA].titleText = CommonUtil::GetString(L"IDS_BR_BODY_REMEMBER_FORM_DATA"); + settingInfo[SETTING_REMEMBER_FORM_DATA].subText = L""; + settingInfo[SETTING_REMEMBER_FORM_DATA].itemType = ITEM_TYPE_TOGGLE; + settingInfo[SETTING_REMEMBER_FORM_DATA].isSelected = SettingPresentationModel::GetInstance()->IsRememberFormData(); + settingInfo[SETTING_CLEAR_FORM_DATA].titleText = CommonUtil::GetString(L"IDS_BR_BODY_CLEAR_FORM_DATA"); settingInfo[SETTING_CLEAR_FORM_DATA].subText = CommonUtil::GetString(L"IDS_BR_HEADER_FORM_DATA"); settingInfo[SETTING_CLEAR_FORM_DATA].itemType = ITEM_TYPE_NORMAL; + settingInfo[SETTING_REMEMBER_PASSWORD].titleText = CommonUtil::GetString(L"IDS_BR_BODY_REMEMBER_PASSWORDS"); + settingInfo[SETTING_REMEMBER_PASSWORD].subText = L""; + settingInfo[SETTING_REMEMBER_PASSWORD].itemType = ITEM_TYPE_TOGGLE; + settingInfo[SETTING_REMEMBER_PASSWORD].isSelected = SettingPresentationModel::GetInstance()->IsRememberPassword(); + + settingInfo[SETTING_CLEAR_PASSWORDS].titleText = CommonUtil::GetString(L"IDS_BR_BODY_CLEAR_PASSWORDS"); settingInfo[SETTING_CLEAR_PASSWORDS].subText = L""; settingInfo[SETTING_CLEAR_PASSWORDS].itemType = ITEM_TYPE_NORMAL; @@ -437,6 +448,10 @@ SettingForm::OnGroupedListViewItemStateChanged(GroupedListView& listView, int gr ClearCookie(); break; + case SETTING_REMEMBER_FORM_DATA: + SettingPresentationModel::GetInstance()->SetRememberFormData(settingInfo[SETTING_REMEMBER_FORM_DATA].isSelected); + break; + case SETTING_CLEAR_FORM_DATA: ClearFormData(); break; @@ -445,6 +460,10 @@ SettingForm::OnGroupedListViewItemStateChanged(GroupedListView& listView, int gr ClearPasswords(); break; + case SETTING_REMEMBER_PASSWORD: + SettingPresentationModel::GetInstance()->SetRememberPassword(settingInfo[SETTING_REMEMBER_PASSWORD].isSelected); + break; + case SETTING_SEARCH_ENGINE_YAHOO: SettingPresentationModel::GetInstance()->SetSearchEngine(settingInfo[SETTING_SEARCH_ENGINE_YAHOO].titleText); listView.UpdateList(); diff --git a/src/IntSettingPresentationModel.cpp b/src/IntSettingPresentationModel.cpp index 7013c7a..6f90f8b 100644 --- a/src/IntSettingPresentationModel.cpp +++ b/src/IntSettingPresentationModel.cpp @@ -66,8 +66,8 @@ SettingPresentationModel::SetDefaultValues(void) __html5Videos = true; __wordWrap = true; __blockPopUp = true; - __rememberFormData = false; - __rememberPassword = false; + __rememberFormData = true; + __rememberPassword = true; __cookies = true; __savePassword = CommonUtil::GetString(L"IDS_BR_BODY_ALWAYS_ASK"); // IDS_ALWAYS_ASK __securityWarnings = true; @@ -80,6 +80,8 @@ SettingPresentationModel::SetDefaultValues(void) __setting.SetAutoImageLoadEnabled(__displayImages); __setting.SetJavascriptEnabled(__runJsEnabled); __setting.SetJavaScriptPopupEnabled(__blockPopUp); + __setting.SetAutoFormDataShowEnabled(__rememberFormData); + __setting.SetAutoLoginFormFillEnabled(__rememberPassword); if (__securityWarnings == true) { @@ -227,6 +229,8 @@ SettingPresentationModel::LoadRegistry(void) __setting.SetAutoImageLoadEnabled(__displayImages); __setting.SetJavascriptEnabled(__runJsEnabled); __setting.SetJavaScriptPopupEnabled(__blockPopUp); + __setting.SetAutoFormDataShowEnabled(__rememberFormData); + __setting.SetAutoLoginFormFillEnabled(__rememberPassword); if (__securityWarnings == true) { @@ -556,6 +560,7 @@ SettingPresentationModel::SetRememberFormData(bool formData) { __rememberFormData = formData; SetValue((int) REGISTRY_SETTING_REMEMBER_FORM_DATA, Boolean::ToString(__rememberFormData)); + __setting.SetAutoFormDataShowEnabled(__rememberFormData); } bool @@ -568,6 +573,7 @@ void SettingPresentationModel::SetRememberPassword(bool rememberPassword) { __rememberPassword = rememberPassword; SetValue((int) REGISTRY_SETTING_REMEMBER_PASSWORD, Boolean::ToString(__rememberPassword)); + __setting.SetAutoLoginFormFillEnabled(__rememberPassword); } bool SettingPresentationModel::IsRememberPassword(void)