From acbd308b2b8a199b98a9da4d6e0cda2bf7f6d6ae Mon Sep 17 00:00:00 2001 From: Youngcheol Kang Date: Mon, 19 Dec 2016 18:46:49 +0900 Subject: [PATCH] Handle back-key behavior when viewmode is 'windowed' The Webview should be navigated back in history if the viewmode is 'windowed' in config.xml. This patch adds the codes for handling the back-key behavior when viewmode is 'windowed' for backward compatibility with Tizen 2.x. Bug: P161214-06597 Change-Id: I83dff6c297cbc2baa82fdd19a49b1f89a433710e Signed-off-by: Youngcheol Kang --- runtime/browser/web_application.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 47da126..91614ee 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -725,8 +725,10 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { view->EvalJavascript(kBackKeyEventScript); // NOTE: This code is added for backward compatibility. // If the 'backbutton_presence' is true, WebView should be navigated back. - if (app_data_->setting_info() && - app_data_->setting_info()->backbutton_presence()) { + if ((app_data_->setting_info() != NULL && + app_data_->setting_info()->backbutton_presence()) || + (app_data_->widget_info() != NULL && + app_data_->widget_info()->view_modes() == "windowed")) { if (!view->Backward()) { RemoveWebViewFromStack(view_stack_.front()); } -- 2.7.4