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 <ychul.kang@samsung.com>
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());
}