Web::LoadUrl(const String& url)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
ClearLastResult();
result r = E_SUCCESS;
Web::LoadUrl(const String& url, const HttpHeader& header)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::LoadUrlWithPostRequest(const String& url, const HttpHeader& header, const ByteBuffer& body)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::LoadData(const String& baseUrl, const ByteBuffer& content, const String& mime, const String& encoding)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
ClearLastResult();
result r = E_SUCCESS;
Web::StopLoading(void)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
ClearLastResult();
result r = E_SUCCESS;
Web::Reload(void)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
ClearLastResult();
result r = E_SUCCESS;
Web::IsLoading(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
return pWebImpl->IsLoading();
}
Web::CanGoBack(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
return pWebImpl->CanGoBack();
}
Web::CanGoForward(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
return pWebImpl->CanGoForward();
}
Web::GoBack(void)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
ClearLastResult();
result r = E_SUCCESS;
Web::GoForward(void)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
ClearLastResult();
result r = E_SUCCESS;
Web::GetBackForwardListN(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
ClearLastResult();
Web::SearchText(const String& word, bool searchForward)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
SysLog(NID_WEB_CTRL, "The current value of word is %ls, searchForward is %d", word.GetPointer(), searchForward);
Web::SetSetting(const WebSetting& setting)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::GetSetting(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
return pWebImpl->GetSetting();
}
Web::GetElementByPointN(const Point& point) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
ClearLastResult();
Web::GetElementByPointN(const FloatPoint& point) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
ClearLastResult();
Web::EvaluateJavascriptN(const String& scriptCode)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
ClearLastResult();
result r = E_SUCCESS;
Web::SetZoomLevel(float level)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::GetZoomLevel(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
return pWebImpl->GetZoomLevel();
}
Web::GetTitle(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
return pWebImpl->GetTitle();
}
Web::GetUrl(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
return pWebImpl->GetUrl();
}
Web::IsMimeSupported(const String& mime) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
SysLog(NID_WEB_CTRL, "The current value of mime is %ls", mime.GetPointer());
Web::SetLoadingListener(ILoadingListener* pLoadingListener)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
ClearLastResult();
result r = E_SUCCESS;
Web::SetDownloadListener(IWebDownloadListener* pDownLoadListener)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
ClearLastResult();
result r = E_SUCCESS;
Web::SetBlockSelectionPosition(const Point& startPoint)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::SetBlockSelectionPosition(const FloatPoint& startPoint)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::ReleaseBlock(void)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
pWebImpl->ReleaseBlock();
Web::GetBlockRange(Point& startPoint, Point& endPoint) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
pWebImpl->GetBlockRange(startPoint, endPoint);
Web::GetBlockRange(FloatPoint& startPoint, FloatPoint& endPoint) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
pWebImpl->GetBlockRange(startPoint, endPoint);
Web::GetTextFromBlock(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
return pWebImpl->GetTextFromBlock();
}
Web::SetScrollEnabled(bool enable)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
pWebImpl->SetScrollEnabled(enable);
Web::IsScrollEnabled(void) const
{
const _WebImpl* pWebImpl = const_cast< _WebImpl* >(_WebImpl::GetInstance(this));
- SysAssertf(pWebImpl != null, "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
return pWebImpl->IsScrollEnabled();
}
Web::SetWebUiEventListener(IWebUiEventListener* pUiEventListener)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
pWebImpl->SetWebUiEventListener(pUiEventListener);
Web::SetWebUiEventListenerF(IWebUiEventListenerF* pUiEventListener)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
pWebImpl->SetWebUiEventListenerF(pUiEventListener);
Web::SearchTextAllAsync(const String& text, bool caseSensitive)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::SearchNextAsync(bool searchForward)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::SetTextSearchListener(ITextSearchListener* pTextSearchListener)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
pWebImpl->SetTextSearchListener(pTextSearchListener);
Web::IsPrivateBrowsingEnabled(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
return pWebImpl->IsPrivateBrowsingEnabled();
}
Web::SetPrivateBrowsingEnabled(bool enable)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::ClearHistory(void)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::ClearCache(void)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::ClearCookie(void)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::ClearFormData(void)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::ClearLoginFormData(void)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::IsCookieEnabled(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
return pWebImpl->IsCookieEnabled();
}
Web::SetCookieEnabled(bool enable)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::SavePageAsPdf(const String& filePath, const Dimension* pSize)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::AddJavaScriptBridge(const IJavaScriptBridge& jsBridge)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::RemoveJavaScriptBridge(const IJavaScriptBridge& jsBridge)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
result r = E_SUCCESS;
Web::SetWebKeypadEventListener(IWebKeypadEventListener* pKeypadEventListener)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null, "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
pWebImpl->SetWebKeypadEventListener(pKeypadEventListener);
Web::GetFaviconN(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
ClearLastResult();
Web::Pause(void)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
pWebImpl->Pause();
}
Web::Resume(void)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructedl. Construct() should be called before use.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
pWebImpl->Resume();
}
Web::ScrollBy(const Tizen::Graphics::Point& diff)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
pWebImpl->ScrollBy(diff);
}
Web::ScrollTo(const Tizen::Graphics::Point& dest)
{
_WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
pWebImpl->ScrollTo(dest);
}
Web::GetScrollPosition(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
return pWebImpl->GetScrollPosition();
}
Web::GetPageSize(void) const
{
const _WebImpl* pWebImpl = _WebImpl::GetInstance(this);
- SysAssertf(pWebImpl != null && pWebImpl->HasValidNativeNode(), "Not yet constructed or Not attached to parent control.");
+ SysAssertf(pWebImpl, "Not yet constructed. Construct() should be called before use.");
return pWebImpl->GetPageSize();
}
#include <FApp_AppManagerImpl.h>
#include <FBase_StringConverter.h>
#include <FCnt_DownloadManagerImpl.h>
+#include <FCnt_ContentManagerImpl.h>
#include <FGrp_CoordinateSystem.h>
#include <FGrp_Screen.h>
#include <FIo_DatabaseImpl.h>
_DownloadManagerImpl* pManagerImpl = _DownloadManagerImpl::GetInstance();
SysTryReturnVoidResult(NID_WEB_CTRL, pManagerImpl, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ pManagerImpl->SetDownloadListener(pImpl);
r = pManagerImpl->Start(request, reqId);
SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
}
void
_WebImpl::Reload(void) const
{
- ewk_view_reload_bypass_cache(__pWebCore->GetWebNativeNode());
+ ewk_view_reload(__pWebCore->GetWebNativeNode());
}
String*
_WebImpl::EvaluateJavascriptN(const String& scriptCode)
{
- if (scriptCode.GetLength() == 0)
+ Evas_Object* pView = __pWebCore->GetWebNativeNode();
+ if (!pView)
{
return null;
}
r = __callbackList.Add(pPresenter.get());
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
- ewk_view_script_execute(__pWebCore->GetWebNativeNode(), pScript.get(), OnScriptExecuted, pPresenter.get());
+ ewk_view_script_execute(pView, pScript.get(), OnScriptExecuted, pPresenter.get());
std::unique_ptr<String> pResult(new (std::nothrow) String(L""));
SysTryReturn(NID_WEB_CTRL, pResult.get(), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
const PageNavigationList*
_WebImpl::GetBackForwardListN(void) const
{
+ Evas_Object* pView = __pWebCore->GetWebNativeNode();
+ if (!pView)
+ {
+ return null;
+ }
+
result r = E_SUCCESS;
_PageNavigationListImpl* pNavigationListImpl = null;
String url(L"");
String title(L"");
- Ewk_History* pEwkHistoryList = ewk_view_history_get(__pWebCore->GetWebNativeNode());
+ Ewk_History* pEwkHistoryList = ewk_view_history_get(pView);
SysTryReturn(NID_WEB_CTRL, pEwkHistoryList, null, E_SYSTEM, "[%s] A system error has been occurred. Failed to get full history.", GetErrorMessage(E_SYSTEM));
Ewk_History_Item* pEwkItem = ewk_history_nth_item_get(pEwkHistoryList, 0);
bool
_WebImpl::SearchText(const String& text, bool searchForward)
{
+ Evas_Object* pView = __pWebCore->GetWebNativeNode();
+ if (!pView)
+ {
+ return false;
+ }
+
result r = E_SUCCESS;
Ewk_Find_Options condition = static_cast< Ewk_Find_Options >(EWK_FIND_OPTIONS_SHOW_HIGHLIGHT | EWK_FIND_OPTIONS_CASE_INSENSITIVE);
_WebPresenter presenter;
presenter.InitAsyncProcess();
- r = SynchronizeSearch(SEARCH_SYNC, __pWebCore->GetWebNativeNode(), condition, text, searchForward, false, &presenter);
+ r = SynchronizeSearch(SEARCH_SYNC, pView, condition, text, searchForward, false, &presenter);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
int result = 0;
result
_WebImpl::SearchTextAllAsync(const Tizen::Base::String& text, bool caseSensitive)
{
+ Evas_Object* pView = __pWebCore->GetWebNativeNode();
+ if (!pView)
+ {
+ return E_SUCCESS;
+ }
+
result r = E_SUCCESS;
Ewk_Find_Options condition = EWK_FIND_OPTIONS_SHOW_HIGHLIGHT;
condition = static_cast <Ewk_Find_Options>(condition | EWK_FIND_OPTIONS_CASE_INSENSITIVE);
}
- r = SynchronizeSearch(SEARCH_ALL_ASYNC, __pWebCore->GetWebNativeNode(), condition, text, true, caseSensitive);
+ r = SynchronizeSearch(SEARCH_ALL_ASYNC, pView, condition, text, true, caseSensitive);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
result
_WebImpl::SearchNextAsync(bool searchForward)
{
+ Evas_Object* pView = __pWebCore->GetWebNativeNode();
+ if (!pView)
+ {
+ return E_SUCCESS;
+ }
+
SysTryReturnResult(NID_WEB_CTRL, __textSearch.__searchAll && __textSearch.__totalCount > -1, E_INVALID_OPERATION, "The SearchTextAllAsync() method is not called or completed.");
SysTryReturnResult(NID_WEB_CTRL, (searchForward && __textSearch.__currentIndex < __textSearch.__totalCount) || (!searchForward && __textSearch.__currentIndex > 1)
, E_OBJ_NOT_FOUND, "The Next instance is not available.");
condition = static_cast <Ewk_Find_Options>(condition | EWK_FIND_OPTIONS_BACKWARDS);
}
- r = SynchronizeSearch(SEARCH_NEXT_ASYNC, __pWebCore->GetWebNativeNode(), condition, __textSearch.__text, searchForward);
+ r = SynchronizeSearch(SEARCH_NEXT_ASYNC, pView, condition, __textSearch.__text, searchForward);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
const HitElementResult*
_WebImpl::GetElementByPointN(const FloatPoint& point) const
{
+ Evas_Object* pView = __pWebCore->GetWebNativeNode();
+ if (!pView)
+ {
+ return null;
+ }
+
SysTryReturn(NID_WEB_CTRL, Contains(point), null, E_INVALID_ARG, "[%s] The point must be contained in the bounds of a web control.", GetErrorMessage(E_INVALID_ARG));
result r = E_SUCCESS;
Point absPoint(_CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(point)));
- Ewk_Hit_Test* pEwkHitTest = ewk_view_hit_test_new(__pWebCore->GetWebNativeNode(), absPoint.x, absPoint.y, EWK_HIT_TEST_MODE_ALL);
+ Ewk_Hit_Test* pEwkHitTest = ewk_view_hit_test_new(pView, absPoint.x, absPoint.y, EWK_HIT_TEST_MODE_ALL);
SysTryReturn(NID_WEB_CTRL, pEwkHitTest, null, E_SYSTEM, "[%s] Failed to get hit test.", GetErrorMessage(E_SYSTEM));
Eina_Hash* pAttrHash = ewk_hit_test_attribute_hash_get(pEwkHitTest);
_WebImpl::ClearCache(void)
{
Ewk_Context* pContext = ewk_view_context_get(__pWebCore->GetWebNativeNode());
- SysAssertf(pContext, "Failed to get webkit instance.");
ewk_context_cache_clear(pContext);
}
{
Ewk_Context* pContext = ewk_view_context_get(__pWebCore->GetWebNativeNode());
Ewk_Cookie_Manager* pCookieManager = ewk_context_cookie_manager_get(pContext);
- SysAssertf(pCookieManager, "Failed to get webkit instance.");
ewk_cookie_manager_cookies_clear(pCookieManager);
}
_WebImpl::ClearFormData(void)
{
Ewk_Context* pContext = ewk_view_context_get(__pWebCore->GetWebNativeNode());
- SysAssertf(pContext, "Failed to get webkit instance.");
ewk_context_form_candidate_data_clear(pContext);
}
_WebImpl::ClearLoginFormData(void)
{
Ewk_Context* pContext = ewk_view_context_get(__pWebCore->GetWebNativeNode());
- SysAssertf(pContext, "Failed to get webkit instance.");
ewk_context_form_password_data_clear(pContext);
}
result
_WebImpl::SetBlockSelectionPosition(const FloatPoint& startPoint)
{
- Evas_Object* pWebNativeNode = __pWebCore->GetWebNativeNode();
-
- Ewk_View_Smart_Data* pSmartData = (Ewk_View_Smart_Data*) evas_object_smart_data_get(pWebNativeNode);
- SysAssertf(pSmartData, "Failed to request");
-
- Point absPoint( _CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(startPoint)));
-
- Eina_Bool ret = pSmartData->api->text_selection_down(pSmartData, absPoint.x, absPoint.y);
- if (ret)
+ Evas_Object* pView = __pWebCore->GetWebNativeNode();
+ Ewk_View_Smart_Data* pSmartData = (Ewk_View_Smart_Data*) evas_object_smart_data_get(pView);
+ if (pSmartData && pSmartData->api)
{
- pSmartData->api->text_selection_up(pSmartData, absPoint.x, absPoint.y);
+ Point absPoint( _CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(startPoint)));
- Ewk_Hit_Test* pEwkHitTest = ewk_view_hit_test_new(__pWebCore->GetWebNativeNode(), absPoint.x, absPoint.y, EWK_HIT_TEST_MODE_ALL);
- SysTryReturnResult(NID_WEB_CTRL, pEwkHitTest, E_SYSTEM, "Failed to get hit test.");
+ Eina_Bool ret = pSmartData->api->text_selection_down(pSmartData, absPoint.x, absPoint.y);
+ if (ret)
+ {
+ pSmartData->api->text_selection_up(pSmartData, absPoint.x, absPoint.y);
- String tagName(ewk_hit_test_tag_name_get(pEwkHitTest));
+ Ewk_Hit_Test* pEwkHitTest = ewk_view_hit_test_new(pView, absPoint.x, absPoint.y, EWK_HIT_TEST_MODE_ALL);
+ SysTryReturnResult(NID_WEB_CTRL, pEwkHitTest, E_SYSTEM, "Failed to get hit test.");
- if (tagName.Equals(L"INPUT", false) || tagName.Equals(L"TEXTAREA", false))
- {
- ewk_view_command_execute(pWebNativeNode, "SelectWord", 0);
- }
- else
- {
- Eina_Hash* pAttrHash = ewk_hit_test_attribute_hash_get(pEwkHitTest);
- char* pValue = reinterpret_cast< char* >(eina_hash_find(pAttrHash, "contenteditable"));
- if(pValue)
+ String tagName(ewk_hit_test_tag_name_get(pEwkHitTest));
+
+ if (tagName.Equals(L"INPUT", false) || tagName.Equals(L"TEXTAREA", false))
{
- ewk_view_command_execute(pWebNativeNode, "SelectWord", 0);
+ ewk_view_command_execute(pView, "SelectWord", 0);
+ }
+ else
+ {
+ Eina_Hash* pAttrHash = ewk_hit_test_attribute_hash_get(pEwkHitTest);
+ char* pValue = reinterpret_cast< char* >(eina_hash_find(pAttrHash, "contenteditable"));
+ if(pValue)
+ {
+ ewk_view_command_execute(pView, "SelectWord", 0);
+ }
}
}
}
Eina_Rectangle leftHandle;
Eina_Rectangle rightHandle;
+ EINA_RECTANGLE_SET(&leftHandle, 0, 0, 0, 0);
+ EINA_RECTANGLE_SET(&rightHandle, 0, 0, 0, 0);
+
ewk_view_text_selection_range_get(__pWebCore->GetWebNativeNode(), &leftHandle, &rightHandle);
startPoint.x = _CoordinateSystemUtils::ConvertToFloat(leftHandle.x);
result r = E_SUCCESS;
Evas_Object* pView = __pWebCore->GetWebNativeNode();
-
- Evas* pEvas = evas_object_evas_get(pView);
Ewk_Context* pContext = ewk_view_context_get(pView);
- SysAssertf(pEvas && pContext, "Failed to request");
-
const char* pUrl = ewk_view_url_get(pView);
-
- Tizen::Graphics::BufferInfo bufferInfo;
- Tizen::Base::ByteBuffer byteBuffer;
-
- std::unique_ptr<Bitmap> pBitmapImage(new (std::nothrow) Bitmap());
- SysTryReturn(NID_WEB_CTRL, pBitmapImage.get(), null, E_OUT_OF_MEMORY, "[%s] Memory Allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ Evas* pEvas = evas_object_evas_get(pView);
Evas_Object* pFavicon = ewk_context_icon_database_icon_object_add(pContext, pUrl, pEvas);
if (!pFavicon)
return null;
}
+ Tizen::Graphics::BufferInfo bufferInfo;
+
r = _Utility::GetPixelBufferFromEvasObject(pFavicon, bufferInfo);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
const Dimension dimension(bufferInfo.width, bufferInfo.height);
-
+ Tizen::Base::ByteBuffer byteBuffer;
+
r = byteBuffer.Construct((byte*)bufferInfo.pPixels, 0, dimension.height * dimension.width * 32, dimension.height * dimension.width * 32 );
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
- r = pBitmapImage->Construct(byteBuffer, dimension, BITMAP_PIXEL_FORMAT_ARGB8888);
+ std::unique_ptr<Bitmap> pImage(new (std::nothrow) Bitmap());
+ SysTryReturn(NID_WEB_CTRL, pImage.get(), null, E_OUT_OF_MEMORY, "[%s] Memory Allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ r = pImage->Construct(byteBuffer, dimension, BITMAP_PIXEL_FORMAT_ARGB8888);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, null, r, "[%s] Propagating.", GetErrorMessage(r));
- return pBitmapImage.release();
+ return pImage.release();
}
}
+void
+_WebImpl::OnDownloadCompleted(RequestId reqId, const String &path)
+{
+// _ContentManagerImpl::ScanFile(path);
+}
+
+
}}} // Tizen::Web::Controls