From 53b460534686df8611b761fd6159ccbd151ec677 Mon Sep 17 00:00:00 2001 From: JongHeon Choi Date: Fri, 30 Sep 2016 13:08:24 +0900 Subject: [PATCH 01/16] Resume web app not reset for main operation. --- runtime/browser/web_application.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 89483e1..3f4f5de 100644 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -127,6 +127,7 @@ const char* kDBPrivateSection = "private"; const char* kDefaultCSPRule = "default-src *; script-src 'self'; style-src 'self'; object-src 'none';"; const char* kResWgtPath = "res/wgt/"; +const char* kAppControlMain = "http://tizen.org/appcontrol/operation/main"; bool FindPrivilege(common::ApplicationData* app_data, const std::string& privilege) { @@ -456,6 +457,15 @@ void WebApplication::AppControl( } } + // handle http://tizen.org/appcontrol/operation/main operation specially. + // only menu-screen app can send launch request with main operation. + // in this case, web app should have to resume web app not reset. + if (do_reset && (appcontrol->operation() == kAppControlMain)){ + LOGGER(DEBUG) << "resume app for main operation"; + do_reset = false; + SendAppControlEvent(); + } + if (do_reset) { // Reset to context ClearViewStack(); -- 2.7.4 From 88fa5ce0dcb6f3e8ef8343f2ea4ac0cf5ace13d9 Mon Sep 17 00:00:00 2001 From: Cho Woong Suk Date: Thu, 28 Jul 2016 20:11:46 +0900 Subject: [PATCH 02/16] use RTLD_NOW option in the loader for launching time performance Change-Id: Ie6b322160007e3f798fa1a8ab23c7564f6adf539 --- loader/wrt_loader.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loader/wrt_loader.cc b/loader/wrt_loader.cc index 6696498..4ccdb49 100644 --- a/loader/wrt_loader.cc +++ b/loader/wrt_loader.cc @@ -19,7 +19,7 @@ // loader file must have "User" execute label, because launchpad daemon runs // with "System::Privileged" label. int main(int argc, char* argv[]) { - void* handle = dlopen("/usr/bin/xwalk_runtime", RTLD_LAZY); + void* handle = dlopen("/usr/bin/xwalk_runtime", RTLD_NOW); if (!handle) { dlog_print(DLOG_DEBUG, "XWALK", "Error loading xwalk_runtime"); return false; -- 2.7.4 From 6b792ecf0e577960336fb5ab4ae08a681307103a Mon Sep 17 00:00:00 2001 From: JongHeon Choi Date: Fri, 30 Sep 2016 16:27:30 +0900 Subject: [PATCH 03/16] Rotate window for landscape mode mobile only --- runtime/browser/web_application.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 3f4f5de..f7b9213 100644 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -408,6 +408,7 @@ void WebApplication::Launch(std::unique_ptr appcontrol) { window_->SetContent(view->evas_object()); +#ifdef PROFILE_MOBILE // rotate and resize window forcibily for landscape mode. // window rotate event is generated after window show. so // when app get width and height from viewport, wrong value can be returned. @@ -417,6 +418,7 @@ void WebApplication::Launch(std::unique_ptr appcontrol) { elm_win_rotation_with_resize_set(window_->evas_object(), 270); evas_norender(evas_object_evas_get(window_->evas_object())); } +#endif // PROFILE_MOBILE view->LoadUrl(res->uri(), res->mime()); view_stack_.push_front(view); -- 2.7.4 From cf6bf72af8e2b979d0c7ffd32e0fc2fa08e1157f Mon Sep 17 00:00:00 2001 From: JongHeon Choi Date: Mon, 10 Oct 2016 16:12:46 +0900 Subject: [PATCH 04/16] Change the chromium header from ewk_chromium.h to EWebKit.h/Ewebkit_internal.h --- extensions/common/xwalk_extension_server.h | 3 ++- extensions/renderer/runtime_ipc_client.h | 3 ++- extensions/renderer/xwalk_extension_renderer_controller.h | 3 ++- runtime/browser/ime_runtime.cc | 1 - runtime/browser/native_window.cc | 3 ++- runtime/browser/preload_manager.cc | 3 ++- runtime/browser/runtime_process.cc | 3 ++- runtime/browser/ui_runtime.cc | 1 - runtime/browser/watch_runtime.cc | 1 - runtime/browser/web_application.cc | 1 - runtime/browser/web_view.cc | 1 - runtime/browser/web_view.h | 3 ++- runtime/browser/web_view_impl.cc | 1 - runtime/browser/web_view_impl.h | 3 ++- runtime/renderer/injected_bundle.cc | 3 ++- 15 files changed, 18 insertions(+), 15 deletions(-) diff --git a/extensions/common/xwalk_extension_server.h b/extensions/common/xwalk_extension_server.h index cfcb112..3cd67bf 100755 --- a/extensions/common/xwalk_extension_server.h +++ b/extensions/common/xwalk_extension_server.h @@ -5,7 +5,8 @@ #ifndef XWALK_EXTENSIONS_XWALK_EXTENSION_SERVER_H_ #define XWALK_EXTENSIONS_XWALK_EXTENSION_SERVER_H_ -#include +#include +#include #include #include diff --git a/extensions/renderer/runtime_ipc_client.h b/extensions/renderer/runtime_ipc_client.h index 21e1d39..7f94fb3 100755 --- a/extensions/renderer/runtime_ipc_client.h +++ b/extensions/renderer/runtime_ipc_client.h @@ -18,7 +18,8 @@ #define XWALK_EXTENSIONS_RENDERER_RUNTIME_IPC_CLIENT_H_ #include -#include +#include +#include #include #include diff --git a/extensions/renderer/xwalk_extension_renderer_controller.h b/extensions/renderer/xwalk_extension_renderer_controller.h index 62db3cd..4927d21 100755 --- a/extensions/renderer/xwalk_extension_renderer_controller.h +++ b/extensions/renderer/xwalk_extension_renderer_controller.h @@ -6,7 +6,8 @@ #ifndef XWALK_EXTENSIONS_RENDERER_XWALK_EXTENSION_RENDERER_CONTROLLER_H_ #define XWALK_EXTENSIONS_RENDERER_XWALK_EXTENSION_RENDERER_CONTROLLER_H_ -#include +#include +#include #include #include diff --git a/runtime/browser/ime_runtime.cc b/runtime/browser/ime_runtime.cc index 8254687..9cdc3db 100644 --- a/runtime/browser/ime_runtime.cc +++ b/runtime/browser/ime_runtime.cc @@ -14,7 +14,6 @@ * limitations under the License. */ -#include #include #include diff --git a/runtime/browser/native_window.cc b/runtime/browser/native_window.cc index 8709672..df1b248 100755 --- a/runtime/browser/native_window.cc +++ b/runtime/browser/native_window.cc @@ -17,7 +17,8 @@ #include "runtime/browser/native_window.h" #include -#include +#include +#include #include #include "common/arraysize.h" diff --git a/runtime/browser/preload_manager.cc b/runtime/browser/preload_manager.cc index 810c232..53317ae 100755 --- a/runtime/browser/preload_manager.cc +++ b/runtime/browser/preload_manager.cc @@ -17,7 +17,8 @@ #include "runtime/browser/preload_manager.h" #include -#include +#include +#include #include #include "common/logger.h" diff --git a/runtime/browser/runtime_process.cc b/runtime/browser/runtime_process.cc index ffdc102..4d5cb50 100755 --- a/runtime/browser/runtime_process.cc +++ b/runtime/browser/runtime_process.cc @@ -14,7 +14,8 @@ * limitations under the License. */ -#include +#include +#include #include diff --git a/runtime/browser/ui_runtime.cc b/runtime/browser/ui_runtime.cc index 9cb507d..20dddc6 100755 --- a/runtime/browser/ui_runtime.cc +++ b/runtime/browser/ui_runtime.cc @@ -16,7 +16,6 @@ #include "runtime/browser/runtime.h" -#include #include #include diff --git a/runtime/browser/watch_runtime.cc b/runtime/browser/watch_runtime.cc index 38cee59..afc3dbd 100644 --- a/runtime/browser/watch_runtime.cc +++ b/runtime/browser/watch_runtime.cc @@ -14,7 +14,6 @@ * limitations under the License. */ -#include #include #include diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 3f4f5de..4da9549 100644 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/runtime/browser/web_view.cc b/runtime/browser/web_view.cc index a8add92..1d898a1 100644 --- a/runtime/browser/web_view.cc +++ b/runtime/browser/web_view.cc @@ -16,7 +16,6 @@ #include "runtime/browser/web_view.h" -#include #include #include diff --git a/runtime/browser/web_view.h b/runtime/browser/web_view.h index bb19e54..be1bcc6 100644 --- a/runtime/browser/web_view.h +++ b/runtime/browser/web_view.h @@ -18,7 +18,8 @@ #define XWALK_RUNTIME_BROWSER_WEB_VIEW_H_ #include -#include +#include +#include #include #include diff --git a/runtime/browser/web_view_impl.cc b/runtime/browser/web_view_impl.cc index 7683c30..cb40b84 100644 --- a/runtime/browser/web_view_impl.cc +++ b/runtime/browser/web_view_impl.cc @@ -17,7 +17,6 @@ #include "runtime/browser/web_view_impl.h" -#include #include #include diff --git a/runtime/browser/web_view_impl.h b/runtime/browser/web_view_impl.h index f5c5f6d..73c70c1 100644 --- a/runtime/browser/web_view_impl.h +++ b/runtime/browser/web_view_impl.h @@ -19,7 +19,8 @@ #include #include -#include +#include +#include #include #include diff --git a/runtime/renderer/injected_bundle.cc b/runtime/renderer/injected_bundle.cc index eb7538d..f0243e2 100755 --- a/runtime/renderer/injected_bundle.cc +++ b/runtime/renderer/injected_bundle.cc @@ -15,7 +15,8 @@ */ #include -#include +#include +#include #include #include #include -- 2.7.4 From 00de802bac45a404af5a5107f40d6e3064df3684 Mon Sep 17 00:00:00 2001 From: JongHeon Choi Date: Thu, 13 Oct 2016 11:04:22 +0900 Subject: [PATCH 05/16] Add ewk_setting_form api for display the options of the data list --- runtime/browser/web_view_impl.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/browser/web_view_impl.cc b/runtime/browser/web_view_impl.cc index cb40b84..7a79f99 100644 --- a/runtime/browser/web_view_impl.cc +++ b/runtime/browser/web_view_impl.cc @@ -219,6 +219,7 @@ void WebViewImpl::Initialize() { Ewk_Settings* settings = ewk_view_settings_get(ewk_view_); ewk_settings_scripts_can_open_windows_set(settings, EINA_TRUE); + ewk_settings_form_candidate_data_enabled_set(settings, EINA_TRUE); ewk_settings_default_text_encoding_name_set(settings, kDefaultEncoding); // TODO(sngn.lee): "protocolhandler,registration,requested" -- 2.7.4 From ae194e296a0109e46c88a67fa886a09e045fadc8 Mon Sep 17 00:00:00 2001 From: JongHeon Choi Date: Thu, 13 Oct 2016 20:09:50 +0900 Subject: [PATCH 06/16] Remove white space --- common/application_data.cc | 1 - extensions/common/xwalk_extension_server.cc | 1 + extensions/renderer/xwalk_extension_client.cc | 1 + extensions/renderer/xwalk_extension_renderer_controller.cc | 1 + loader/loader.gyp | 2 +- loader/wrt_loader.cc | 4 ++-- runtime/browser/popup.cc | 1 - runtime/browser/preload_manager.h | 1 - 8 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/application_data.cc b/common/application_data.cc index fc80bdb..091b7e5 100644 --- a/common/application_data.cc +++ b/common/application_data.cc @@ -258,7 +258,6 @@ bool ApplicationData::LoadManifestData() { } app_type_ = GetAppType(); - loaded_ = true; return true; diff --git a/extensions/common/xwalk_extension_server.cc b/extensions/common/xwalk_extension_server.cc index ae6fb86..fc50396 100755 --- a/extensions/common/xwalk_extension_server.cc +++ b/extensions/common/xwalk_extension_server.cc @@ -221,6 +221,7 @@ void XWalkExtensionServer::HandleGetAPIScript( eina_stringshare_del(extension_name); } + void XWalkExtensionServer::LoadUserExtensions(const std::string app_path) { manager_.LoadUserExtensions(app_path); } diff --git a/extensions/renderer/xwalk_extension_client.cc b/extensions/renderer/xwalk_extension_client.cc index fcebf33..383473f 100755 --- a/extensions/renderer/xwalk_extension_client.cc +++ b/extensions/renderer/xwalk_extension_client.cc @@ -122,6 +122,7 @@ void XWalkExtensionClient::OnReceivedIPCMessage( it->second->HandleMessageFromNative(msg); } + void XWalkExtensionClient::LoadUserExtensions(const std::string app_path) { XWalkExtensionServer* server = XWalkExtensionServer::GetInstance(); server->LoadUserExtensions(app_path); diff --git a/extensions/renderer/xwalk_extension_renderer_controller.cc b/extensions/renderer/xwalk_extension_renderer_controller.cc index 7a50cbf..59e45b7 100755 --- a/extensions/renderer/xwalk_extension_renderer_controller.cc +++ b/extensions/renderer/xwalk_extension_renderer_controller.cc @@ -113,6 +113,7 @@ void XWalkExtensionRendererController::OnReceivedIPCMessage( void XWalkExtensionRendererController::InitializeExtensionClient() { extensions_client_->Initialize(); } + void XWalkExtensionRendererController::LoadUserExtensions( const std::string app_path) { extensions_client_->LoadUserExtensions(app_path); diff --git a/loader/loader.gyp b/loader/loader.gyp index baa7456..152ec46 100644 --- a/loader/loader.gyp +++ b/loader/loader.gyp @@ -16,7 +16,7 @@ }, 'libraries' : [ '-ldl', - ], + ], }, # end of target 'wrt-loader' ], } diff --git a/loader/wrt_loader.cc b/loader/wrt_loader.cc index 4ccdb49..14ea066 100644 --- a/loader/wrt_loader.cc +++ b/loader/wrt_loader.cc @@ -16,7 +16,7 @@ #include #include -// loader file must have "User" execute label, because launchpad daemon runs +// loader file must have "User" execute label, because launchpad daemon runs // with "System::Privileged" label. int main(int argc, char* argv[]) { void* handle = dlopen("/usr/bin/xwalk_runtime", RTLD_NOW); @@ -30,7 +30,7 @@ int main(int argc, char* argv[]) { MAIN_FUNC real_main = reinterpret_cast(dlsym(handle, "main")); if (!real_main) { dlog_print(DLOG_DEBUG, "XWALK", "Error loading real_main"); - return false; + return false; } int ret = real_main(argc, argv); diff --git a/runtime/browser/popup.cc b/runtime/browser/popup.cc index 30dd33e..70aaee1 100644 --- a/runtime/browser/popup.cc +++ b/runtime/browser/popup.cc @@ -14,7 +14,6 @@ * limitations under the License. */ - #include "runtime/browser/popup.h" #include "common/logger.h" diff --git a/runtime/browser/preload_manager.h b/runtime/browser/preload_manager.h index b20d5f2..d34b82f 100755 --- a/runtime/browser/preload_manager.h +++ b/runtime/browser/preload_manager.h @@ -21,7 +21,6 @@ #include - namespace runtime { class NativeWindow; class PreloadManager { -- 2.7.4 From 19de6ca2d02fc9a1d4c444d854ead2efc2217578 Mon Sep 17 00:00:00 2001 From: JongHeon Choi Date: Tue, 18 Oct 2016 13:29:32 +0900 Subject: [PATCH 07/16] ewk_settings_form APIs is not declare in wearable profile --- runtime/browser/web_view_impl.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/browser/web_view_impl.cc b/runtime/browser/web_view_impl.cc index 7a79f99..e1fdc30 100644 --- a/runtime/browser/web_view_impl.cc +++ b/runtime/browser/web_view_impl.cc @@ -219,7 +219,9 @@ void WebViewImpl::Initialize() { Ewk_Settings* settings = ewk_view_settings_get(ewk_view_); ewk_settings_scripts_can_open_windows_set(settings, EINA_TRUE); +#ifndef PROFILE_WEARABLE ewk_settings_form_candidate_data_enabled_set(settings, EINA_TRUE); +#endif ewk_settings_default_text_encoding_name_set(settings, kDefaultEncoding); // TODO(sngn.lee): "protocolhandler,registration,requested" -- 2.7.4 From 31daa64f29be4c747ea5fd2ad36048bf71e919e4 Mon Sep 17 00:00:00 2001 From: JongHeon Choi Date: Wed, 19 Oct 2016 10:17:49 +0900 Subject: [PATCH 08/16] Fixed default indicator mode --- runtime/browser/native_window.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/browser/native_window.cc b/runtime/browser/native_window.cc index df1b248..fd40a02 100755 --- a/runtime/browser/native_window.cc +++ b/runtime/browser/native_window.cc @@ -179,6 +179,8 @@ void NativeWindow::Initialize() { natural_orientation_ = ScreenOrientation::PORTRAIT_PRIMARY; } + elm_win_indicator_mode_set(window_, ELM_WIN_INDICATOR_SHOW); + initialized_ = true; } -- 2.7.4 From efd29278c78e67440d5dd8be63f04911e70e113a Mon Sep 17 00:00:00 2001 From: JongHeon Choi Date: Mon, 31 Oct 2016 13:09:32 +0900 Subject: [PATCH 09/16] Add the -export-dynamic flags to the link options for the main executable --- runtime/runtime.gyp | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/runtime.gyp b/runtime/runtime.gyp index 3802152..a818470 100755 --- a/runtime/runtime.gyp +++ b/runtime/runtime.gyp @@ -48,6 +48,7 @@ ], 'ldflags': [ '-pie', + '-export-dynamic', ], 'variables': { 'packages': [ -- 2.7.4 From 12b7e1c3cc24ed077e7848c080316a504265ea15 Mon Sep 17 00:00:00 2001 From: JongHeon Choi Date: Mon, 31 Oct 2016 13:54:35 +0900 Subject: [PATCH 10/16] Skip an asterisk in appcontrol uri data --- common/resource_manager.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/resource_manager.cc b/common/resource_manager.cc index 667db3f..203f454 100644 --- a/common/resource_manager.cc +++ b/common/resource_manager.cc @@ -118,6 +118,9 @@ static bool CompareMime(const std::string& info_mime, static bool CompareUri(const std::string& info_uri, const std::string& request_uri) { + if (info_uri == "*") + return true; + if (request_uri.empty()) return info_uri.empty(); -- 2.7.4 From c4c4caa67db972376de72da5cf8f82d29234d062 Mon Sep 17 00:00:00 2001 From: DongJun Kim Date: Mon, 31 Oct 2016 16:39:31 +0900 Subject: [PATCH 11/16] Dummy button should be invisible to accessibility Change dummy button accessible role to REDUNDANT_OBJECT and dissable option of being highlighted. Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2381 Change-Id: I5e55048da697b3ad2fd039d1fd933e93fc385a1b Signed-off-by: DongJun Kim --- runtime/browser/native_window.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/browser/native_window.cc b/runtime/browser/native_window.cc index fd40a02..27b5c10 100755 --- a/runtime/browser/native_window.cc +++ b/runtime/browser/native_window.cc @@ -135,6 +135,8 @@ void NativeWindow::Initialize() { EVAS_SIZE_EXPAND_FILL(focus); elm_access_object_unregister(focus); evas_object_show(focus); + elm_atspi_accessible_role_set(focus, ELM_ATSPI_ROLE_REDUNDANT_OBJECT); + elm_atspi_accessible_can_highlight_set(focus, EINA_FALSE); focus_ = focus; // focus callback -- 2.7.4 From e8fea2afa8a92fb258f27aec684eb302534f6fac Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Tue, 8 Nov 2016 11:06:58 +0900 Subject: [PATCH 12/16] Add PATH variable to upgrade.sh Change-Id: Ie33ca01255af142c307e185e5e03df5207fc9c3d Signed-off-by: jaekuk, lee --- wrt-upgrade/310.wrt.upgrade.sh | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 wrt-upgrade/310.wrt.upgrade.sh diff --git a/wrt-upgrade/310.wrt.upgrade.sh b/wrt-upgrade/310.wrt.upgrade.sh old mode 100644 new mode 100755 index 2a3dba9..805a177 --- a/wrt-upgrade/310.wrt.upgrade.sh +++ b/wrt-upgrade/310.wrt.upgrade.sh @@ -1,4 +1,5 @@ #!/bin/sh +PATH=/bin:/usr/bin:/sbin:/usr/sbin #excute upgrade application /usr/bin/wrt-upgrade -- 2.7.4 From 049b53f534f8764e2ff0b8c2527a29b340f51a4c Mon Sep 17 00:00:00 2001 From: Marcin Niesluchowski Date: Thu, 10 Nov 2016 11:28:19 +0100 Subject: [PATCH 13/16] Change dummy object atspi role At point accessibility interface propagation stops on atspi with redundant objects role. This disallows selection of webview accessibility elements, as background which has that role is set to parent of ewk view. Change background atspi role to filler. This also reverts following change: * c4c4caa Dummy button should be invisible to accessibility Change-Id: I900651d7458e4b92fb1c89ace2a935d2d00eb2dd Signed-off-by: Marcin Niesluchowski --- runtime/browser/native_window.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/browser/native_window.cc b/runtime/browser/native_window.cc index 27b5c10..5712dff 100755 --- a/runtime/browser/native_window.cc +++ b/runtime/browser/native_window.cc @@ -134,9 +134,8 @@ void NativeWindow::Initialize() { elm_object_part_content_set(top_layout, "elm.swallow.content", focus); EVAS_SIZE_EXPAND_FILL(focus); elm_access_object_unregister(focus); + elm_atspi_accessible_role_set(focus, ELM_ATSPI_ROLE_FILLER); evas_object_show(focus); - elm_atspi_accessible_role_set(focus, ELM_ATSPI_ROLE_REDUNDANT_OBJECT); - elm_atspi_accessible_can_highlight_set(focus, EINA_FALSE); focus_ = focus; // focus callback -- 2.7.4 From 9457b85360d208b9d9f412163ffef93a8816a045 Mon Sep 17 00:00:00 2001 From: "min7.choi" Date: Mon, 21 Nov 2016 18:30:17 +0900 Subject: [PATCH 14/16] Fix, When the language is changed, the window not to do the show and active Change-Id: I4534f5b13c48fbc916ee2c9ee8f3f92245f9e305 Signed-off-by: min7.choi --- runtime/browser/web_application.cc | 14 +++++++++++--- runtime/browser/web_application.h | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index f7b96a7..4de717f 100644 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -220,6 +220,7 @@ WebApplication::WebApplication( : launched_(false), debug_mode_(false), verbose_mode_(false), + lang_changed_mode_(false), ewk_context_( ewk_context_new_with_injected_bundle_path(INJECTED_BUNDLE_PATH)), has_ownership_of_ewk_context_(true), @@ -712,6 +713,7 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { } void WebApplication::OnLanguageChanged() { + lang_changed_mode_ = true; locale_manager_->UpdateSystemLocale(); ewk_context_cache_clear(ewk_context_); auto it = view_stack_.begin(); @@ -854,9 +856,15 @@ void WebApplication::OnRendered(WebView* /*view*/) { LOGGER(DEBUG) << "Rendered"; splash_screen_->HideSplashScreen(SplashScreen::HideReason::RENDERED); - // Show window after frame rendered. - window_->Show(); - window_->Active(); + // Do not show(), active() for language change + if(lang_changed_mode_ == false){ + // Show window after frame rendered. + window_->Show(); + window_->Active(); + } + else{ + lang_changed_mode_ = false; + } } #ifdef MANUAL_ROTATE_FEATURE_SUPPORT diff --git a/runtime/browser/web_application.h b/runtime/browser/web_application.h index 02ca64b..9dcaa08 100755 --- a/runtime/browser/web_application.h +++ b/runtime/browser/web_application.h @@ -131,6 +131,8 @@ class WebApplication : public WebView::EventListener { int security_model_version_; std::string csp_rule_; std::string csp_report_rule_; + bool lang_changed_mode_; + }; } // namespace runtime -- 2.7.4 From bf4959646e203906d3db84d28b598bb5b419e45b Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Tue, 22 Nov 2016 10:50:19 +0900 Subject: [PATCH 15/16] localized_page has been modified not to use the localized path like current_page. Change-Id: I4c966b5e8660ad5b6d898cd40e0feccaecc24a43 Signed-off-by: jaekuk, lee --- runtime/browser/web_application.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 runtime/browser/web_application.cc diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc old mode 100644 new mode 100755 index 4de717f..b496d53 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -450,8 +450,8 @@ void WebApplication::AppControl( if (!do_reset) { std::string current_page = view_stack_.front()->GetUrl(); - std::string localized_page = - resource_manager_->GetLocalizedPath(res->uri()); + std::string localized_page = res->uri(); + if (current_page != localized_page) { do_reset = true; } else { -- 2.7.4 From 24e21da0fa1b1db2c2bb0d0996c2fb6d2d7c163c Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Wed, 23 Nov 2016 20:09:37 +0900 Subject: [PATCH 16/16] Apply renaming of SplashScreenHandler Author: JongHeonChoi https://github.com/crosswalk-project/crosswalk-tizen/pull/138 Change-Id: Ie8dbcf0bdbdfd430deacdc7b94cfa7abfce443d7 Signed-off-by: jaekuk, lee --- common/application_data.cc | 6 +++--- common/application_data.h | 6 +++--- runtime/browser/splash_screen.cc | 12 ++++++------ runtime/browser/splash_screen.h | 10 +++++----- runtime/browser/web_application.h | 1 - 5 files changed, 17 insertions(+), 18 deletions(-) mode change 100644 => 100755 common/application_data.cc mode change 100644 => 100755 common/application_data.h mode change 100644 => 100755 runtime/browser/splash_screen.cc mode change 100644 => 100755 runtime/browser/splash_screen.h diff --git a/common/application_data.cc b/common/application_data.cc old mode 100644 new mode 100755 index 091b7e5..0559c10 --- a/common/application_data.cc +++ b/common/application_data.cc @@ -89,7 +89,7 @@ std::shared_ptr return setting_info_; } -std::shared_ptr +std::shared_ptr ApplicationData::splash_screen_info() const { return splash_screen_info_; } @@ -215,9 +215,9 @@ bool ApplicationData::LoadManifestData() { wgt::parse::SettingInfo::Key())); splash_screen_info_ = - std::static_pointer_cast( + std::static_pointer_cast( widget_config_parser->GetManifestData( - wgt::parse::SplashScreenInfo::Key())); + wgt::parse::LaunchScreenInfo::Key())); tizen_application_info_ = std::static_pointer_cast( diff --git a/common/application_data.h b/common/application_data.h old mode 100644 new mode 100755 index 43d9c59..1a58ca9 --- a/common/application_data.h +++ b/common/application_data.h @@ -24,12 +24,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include #include @@ -68,7 +68,7 @@ class ApplicationData { permissions_info() const; std::shared_ptr setting_info() const; - std::shared_ptr + std::shared_ptr splash_screen_info() const; std::shared_ptr tizen_application_info() const; @@ -101,7 +101,7 @@ class ApplicationData { permissions_info_; std::shared_ptr setting_info_; - std::shared_ptr + std::shared_ptr splash_screen_info_; std::shared_ptr tizen_application_info_; diff --git a/runtime/browser/splash_screen.cc b/runtime/browser/splash_screen.cc old mode 100644 new mode 100755 index 9a4cd4f..89649c6 --- a/runtime/browser/splash_screen.cc +++ b/runtime/browser/splash_screen.cc @@ -25,7 +25,7 @@ #include "common/logger.h" #include "runtime/browser/native_window.h" -#include "wgt_manifest_handlers/splash_screen_handler.h" +#include "wgt_manifest_handlers/launch_screen_handler.h" using ScreenOrientation = runtime::NativeWindow::ScreenOrientation; @@ -35,7 +35,7 @@ enum class BorderOption { REPEAT = 1, STRETCH, ROUND }; wgt::parse::ScreenOrientation ChooseOrientation( const std::map& splash_map, + wgt::parse::LaunchScreenData>& splash_map, ScreenOrientation screen_orientation) { auto orientation_pair = splash_map.end(); @@ -96,7 +96,7 @@ namespace runtime { SplashScreen::SplashScreen( runtime::NativeWindow* window, - std::shared_ptr ss_info, + std::shared_ptr ss_info, const std::string& app_path) : ss_info_(ss_info), window_(window), @@ -106,7 +106,7 @@ SplashScreen::SplashScreen( is_active_(false) { LOGGER(DEBUG) << "start of create splash screen"; if (ss_info == nullptr) return; - auto splash_map = ss_info->splash_screen_data(); + auto splash_map = ss_info->launch_screen_data(); auto used_orientation = ChooseOrientation(splash_map, window->orientation()); if (used_orientation == wgt::parse::ScreenOrientation::NONE) return; @@ -153,7 +153,7 @@ std::pair SplashScreen::GetDimensions() { } void SplashScreen::SetBackground( - const wgt::parse::SplashScreenData& splash_data, Evas_Object* parent, + const wgt::parse::LaunchScreenData& splash_data, Evas_Object* parent, const SplashScreenBound& bound, const std::string& app_path) { background_ = elm_bg_add(parent); if (!background_) return; @@ -216,7 +216,7 @@ void SplashScreen::SetBackground( } void SplashScreen::SetImage( - const wgt::parse::SplashScreenData& splash_data, Evas_Object* parent, + const wgt::parse::LaunchScreenData& splash_data, Evas_Object* parent, const SplashScreenBound& bound, const std::string& app_path) { if (!background_) return; image_ = elm_image_add(background_); diff --git a/runtime/browser/splash_screen.h b/runtime/browser/splash_screen.h old mode 100644 new mode 100755 index 90fc979..11d49cd --- a/runtime/browser/splash_screen.h +++ b/runtime/browser/splash_screen.h @@ -26,7 +26,7 @@ #include #include "runtime/browser/native_window.h" -#include "wgt_manifest_handlers/splash_screen_handler.h" +#include "wgt_manifest_handlers/launch_screen_handler.h" namespace runtime { @@ -36,21 +36,21 @@ class SplashScreen { enum class HideReason { RENDERED, LOADFINISHED, CUSTOM }; SplashScreen(NativeWindow* window, - std::shared_ptr ss_info, + std::shared_ptr ss_info, const std::string& app_path); void HideSplashScreen(HideReason reason); private: std::pair GetDimensions(); - void SetBackground(const wgt::parse::SplashScreenData& splash_data, + void SetBackground(const wgt::parse::LaunchScreenData& splash_data, Evas_Object* parent, const SplashScreenBound& bound, const std::string& app_path); - void SetImage(const wgt::parse::SplashScreenData& splash_data, + void SetImage(const wgt::parse::LaunchScreenData& splash_data, Evas_Object* parent, const SplashScreenBound& bound, const std::string& app_path); - std::shared_ptr ss_info_; + std::shared_ptr ss_info_; NativeWindow* window_; Evas_Object* image_; Evas_Object* background_; diff --git a/runtime/browser/web_application.h b/runtime/browser/web_application.h index 9dcaa08..8e72b25 100755 --- a/runtime/browser/web_application.h +++ b/runtime/browser/web_application.h @@ -132,7 +132,6 @@ class WebApplication : public WebView::EventListener { std::string csp_rule_; std::string csp_report_rule_; bool lang_changed_mode_; - }; } // namespace runtime -- 2.7.4