From d7b1a1caa77d6a1d56089a01e6b0930472bcfaec Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Wed, 18 Jan 2017 14:29:29 +0900 Subject: [PATCH 01/16] Refactor call of terminator The terminator has been registered by Runtime. It makes a dependency from WebApplication to Runtime and does not assure the existence of the Runtime instance. Bug: DF170116-01203 Url: http://suprem.sec.samsung.net/jira/browse/TWF-2805 Change-Id: I700bddab8fb392dca131ab5d3a913ed63e45b792 Signed-off-by: Youngsoo Choi --- runtime/browser/ui_runtime.cc | 3 --- runtime/browser/watch_runtime.cc | 1 - runtime/browser/web_application.cc | 26 ++++++++++++++++---------- runtime/browser/web_application.h | 4 ---- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/runtime/browser/ui_runtime.cc b/runtime/browser/ui_runtime.cc index 41fa8d9..7a6188f 100755 --- a/runtime/browser/ui_runtime.cc +++ b/runtime/browser/ui_runtime.cc @@ -107,10 +107,7 @@ void UiRuntime::ResetWebApplication(NativeWindow::Type windowType) { app_data_, context_)); LOGGER(DEBUG) << "runtime.cc created web application"; - application_->set_terminator([](){ ui_app_exit(); }); - LOGGER(DEBUG) << "runtime.cc ResetWebApplication() finished"; - STEP_PROFILE_END("Runtime ResetWebApplication"); } diff --git a/runtime/browser/watch_runtime.cc b/runtime/browser/watch_runtime.cc index f166e72..4ec298b 100644 --- a/runtime/browser/watch_runtime.cc +++ b/runtime/browser/watch_runtime.cc @@ -90,7 +90,6 @@ bool WatchRuntime::OnCreate() { STEP_PROFILE_START("WebApplication Create"); application_ = new WebApplication(native_window_, app_data_); STEP_PROFILE_END("WebApplication Create"); - application_->set_terminator([](){ watch_app_exit(); }); setlocale(LC_ALL, ""); bindtextdomain(kTextDomainRuntime, kTextLocalePath); diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index dd6383e..5ffaa5c 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -301,8 +301,7 @@ WebApplication::WebApplication( window_(window), appid_(app_data->app_id()), app_data_(app_data), - locale_manager_(new common::LocaleManager()), - terminator_(NULL) { + locale_manager_(new common::LocaleManager()) { Initialize(); } @@ -320,8 +319,7 @@ WebApplication::WebApplication( window_(window), appid_(app_data->app_id()), app_data_(app_data), - locale_manager_(new common::LocaleManager()), - terminator_(NULL) { + locale_manager_(new common::LocaleManager()) { Initialize(); } @@ -706,12 +704,20 @@ void WebApplication::Exit() { if (!is_terminate_called_) ecore_main_loop_quit(); - if (terminator_) { - LOGGER(DEBUG) << "terminator_"; - terminator_(); - } else { - LOGGER(ERROR) << "There's no registered terminator."; - elm_exit(); + switch (app_data_->app_type()) { + case common::ApplicationData::AppType::UI: + LOGGER(ERROR) << "app_ui_exit"; + ui_app_exit(); + break; +#ifdef WATCH_FACE_FEATURE_SUPPORT + case common::ApplicationData::AppType::WATCH: + LOGGER(ERROR) << "watch_ui_exit"; + watch_app_exit(); + break; +#endif + default: + LOGGER(ERROR) << "default terminator"; + elm_exit(); } } diff --git a/runtime/browser/web_application.h b/runtime/browser/web_application.h index f35fd04..20d9082 100755 --- a/runtime/browser/web_application.h +++ b/runtime/browser/web_application.h @@ -57,9 +57,6 @@ class WebApplication : public WebView::EventListener { void ProcessClosingPage(); std::string data_path() const { return app_data_path_; } - void set_terminator(std::function terminator) { - terminator_ = terminator; - } bool launched() const { return launched_; } std::list view_stack() const { return view_stack_; } @@ -152,7 +149,6 @@ class WebApplication : public WebView::EventListener { std::unique_ptr splash_screen_; std::unique_ptr locale_manager_; std::unique_ptr resource_manager_; - std::function terminator_; int security_model_version_; std::string csp_rule_; std::string csp_report_rule_; -- 2.7.4 From 915e46768613e6c1f1033b8e31efa73f343bee27 Mon Sep 17 00:00:00 2001 From: Youngcheol Kang Date: Fri, 13 Jan 2017 16:07:21 +0900 Subject: [PATCH 02/16] Hide the window object during termination of webapp This white screen is shown because the webview is deleted and window object remains. This patch fixes this issue using evas_object_hide() API for preventing the white screen issue during the termination of web application. Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2790 Change-Id: Ie697d4285d957ccc830518e78d3135c3770801c2 Signed-off-by: Youngcheol Kang --- runtime/browser/web_application.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 5ffaa5c..6830891 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -793,6 +793,11 @@ void WebApplication::OnClosedWebView(WebView* view) { LOGGER(DEBUG) << "plugin_session_count : " << XWalkExtensionRendererController::plugin_session_count; + + // Hide the window object for preventing the white screen + // during termination of web application. + evas_object_hide(window_->evas_object()); + session_counter.application = this; session_counter.timer = ecore_timer_add(SESSION_COUNTER_INTERVAL, CheckPluginSession, &session_counter); -- 2.7.4 From 25dd9a38d6f7f9464868846d0a17cd270f47b342 Mon Sep 17 00:00:00 2001 From: Srinivasarao Javvadi Date: Thu, 19 Jan 2017 13:14:12 +0530 Subject: [PATCH 03/16] Web app is not launching in user binary [Model] Pride Z250F [BinType] AP [Customer] N/A [Issue#] P170109-05747 [Request] N/A [Occurrence Version] [Problem] Window show & active are not being called [Cause & Measure] Cause: lang_changed_mode_ is not initialized in WebApplication object which is created using overloaded WebApplication constructor using Ewk_context. During frame rendered callback, window show & active will not be called upon language call back. Measure: Initialize lang_changed_mode_ to false in WebApplication object [Checking Method] Web application window should be shown on launching the app [Team] Web Run Time [Developer] Srinivasarao J [Solution company] Samsung [Change Type] N/A Change-Id: I0eb5acb7cafcee695bf8c6735baa6b41c1f6a91d --- runtime/browser/web_application.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 6830891..6c6688d 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -312,6 +312,7 @@ WebApplication::WebApplication( : launched_(false), debug_mode_(false), verbose_mode_(false), + lang_changed_mode_(false), is_terminate_called_(false), is_close_page_called_(false), ewk_context_(context), -- 2.7.4 From 28d7e3ffb4345e8e923c5e2e664db48c08baf30f Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Thu, 26 Jan 2017 15:21:07 +0900 Subject: [PATCH 04/16] Implement notification onclick event This CL enables notification onclick event. Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2866 Change-Id: Iecb07daaacea6d82abc2824cabcc9941c33f70d1 Signed-off-by: Youngsoo Choi --- runtime/browser/notification_manager.cc | 37 +++++++++++++++++++++++++++++---- runtime/browser/notification_manager.h | 1 + 2 files changed, 34 insertions(+), 4 deletions(-) mode change 100644 => 100755 runtime/browser/notification_manager.h diff --git a/runtime/browser/notification_manager.cc b/runtime/browser/notification_manager.cc index aebd6e4..cff02ad 100755 --- a/runtime/browser/notification_manager.cc +++ b/runtime/browser/notification_manager.cc @@ -22,6 +22,7 @@ #include #include "common/logger.h" +#include "EWebKit_internal.h" namespace runtime { @@ -33,6 +34,26 @@ NotificationManager* NotificationManager::GetInstance() { NotificationManager::NotificationManager() { } +static void notification_onclick_event_cb( + notification_h noti, int event_type, void* userdata) { + NotificationManager* thiz = + static_cast(userdata); + int notification_priv_id = NOTIFICATION_PRIV_ID_NONE; + int ret = notification_get_id(noti, nullptr, ¬ification_priv_id); + if (ret != NOTIFICATION_ERROR_NONE) + LOGGER(ERROR) << "Can't get notification ID" << ret; + ewk_notification_clicked(thiz->FindNotificationID(notification_priv_id)); +} + +uint64_t NotificationManager::FindNotificationID( + int notification_priv_id) { + for (auto it = keymapper_.begin(); it != keymapper_.end(); it++) + if (it->second == notification_priv_id) + return it->first; + LOGGER(ERROR) << "Can't find notification ID" << notification_priv_id; + return 0; +} + bool NotificationManager::Show(uint64_t tag, const std::string& title, const std::string& body, @@ -93,13 +114,21 @@ bool NotificationManager::Show(uint64_t tag, } // insert notification - int platform_key = NOTIFICATION_PRIV_ID_NONE; - ret = notification_insert(noti_h, &platform_key); + ret = notification_post_with_event_cb( + noti_h, notification_onclick_event_cb, this); + if (ret != NOTIFICATION_ERROR_NONE) { + LOGGER(ERROR) << "Can't insert notification " << ret; + return false; + } + + int notification_priv_id = NOTIFICATION_PRIV_ID_NONE; + + ret = notification_get_id(noti_h, nullptr, ¬ification_priv_id); if (ret != NOTIFICATION_ERROR_NONE) { - LOGGER(ERROR) << "Can't insert notification"; + LOGGER(ERROR) << "Can't get notification ID" << ret; return false; } - keymapper_[tag] = platform_key; + keymapper_[tag] = notification_priv_id; return true; } diff --git a/runtime/browser/notification_manager.h b/runtime/browser/notification_manager.h old mode 100644 new mode 100755 index da93524..da703bc --- a/runtime/browser/notification_manager.h +++ b/runtime/browser/notification_manager.h @@ -30,6 +30,7 @@ class NotificationManager { const std::string& body, const std::string& icon_path); bool Hide(uint64_t tag); + uint64_t FindNotificationID(int notification_priv_id); private: NotificationManager(); std::map keymapper_; -- 2.7.4 From 3f570dca62b5d3dfe9f72ef598bc7951381adf2d Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Thu, 26 Jan 2017 15:32:15 +0900 Subject: [PATCH 05/16] Apply session counter only for product tv There hasn't been any issue on public profiles regarding session count. So, the session counter is not needed for the public profiles. Also this CL adds the codes for preventing white screen issue during the termination of web application. Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2867 Change-Id: I2418669eb7000f57d56fdca27437a11e5d59d09b Signed-off-by: Youngsoo Choi Signed-off-by: Youngcheol Kang --- packaging/crosswalk-tizen.spec | 3 +++ runtime/browser/web_application.cc | 8 ++++++++ runtime/runtime.gyp | 3 +++ 3 files changed, 14 insertions(+) diff --git a/packaging/crosswalk-tizen.spec b/packaging/crosswalk-tizen.spec index b1f452b..e908515 100755 --- a/packaging/crosswalk-tizen.spec +++ b/packaging/crosswalk-tizen.spec @@ -115,6 +115,9 @@ GYP_OPTIONS="$GYP_OPTIONS -Dextension_path=%{extension_path}" # Injected bundle GYP_OPTIONS="$GYP_OPTIONS -Dinjected_bundle_path=%{injected_bundle_path}" +# Tizen product tv +GYP_OPTIONS="$GYP_OPTIONS -Dtizen_product_tv=%{!?TIZEN_PRODUCT_TV:0}" + # Build ./tools/gyp/gyp $GYP_OPTIONS xwalk_tizen.gyp ninja -C out/Default %{?_smp_mflags} diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 6c6688d..085af1e 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -758,6 +758,12 @@ void WebApplication::RemoveWebViewFromStack(WebView* view) { auto extension_server = XWalkExtensionServer::GetInstance(); LOGGER(DEBUG) << "Shutdown extension server"; extension_server->Shutdown(); +#if !defined(TIZEN_PRODUCT_TV) + // Hide the window object for preventing the white screen + // during termination of web application. + evas_object_hide(window_->evas_object()); + Exit(); +#endif } else if (current != view_stack_.front()) { view_stack_.front()->SetVisibility(true); window_->SetContent(view_stack_.front()->evas_object()); @@ -792,6 +798,7 @@ void WebApplication::OnClosedWebView(WebView* view) { view->ReplyToJavascriptDialog(); RemoveWebViewFromStack(view); +#if defined(TIZEN_PRODUCT_TV) LOGGER(DEBUG) << "plugin_session_count : " << XWalkExtensionRendererController::plugin_session_count; @@ -804,6 +811,7 @@ void WebApplication::OnClosedWebView(WebView* view) { CheckPluginSession, &session_counter); if (!session_counter.timer) LOGGER(ERROR) << "It's failed to create session_counter timer"; +#endif } void WebApplication::OnReceivedWrtMessage(WebView* view, diff --git a/runtime/runtime.gyp b/runtime/runtime.gyp index a818470..4348b5f 100755 --- a/runtime/runtime.gyp +++ b/runtime/runtime.gyp @@ -76,6 +76,9 @@ ['profile == "tv"', { 'defines': ['PROFILE_TV'], }], + ['tizen_product_tv == "1"', { + 'defines': ['TIZEN_PRODUCT_TV'], + }], ['tizen_model_formfactor == "circle"', { 'defines': ['MODEL_FORMFACTOR_CIRCLE'], }], -- 2.7.4 From c332d2771236dd6c0b31483d35b3efea1346af9c Mon Sep 17 00:00:00 2001 From: Youngcheol Kang Date: Thu, 2 Feb 2017 10:17:27 +0900 Subject: [PATCH 06/16] fixup! Refactor call of terminator This patch fixes the following build problem in original patch. error: watch_app_exit was not declared in this scope watch_app_exit(); Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2906 Change-Id: Iaa9028fe0851a0fd8f93d29d779e92a1ef7a56e2 Signed-off-by: Youngcheol Kang --- runtime/browser/web_application.cc | 1 + runtime/runtime.gyp | 1 + 2 files changed, 2 insertions(+) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 085af1e..f6efe80 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -17,6 +17,7 @@ #include "runtime/browser/web_application.h" #include +#include #include #include #include diff --git a/runtime/runtime.gyp b/runtime/runtime.gyp index 4348b5f..3f5ea2e 100755 --- a/runtime/runtime.gyp +++ b/runtime/runtime.gyp @@ -52,6 +52,7 @@ ], 'variables': { 'packages': [ + 'appcore-watch', 'capi-appfw-application', 'capi-ui-efl-util', 'chromium-efl', -- 2.7.4 From b56b1cfcb9d2aa23ca643643346d2965d2269c99 Mon Sep 17 00:00:00 2001 From: Youngcheol Kang Date: Thu, 2 Feb 2017 11:41:25 +0900 Subject: [PATCH 07/16] fixup! fixup! Refactor call of terminator This patch fixes the following build problem in original patch. error : No package 'appcore-watch' found Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2906 Change-Id: I31ec4f3654f800944f2c3af8478f08d65c73d5fe Signed-off-by: Youngcheol Kang --- runtime/browser/web_application.cc | 5 ++++- runtime/runtime.gyp | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index f6efe80..ac93129 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -17,7 +17,6 @@ #include "runtime/browser/web_application.h" #include -#include #include #include #include @@ -29,6 +28,10 @@ #include #include +#ifdef WATCH_FACE_FEATURE_SUPPORT +#include +#endif + #include "common/application_data.h" #include "common/app_db.h" #include "common/app_control.h" diff --git a/runtime/runtime.gyp b/runtime/runtime.gyp index 3f5ea2e..4348b5f 100755 --- a/runtime/runtime.gyp +++ b/runtime/runtime.gyp @@ -52,7 +52,6 @@ ], 'variables': { 'packages': [ - 'appcore-watch', 'capi-appfw-application', 'capi-ui-efl-util', 'chromium-efl', -- 2.7.4 From fa25489141a3544101adfa8db98c275c505d13cd Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Mon, 6 Feb 2017 12:47:42 +0900 Subject: [PATCH 08/16] Add a code to check module_system To prevent decreasing "plugin_session_count", because the context is not created if it is a remote URL. Change-Id: I5a85ee2794bcb3b454ec937859435e62cd12d6ff Signed-off-by: jaekuk, lee --- extensions/renderer/xwalk_extension_renderer_controller.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/extensions/renderer/xwalk_extension_renderer_controller.cc b/extensions/renderer/xwalk_extension_renderer_controller.cc index 01c1ece..6c8dd11 100755 --- a/extensions/renderer/xwalk_extension_renderer_controller.cc +++ b/extensions/renderer/xwalk_extension_renderer_controller.cc @@ -91,9 +91,12 @@ void XWalkExtensionRendererController::DidCreateScriptContext( void XWalkExtensionRendererController::WillReleaseScriptContext( v8::Handle context) { v8::Context::Scope contextScope(context); + XWalkModuleSystem* module_system = XWalkModuleSystem::GetModuleSystemFromContext(context); + if (module_system) { + plugin_session_count--; + LOGGER(DEBUG) << "plugin_session_count : " << plugin_session_count; + } XWalkModuleSystem::ResetModuleSystemFromContext(context); - plugin_session_count--; - LOGGER(DEBUG) << "plugin_session_count : " << plugin_session_count; } void XWalkExtensionRendererController::OnReceivedIPCMessage( -- 2.7.4 From ab93561c683c7e1e58ca49d6be8d6640ff3dd58b Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Mon, 6 Feb 2017 13:09:15 +0900 Subject: [PATCH 09/16] Terminate properly when triggering hardware back key event Termination should not be done when there are multiple webviews and hardware back key event is triggered for page navigation. The termination needs to be done only if there is one webview on view stack. This CL adds condition for the checking webview count. PLM: P170125-05834 Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2951 Change-Id: I6d4056c46a0c9999d068d1dd4c14d4f4793457a0 Signed-off-by: Youngsoo Choi --- runtime/browser/web_application.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index ac93129..a99a876 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -931,8 +931,12 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { if(enabled) view->EvalJavascript(kBackKeyEventScript); if (!view->Backward()) { - LOGGER(DEBUG) << "Terminate"; - Terminate(); + if (view_stack_.size() == 1) { + LOGGER(DEBUG) << "Terminate"; + Terminate(); + } else { + RemoveWebViewFromStack(view_stack_.front()); + } } } return; @@ -947,8 +951,12 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { (app_data_->widget_info() != NULL && app_data_->widget_info()->view_modes() == "windowed")) { if (!view->Backward()) { - LOGGER(DEBUG) << "Terminate"; - Terminate(); + if (view_stack_.size() == 1) { + LOGGER(DEBUG) << "Terminate"; + Terminate(); + } else { + RemoveWebViewFromStack(view_stack_.front()); + } } } } else if (enabled && kKeyNameMenu == keyname) { -- 2.7.4 From f2afa7508b8bcbdbf23c0818b0be0c6b4b5ed548 Mon Sep 17 00:00:00 2001 From: Youngcheol Kang Date: Tue, 20 Dec 2016 20:37:38 +0900 Subject: [PATCH 10/16] Fix for handling CSP behavior for backward compatibility with tizen 2.x WRT delivers the CSP elements of config.xml in web application to the webengine through ewk_view_content_security_policy_set API. However, some problem takes place in web application which doesn't set CSP element in config.xml. In order to resolve this compatibility problem, this patch adds the workaround codes for backward compatibility with tizen 2.x by request of webengine. In the webapp of tizen 2.x, this patch allows the all CSP policy by using "allow *;" element. Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2689 Change-Id: Ifba3a8db7fa5a7ab984e9746ba8e3cbb7a901c10 Signed-off-by: Youngcheol Kang --- runtime/browser/web_application.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index a99a876..0bb0383 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -455,7 +455,19 @@ bool WebApplication::Initialize() { security_model_version_ = 2; if (app_data_->csp_info() == NULL || app_data_->csp_info()->security_rules().empty()) { - csp_rule_ = kDefaultCSPRule; + // Add the workaround codes for backward compatibility with tizen 2.x + // by request of webengine. In the webapp of tizen 2.x, this patch allows + // the all CSP policy by using "allow *;" option. + if (app_data_->tizen_application_info() != NULL && + !app_data_->tizen_application_info()->required_version().empty()) { + std::string tizen_version = app_data_->tizen_application_info()->required_version(); + if (tizen_version[0] == '2') + csp_rule_ = "allow *;"; + else + csp_rule_ = kDefaultCSPRule; + } else { + csp_rule_ = kDefaultCSPRule; + } } else { csp_rule_ = app_data_->csp_info()->security_rules(); } -- 2.7.4 From 94c113bad5aa4f2d1886ea9fec5af9f4da642a78 Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Fri, 24 Mar 2017 17:00:38 +0900 Subject: [PATCH 11/16] Specifiy that this supports M47 Change-Id: I2317d9f8dff25e1aa557f645c892b85fe261d0f3 Signed-off-by: jaekuk, lee --- packaging/crosswalk-tizen.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/crosswalk-tizen.spec b/packaging/crosswalk-tizen.spec index e908515..3ea5ab2 100755 --- a/packaging/crosswalk-tizen.spec +++ b/packaging/crosswalk-tizen.spec @@ -29,7 +29,7 @@ BuildRequires: pkgconfig(capi-appfw-app-manager) BuildRequires: pkgconfig(capi-appfw-package-manager) BuildRequires: pkgconfig(capi-system-system-settings) BuildRequires: pkgconfig(capi-ui-efl-util) -BuildRequires: pkgconfig(chromium-efl) +BuildRequires: pkgconfig(chromium-efl) < 48.0.0, pkgconfig(chromium-efl) >= 47.0.0 BuildRequires: pkgconfig(cynara-client) BuildRequires: pkgconfig(deviced) BuildRequires: pkgconfig(dlog) -- 2.7.4 From 12eb06fa43bc289e46cee0b4f838491d12566ce5 Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Tue, 11 Apr 2017 17:29:26 +0900 Subject: [PATCH 12/16] Initialized constructor Following members are initialized. => main_loop, session_counter Change-Id: Ibbea601f7dd087eb01a498fca97199c1f253ef4a Signed-off-by: jaekuk, lee --- runtime/browser/web_application.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 0bb0383..5cb2b78 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -486,6 +486,14 @@ bool WebApplication::Initialize() { window_->EnableManualRotation(true); #endif // MANUAL_ROTATE_FEATURE_SUPPORT + main_loop.application = NULL; + main_loop.timer = NULL; + session_counter.application = NULL; + session_counter.timer = NULL; + m_tizenCompatibilitySettings.m_major = 0; + m_tizenCompatibilitySettings.m_minor = 0; + m_tizenCompatibilitySettings.m_release = 0; + return true; } -- 2.7.4 From 469daf2203e615c645bbc5b98a5782bdf16f3140 Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Wed, 19 Apr 2017 14:03:07 +0900 Subject: [PATCH 13/16] Changed the order of elm_exit() and elm_shutdown() Change-Id: Id8699768ee55faa3da46c677675d5ece135457ba Signed-off-by: jaekuk, lee --- runtime/browser/runtime_process.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/browser/runtime_process.cc b/runtime/browser/runtime_process.cc index a085bbc..5401d10 100755 --- a/runtime/browser/runtime_process.cc +++ b/runtime/browser/runtime_process.cc @@ -139,8 +139,8 @@ int real_main(int argc, char* argv[]) { } LOGGER(DEBUG) << "ewk_shutdown"; ewk_shutdown(); - elm_shutdown(); elm_exit(); + elm_shutdown(); LOGGER(DEBUG) << "EXIT_SUCCESS"; return EXIT_SUCCESS; -- 2.7.4 From a886b3131b3c14c48b9b57274767a1e316bf3766 Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Wed, 19 Apr 2017 14:03:07 +0900 Subject: [PATCH 14/16] Changed the order of elm_exit() and elm_shutdown(). Elm API should be used in the following order: 1. elm_init 2. elm_run 3. elm_exit 4. elm_shutdown Change-Id: Id8699768ee55faa3da46c677675d5ece135457ba Signed-off-by: jaekuk, lee --- runtime/browser/runtime_process.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/browser/runtime_process.cc b/runtime/browser/runtime_process.cc index a085bbc..5401d10 100755 --- a/runtime/browser/runtime_process.cc +++ b/runtime/browser/runtime_process.cc @@ -139,8 +139,8 @@ int real_main(int argc, char* argv[]) { } LOGGER(DEBUG) << "ewk_shutdown"; ewk_shutdown(); - elm_shutdown(); elm_exit(); + elm_shutdown(); LOGGER(DEBUG) << "EXIT_SUCCESS"; return EXIT_SUCCESS; -- 2.7.4 From 4336915fb56f6a90adf28e27e6a86bc47c38bf52 Mon Sep 17 00:00:00 2001 From: Youngcheol Kang Date: Wed, 10 May 2017 17:10:21 +0900 Subject: [PATCH 15/16] fixup! Implement Fullscreen API In tizen 2.4 environment, WRT calls the ewk_view_fullscreen_exit() API and exits the event handler when pressing hardware back key if it's fullscreen mode in only "Software key" mode or "windowed" view mode. However above two conditions(software key and windowed view modes) were omitted in tizen 3.0, so the ewk_view_fullscreen_exit() API was always called when pressing hardware back key in fullscreen mode. This CL fixes these problem. Bug: http://suprem.sec.samsung.net/jira/browse/TWF-3201 Change-Id: I4dda2d78be7af8cf75df72875aa2d7e94bbe2da9 Signed-off-by: Youngcheol Kang --- runtime/browser/web_application.cc | 5 +++++ runtime/browser/web_view_impl.cc | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 5cb2b78..240df69 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -978,6 +978,11 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { RemoveWebViewFromStack(view_stack_.front()); } } + + if (app_data_->widget_info()->view_modes() == "fullscreen") { + ewk_view_fullscreen_exit(view->evas_object()); + return; + } } } else if (enabled && kKeyNameMenu == keyname) { view->EvalJavascript(kMenuKeyEventScript); diff --git a/runtime/browser/web_view_impl.cc b/runtime/browser/web_view_impl.cc index 162bca9..797f98e 100644 --- a/runtime/browser/web_view_impl.cc +++ b/runtime/browser/web_view_impl.cc @@ -980,10 +980,6 @@ void WebViewImpl::OnRotation(int degree) { void WebViewImpl::OnKeyEvent(Eext_Callback_Type key_type) { std::string keyname; if (key_type == EEXT_CALLBACK_BACK) { - if (fullscreen_) { - ewk_view_fullscreen_exit(ewk_view_); - return; - } if (EINA_TRUE == ewk_view_text_selection_clear(ewk_view_)) { return; } -- 2.7.4 From 19e8b8e8c6ab74e4f804e362dbe2477015a5dd2e Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Thu, 15 Jun 2017 15:12:39 +0900 Subject: [PATCH 16/16] Changed a string to a variable "fullscreen" => kViewmodeTypeFullscreen "windowed" => kViewmodeTypeWindowed Change-Id: I354ce4c9fa84745c9c18d208faf570a9b16e970b Signed-off-by: jaekuk, lee --- runtime/browser/web_application.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 240df69..191023c 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -143,6 +143,9 @@ const char* kDefaultCSPRule = const char* kResWgtPath = "res/wgt/"; const char* kAppControlMain = "http://tizen.org/appcontrol/operation/main"; +const std::string kViewmodeTypeFullscreen = "fullscreen"; +const std::string kViewmodeTypeWindowed = "windowed"; + // Looking for added privilege by Application developer in config.xml. bool FindPrivilegeFromConfig(common::ApplicationData* app_data, const std::string& privilege) { @@ -445,7 +448,7 @@ bool WebApplication::Initialize() { } if (app_data_->widget_info() != NULL && - app_data_->widget_info()->view_modes() == "fullscreen") { + app_data_->widget_info()->view_modes() == kViewmodeTypeFullscreen) { window_->SetCurrentViewModeFullScreen(true); window_->FullScreen(true); } @@ -969,7 +972,7 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { if ((app_data_->setting_info() != NULL && app_data_->setting_info()->backbutton_presence()) || (app_data_->widget_info() != NULL && - app_data_->widget_info()->view_modes() == "windowed")) { + app_data_->widget_info()->view_modes() == kViewmodeTypeWindowed)) { if (!view->Backward()) { if (view_stack_.size() == 1) { LOGGER(DEBUG) << "Terminate"; @@ -979,7 +982,7 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { } } - if (app_data_->widget_info()->view_modes() == "fullscreen") { + if (app_data_->widget_info()->view_modes() == kViewmodeTypeFullscreen) { ewk_view_fullscreen_exit(view->evas_object()); return; } -- 2.7.4