From: hyun lee Date: Tue, 16 Jul 2013 09:05:06 +0000 (+0900) Subject: remove SetOwner() for popup X-Git-Tag: submit/tizen_2.2/20130716.173734~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50b311aac606bb8896caf6f70cd2c5cb6109f9ff;p=framework%2Fosp%2Fweb.git remove SetOwner() for popup Change-Id: Ibbae783012f473f5def4a9acf6897d57e2f5bf1c Signed-off-by: hyun lee --- diff --git a/src/controls/FWebCtrl_CertificateConfirmPopup.cpp b/src/controls/FWebCtrl_CertificateConfirmPopup.cpp index 8c8a6dd..b76bba3 100755 --- a/src/controls/FWebCtrl_CertificateConfirmPopup.cpp +++ b/src/controls/FWebCtrl_CertificateConfirmPopup.cpp @@ -225,8 +225,6 @@ _CertificateConfirmPopup::OnActionPerformed(const Control& source, int actionId) r = pCertificatePopup->Construct(CERTIFICATE_POPUP_MODE_VIEW, __pCertificatePolicyData); SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); - pCertificatePopup->SetOwner(this); - r = pCertificatePopup->ShowPopup(); SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/controls/FWebCtrl_InputPickerPopup.cpp b/src/controls/FWebCtrl_InputPickerPopup.cpp index e6fc7be..c652f10 100755 --- a/src/controls/FWebCtrl_InputPickerPopup.cpp +++ b/src/controls/FWebCtrl_InputPickerPopup.cpp @@ -200,7 +200,6 @@ _InputPickerPopup::Construct(const String& strDate, Ewk_Input_Type inputType, Ti r = AddButton(ID_BUTTON_INPUT_DATE_SELECTION); SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - __pPopup->SetOwner(&pImpl->GetPublic()); __pPopup->SetPropagatedKeyEventListener(this); std::unique_ptr pLayout(dynamic_cast< VerticalBoxLayout* >(__pPopup->GetLayoutN())); @@ -249,7 +248,6 @@ _InputPickerPopup::Construct(const Color& color, Tizen::Web::Controls::_WebImpl* pColorPicker->SetColor(color); - __pPopup->SetOwner(&pImpl->GetPublic()); __pPopup->SetPropagatedKeyEventListener(this); r = __pPopup->AddControl(*pColorPicker); SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); diff --git a/src/controls/FWebCtrl_Web.cpp b/src/controls/FWebCtrl_Web.cpp index 44a5586..74782d2 100755 --- a/src/controls/FWebCtrl_Web.cpp +++ b/src/controls/FWebCtrl_Web.cpp @@ -340,7 +340,6 @@ _Web::_Web(void) , __pPinchGestureHandler(null) , __gestureType(WEB_GESTURE_TYPE_TAP) , __edgeType(WEB_EDGE_NONE) - , __focus(false) , __pTextElement(null) , __previousTouchedPosition(0.0f, 0.0f) { @@ -692,62 +691,6 @@ _Web::SetEdgeReachedEvent(_WebEdgeType type) } -void -_Web::SetFocusEnd(bool focus) -{ - __focus = focus; -} - - -bool -_Web::IsFocusEnd(void) -{ - return __focus; -} - - -bool -_Web::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) -{ - _KeyCode keyCode = keyInfo.GetKeyCode(); - - if (IsFocusEnd() == true) - { - SetFocusEnd(false); - evas_object_focus_set(GetWebNativeNode(), EINA_FALSE); - return false; - } - - switch(keyCode) - { - case _KEY_UP: - case _KEY_DOWN: - evas_object_focus_set(GetWebNativeNode(), EINA_FALSE); - return false; - break; - default: - break; - } - - evas_object_focus_set(GetWebNativeNode(), EINA_TRUE); - - return true; -} - - -bool -_Web::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo) -{ - return false; -} - - -void -_Web::OnDrawFocus(void) -{ -} - - bool _Web::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo) { diff --git a/src/controls/FWebCtrl_Web.h b/src/controls/FWebCtrl_Web.h index bf6fa51..a1878ae 100755 --- a/src/controls/FWebCtrl_Web.h +++ b/src/controls/FWebCtrl_Web.h @@ -115,16 +115,9 @@ public: void SetEdgeReachedEvent(_WebEdgeType type); - void SetFocusEnd(bool focus); - bool IsFocusEnd(void); - virtual result OnAttaching(const _Control* pParent); virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds); - virtual bool OnKeyPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_KeyInfo& keyInfo); - virtual bool OnKeyReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_KeyInfo& keyInfo); - virtual void OnDrawFocus(void); - virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo); virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo); virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo); @@ -200,8 +193,6 @@ private: int __edgeType; - bool __focus; - Tizen::Ui::_AccessibilityElement* __pTextElement; Tizen::Graphics::FloatPoint __previousTouchedPosition; diff --git a/src/controls/FWebCtrl_WebImpl.cpp b/src/controls/FWebCtrl_WebImpl.cpp index 49bd587..13ba096 100755 --- a/src/controls/FWebCtrl_WebImpl.cpp +++ b/src/controls/FWebCtrl_WebImpl.cpp @@ -371,8 +371,6 @@ OnScriptConfirmRequested(Evas_Object* pView, const char* pMessage, void* pUserDa int modalResult = 0; - messageBox.SetOwner(&pImpl->GetPublic()); - r = messageBox.ShowAndWait(modalResult); SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, EINA_FALSE, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -857,28 +855,6 @@ OnFullScreenExited(void* pUserData, Evas_Object* pView, void* pEventInfo) void -OnFocusDownRequested(void* pUserData, Evas_Object* pView, void* pEventInfo) -{ - _WebImpl* pImpl = reinterpret_cast<_WebImpl*>(pUserData); - SysAssertf(pImpl, "Failed to request"); - -// _Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore())); -// pWebCore->SetFocusEnd(true); -} - - -void -OnFocusUpRequested(void* pUserData, Evas_Object* pView, void* pEventInfo) -{ - _WebImpl* pImpl = reinterpret_cast<_WebImpl*>(pUserData); - SysAssertf(pImpl, "Failed to request"); - -// _Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore())); -// pWebCore->SetFocusEnd(true); -} - - -void OnVibrationRequested(uint64_t duration, void* pUserData) { result r = E_SUCCESS; @@ -1166,8 +1142,6 @@ OnWebDataReceived(void* pUserData, Evas_Object* pView, void* pEventInfo) r = selectBox.Construct(false, L"Select application", 1); //+1 for Downloader SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); - selectBox.SetOwner(&pImpl->GetPublic()); - selectBox.AddListItem(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_BR_BODY_DOWNLOAD"), _SelectBox::LIST_ITEM_TYPE_NORMAL, false); r = selectBox.ShowAndWait(selectedIndex); SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); @@ -2553,8 +2527,6 @@ _WebImpl::ShowSelectBoxPopup(bool isMultiSelect, const String& title, Eina_List* __pSelectBox = std::move(pSelectBox); - __pSelectBox->SetOwner(&GetPublic()); - return __pSelectBox->ShowPopup(); } @@ -3661,9 +3633,6 @@ _WebImpl::SetEventListenerCallback(void) const evas_object_smart_callback_add(pWebNativeNode, "fullscreen,enterfullscreen", OnFullScreenEntered, this); evas_object_smart_callback_add(pWebNativeNode, "fullscreen,exitfullscreen", OnFullScreenExited, this); - evas_object_smart_callback_add(pWebNativeNode, "keyevent,down,not,handled", OnFocusDownRequested, this); - evas_object_smart_callback_add(pWebNativeNode, "keyevent,up,not,handled", OnFocusUpRequested, this); - ewk_view_open_panel_callback_set(pWebNativeNode, OnSelectUploadFile, const_cast< _WebImpl* >(this)); Ewk_Context* pContext = ewk_view_context_get(pWebNativeNode); SysAssertf(pContext, "Failed to get webkit instance."); @@ -3748,9 +3717,6 @@ _WebImpl::RemoveEventListenerCallback(void) const evas_object_smart_callback_del(pWebNativeNode, "fullscreen,enterfullscreen", OnFullScreenEntered); evas_object_smart_callback_del(pWebNativeNode, "fullscreen,exitfullscreen", OnFullScreenExited); - evas_object_smart_callback_del(pWebNativeNode, "keyevent,down,not,handled", OnFocusDownRequested); - evas_object_smart_callback_del(pWebNativeNode, "keyevent,up,not,handled", OnFocusUpRequested); - ewk_view_open_panel_callback_set(null, null, null); Ewk_Context* pContext = ewk_view_context_get(pWebNativeNode); SysAssertf(pContext, "Failed to get webkit instance."); @@ -4580,8 +4546,6 @@ _WebImpl::ShowAuthenticationPopup(const String& host, const String& realm, Authe int modalResult = 0; - __pAuthPopup->SetOwner(&GetPublic()); - r = __pAuthPopup->ShowAndWait(modalResult); SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -4610,8 +4574,6 @@ _WebImpl::ShowCertificateConfirmPopup(_CertificatePopupMode userConfirmMode, Ewk int modalResult = 0; - __pCertConfirmPopup->SetOwner(&GetPublic()); - r = __pCertConfirmPopup->ShowAndWait(modalResult); SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -4643,8 +4605,6 @@ _WebImpl::ShowPromptPopup(String msg, String defVal) __pPromptPopup = std::move(pPromptPopup); - __pPromptPopup->SetOwner(&GetPublic()); - r = __pPromptPopup->ShowPopup(); SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); @@ -4669,8 +4629,6 @@ _WebImpl::ShowUserConfirmPopup(_UserConfirmMode userConfirmMode, void* pPolicy, r = pUserConfirmPopup->Construct(userConfirmMode, pPolicy, true, msg); SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - pUserConfirmPopup->SetOwner(&GetPublic()); - int modalResult = 0; switch(userConfirmMode) @@ -4754,8 +4712,6 @@ _WebImpl::ShowUserConfirmPopupAsync(_UserConfirmMode userConfirmMode, void* pPol r = pUserConfirmPopup->Construct(userConfirmMode, pPolicy, false, msg); SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r)); - pUserConfirmPopup->SetOwner(&GetPublic()); - switch(userConfirmMode) { case USER_CONFIRM_USERMEDIA: