From f08d75d7e6eaa488775c0188d0a410f771a25ffa Mon Sep 17 00:00:00 2001 From: Seongjun Yim Date: Tue, 5 Nov 2013 00:44:02 +0900 Subject: [PATCH] fix crash issue for authentication popup Change-Id: Ib41c2429a74db99758a68cc2ca26fcd1bd935fb9 Signed-off-by: Seongjun Yim --- src/controls/FWebCtrl_AuthConfirmPopup.cpp | 6 +++--- src/controls/FWebCtrl_WebImpl.cpp | 33 ++++++++++++++++++------------ 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/controls/FWebCtrl_AuthConfirmPopup.cpp b/src/controls/FWebCtrl_AuthConfirmPopup.cpp index 756dc92..eeaa139 100755 --- a/src/controls/FWebCtrl_AuthConfirmPopup.cpp +++ b/src/controls/FWebCtrl_AuthConfirmPopup.cpp @@ -191,6 +191,9 @@ _AuthConfirmPopup::OnActionPerformed(const Control& source, int actionId) { result r = E_SUCCESS; + r = HidePopup(); + SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + switch (actionId) { case ID_BUTTON_AUTH_PROCESS: @@ -204,9 +207,6 @@ _AuthConfirmPopup::OnActionPerformed(const Control& source, int actionId) default: break; } - - r = HidePopup(); - SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); } bool diff --git a/src/controls/FWebCtrl_WebImpl.cpp b/src/controls/FWebCtrl_WebImpl.cpp index 29910e3..4e0d109 100755 --- a/src/controls/FWebCtrl_WebImpl.cpp +++ b/src/controls/FWebCtrl_WebImpl.cpp @@ -4804,20 +4804,13 @@ _WebImpl::ShowAuthenticationPopup(const String& host, const String& realm, Authe r = pAuthPopup->Construct(host, realm, pAuthChallenge); SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); + __pAuthPopup.reset(); __pAuthPopup = std::move(pAuthPopup); - int modalResult = 0; - - r = __pAuthPopup->ShowAndWait(modalResult); - SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); - -CATCH: - if (__pAuthPopup) - { - __pAuthPopup.reset(); - } + r = __pAuthPopup->ShowPopup(); + SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - return r; + return E_SUCCESS; } @@ -5278,12 +5271,26 @@ _WebImpl::OnAncestorVisibleStateChanged(const _Control& control) if (IsVisible() == true) { pWebManager->SetActiveWeb(this); - ewk_view_page_visibility_state_set(pWebview, EWK_PAGE_VISIBILITY_STATE_VISIBLE, false); + if (IsLoading()) + { +// ewk_view_page_visibility_state_set(pWebview, EWK_PAGE_VISIBILITY_STATE_VISIBLE, true); + } + else + { +// ewk_view_page_visibility_state_set(pWebview, EWK_PAGE_VISIBILITY_STATE_VISIBLE, false); + } } else { pWebManager->RemoveActiveWeb(this); - ewk_view_page_visibility_state_set(pWebview, EWK_PAGE_VISIBILITY_STATE_HIDDEN, false); + if (IsLoading()) + { +// ewk_view_page_visibility_state_set(pWebview, EWK_PAGE_VISIBILITY_STATE_HIDDEN, true); + } + else + { +// ewk_view_page_visibility_state_set(pWebview, EWK_PAGE_VISIBILITY_STATE_HIDDEN, false); + } } } -- 2.7.4