void WebApplication::OnClosedWebView(WebView* view) {
is_terminated_by_callback_ = true;
+ // Reply to javascript dialog for preventing freeze issue.
+ view->ReplyToJavascriptDialog();
RemoveWebViewFromStack(view);
if (runtime::Runtime::is_on_terminate_called) {
}
}
-void WebApplication::OnReceivedWrtMessage(WebView* /*view*/,
+void WebApplication::OnReceivedWrtMessage(WebView* view,
Ewk_IPC_Wrt_Message_Data* msg) {
Eina_Stringshare* msg_type = ewk_ipc_wrt_message_data_type_get(msg);
window_->InActive();
} else if (TYPE_IS("tizen://exit")) {
// One Way Message
+ // Reply to javascript dialog for preventing freeze issue.
+ view->ReplyToJavascriptDialog();
ecore_idler_add(ExitAppIdlerCallback, this);
} else if (TYPE_IS("tizen://changeUA")) {
// Async Message
delete impl_;
}
+void WebView::ReplyToJavascriptDialog() {
+ impl_->ReplyToJavascriptDialog();
+}
+
void WebView::LoadUrl(const std::string& url, const std::string& mime) {
impl_->LoadUrl(url, mime);
}
WebView(NativeWindow* window, Ewk_Context* context);
virtual ~WebView();
+ void ReplyToJavascriptDialog();
void LoadUrl(const std::string& url, const std::string& mime = std::string());
std::string GetUrl();
WebViewImpl::~WebViewImpl() {
if (internal_popup_opened_) {
+ internal_popup_opened_ = false;
ewk_view_javascript_alert_reply(ewk_view_);
}
Deinitialize();
evas_smart_free(evas_smart_class_);
}
+void WebViewImpl::ReplyToJavascriptDialog() {
+ if (internal_popup_opened_) {
+ internal_popup_opened_ = false;
+ ewk_view_javascript_alert_reply(ewk_view_);
+ }
+}
+
void WebViewImpl::LoadUrl(const std::string& url, const std::string& mime) {
SCOPE_PROFILE();
if (!mime.empty()) {
WebViewImpl(WebView* view, NativeWindow* window, Ewk_Context* context);
virtual ~WebViewImpl();
+ void ReplyToJavascriptDialog();
void LoadUrl(const std::string& url, const std::string& mime = std::string());
std::string GetUrl();