Fix defect of web package
authorhb.min <hb.min@samsung.com>
Sat, 15 Jun 2013 09:10:17 +0000 (18:10 +0900)
committerhb.min <hb.min@samsung.com>
Sat, 15 Jun 2013 09:10:17 +0000 (18:10 +0900)
Change-Id: Iaf4f5298c83e6e0e7afe65a3a094b04c4a026d98
Signed-off-by: hb.min <hb.min@samsung.com>
CMakeLists.txt
inc/FWebWebBookmark.h
packaging/osp-web.spec
src/controls/FWebCtrlWeb.cpp
src/controls/FWebCtrl_Web.cpp
src/controls/FWebCtrl_WebImpl.cpp
src/controls/FWebCtrl_WebImpl.h

index 6b44760..ebc51c4 100755 (executable)
@@ -41,6 +41,7 @@ INCLUDE_DIRECTORIES(
        /usr/include/osp/ui
        /usr/include/web
        /usr/include/vconf
+       /usr/include/media-content
        )
 
 SET (${this_target}_SOURCE_FILES
@@ -121,6 +122,7 @@ TARGET_LINK_LIBRARIES(${this_target} "-leina" )
 TARGET_LINK_LIBRARIES(${this_target} "-lewebkit2" )
 TARGET_LINK_LIBRARIES(${this_target} "-lcapi-web-favorites" )
 TARGET_LINK_LIBRARIES(${this_target} "-lcapi-network-connection" )
+TARGET_LINK_LIBRARIES(${this_target} "-lcapi-content-media-content")
 TARGET_LINK_LIBRARIES(${this_target} "-lpthread" )
 TARGET_LINK_LIBRARIES(${this_target} "-lvconf" )
 
index 1062aa3..d996c12 100755 (executable)
@@ -62,7 +62,7 @@ public:
        WebBookmark(void);
 
        /**
-        * This destructor overrides Osp::Base::Object::~Object().
+        * This destructor overrides Tizen::Base::Object::~Object().
         *
         * @since               2.1
         */
index 056c343..0b9a55d 100755 (executable)
@@ -12,6 +12,7 @@ BuildRequires:  cmake
 BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  pkgconfig(capi-network-connection)
 BuildRequires:  pkgconfig(capi-web-favorites)
+BuildRequires:  pkgconfig(capi-content-media-content)
 BuildRequires:  pkgconfig(dbus-1)
 BuildRequires:  pkgconfig(ecore)
 BuildRequires:  pkgconfig(edbus)
index 6a595fc..9848114 100755 (executable)
@@ -105,7 +105,7 @@ void
 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;
@@ -125,7 +125,7 @@ result
 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;
 
@@ -146,7 +146,7 @@ result
 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;
 
@@ -167,7 +167,7 @@ void
 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;
@@ -187,7 +187,7 @@ void
 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;
@@ -204,7 +204,7 @@ void
 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;
@@ -221,7 +221,7 @@ bool
 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();
 }
@@ -231,7 +231,7 @@ bool
 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();
 }
@@ -241,7 +241,7 @@ bool
 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();
 }
@@ -251,7 +251,7 @@ void
 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;
@@ -268,7 +268,7 @@ void
 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;
@@ -285,7 +285,7 @@ PageNavigationList*
 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();
 
@@ -300,7 +300,7 @@ bool
 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);
 
@@ -312,7 +312,7 @@ result
 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;
 
@@ -331,7 +331,7 @@ WebSetting
 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();
 }
@@ -341,7 +341,7 @@ HitElementResult*
 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();
 
@@ -356,7 +356,7 @@ HitElementResult*
 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();
 
@@ -371,7 +371,7 @@ String*
 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;
@@ -393,7 +393,7 @@ result
 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;
 
@@ -410,7 +410,7 @@ float
 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();
 }
@@ -420,7 +420,7 @@ String
 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();
 }
@@ -430,7 +430,7 @@ String
 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();
 }
@@ -440,7 +440,7 @@ bool
 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());
 
@@ -452,7 +452,7 @@ void
 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;
@@ -471,7 +471,7 @@ void
 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;
@@ -490,7 +490,7 @@ result
 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;
 
@@ -505,7 +505,7 @@ result
 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;
 
@@ -520,7 +520,7 @@ result
 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();
 
@@ -532,7 +532,7 @@ result
 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);
 
@@ -544,7 +544,7 @@ result
 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);
 
@@ -556,7 +556,7 @@ String
 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();
 }
@@ -566,7 +566,7 @@ result
 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);
 
@@ -580,7 +580,7 @@ bool
 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();
 }
@@ -590,7 +590,7 @@ void
 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);
 
@@ -602,7 +602,7 @@ void
 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);
 
@@ -614,7 +614,7 @@ result
 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;
 
@@ -631,7 +631,7 @@ result
 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;
 
@@ -648,7 +648,7 @@ void
 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);
 
@@ -660,7 +660,7 @@ bool
 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();
 }
@@ -670,7 +670,7 @@ result
 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;
 
@@ -690,7 +690,7 @@ result
 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;
 
@@ -708,7 +708,7 @@ result
 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;
 
@@ -726,7 +726,7 @@ result
 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;
 
@@ -744,7 +744,7 @@ result
 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;
 
@@ -762,7 +762,7 @@ result
 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;
 
@@ -780,7 +780,7 @@ bool
 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();
 }
@@ -790,7 +790,7 @@ result
 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;
 
@@ -810,7 +810,7 @@ result
 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;
 
@@ -827,7 +827,7 @@ result
 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;
 
@@ -842,7 +842,7 @@ result
 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;
 
@@ -857,7 +857,7 @@ void
 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);
 
@@ -869,7 +869,7 @@ Bitmap*
 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();
 
@@ -884,7 +884,7 @@ void
 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();
 }
@@ -894,7 +894,7 @@ void
 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();
 }
@@ -904,7 +904,7 @@ void
 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);
 }
@@ -914,7 +914,7 @@ void
 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);
 }
@@ -924,7 +924,7 @@ Point
 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();
 }
@@ -934,7 +934,7 @@ Dimension
 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();
 }
index c126153..3d4b7fe 100755 (executable)
@@ -566,9 +566,12 @@ _Web::GetRelativeCoordinate(FloatPoint absolutePoint)
 Evas_Object*
 _Web::GetWebNativeNode(void)
 {
-       SysTryReturn(NID_WEB_CTRL, __pEflWebkit.get(), null, E_INVALID_STATE, "[%s] Native node is in an invalid state.", GetErrorMessage(E_INVALID_STATE));
+       if (__pEflWebkit.get())
+       {
+               return __pEflWebkit->GetWebEvasObject();
+       }
 
-       return __pEflWebkit->GetWebEvasObject();
+       return null;
 }
 
 
index 4d61922..f589bd0 100755 (executable)
@@ -71,6 +71,7 @@
 #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>
@@ -1155,6 +1156,7 @@ OnWebDataReceived(void* pUserData, Evas_Object* pView, void* pEventInfo)
                                _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));
                        }
@@ -2646,14 +2648,15 @@ _WebImpl::StopLoading(void) const
 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;
        }
@@ -2669,7 +2672,7 @@ _WebImpl::EvaluateJavascriptN(const String& scriptCode)
        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));
@@ -2711,6 +2714,12 @@ _WebImpl::GetZoomLevel(void) const
 const PageNavigationList*
 _WebImpl::GetBackForwardListN(void) const
 {
+       Evas_Object* pView = __pWebCore->GetWebNativeNode();
+       if (!pView)
+       {
+               return null;
+       }
+
        result r = E_SUCCESS;
 
        _PageNavigationListImpl* pNavigationListImpl = null;
@@ -2725,7 +2734,7 @@ _WebImpl::GetBackForwardListN(void) const
        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);
@@ -2785,6 +2794,12 @@ CATCH:
 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);
@@ -2797,7 +2812,7 @@ _WebImpl::SearchText(const String& text, bool searchForward)
        _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;
@@ -2810,6 +2825,12 @@ _WebImpl::SearchText(const String& text, bool searchForward)
 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;
@@ -2819,7 +2840,7 @@ _WebImpl::SearchTextAllAsync(const Tizen::Base::String& text, bool caseSensitive
            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;
@@ -2829,6 +2850,12 @@ _WebImpl::SearchTextAllAsync(const Tizen::Base::String& text, bool caseSensitive
 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.");
@@ -2847,7 +2874,7 @@ _WebImpl::SearchNextAsync(bool searchForward)
                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;
@@ -3064,6 +3091,12 @@ _WebImpl::GetElementByPointN(const Point& point) const
 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;
@@ -3076,7 +3109,7 @@ _WebImpl::GetElementByPointN(const FloatPoint& point) const
 
        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);
@@ -3233,7 +3266,6 @@ void
 _WebImpl::ClearCache(void)
 {
        Ewk_Context* pContext = ewk_view_context_get(__pWebCore->GetWebNativeNode());
-       SysAssertf(pContext, "Failed to get webkit instance.");
 
        ewk_context_cache_clear(pContext);
 }
@@ -3244,7 +3276,6 @@ _WebImpl::ClearCookie(void)
 {
        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);
 }
@@ -3254,7 +3285,6 @@ void
 _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);
 }
@@ -3264,7 +3294,6 @@ void
 _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);
 }
@@ -3772,34 +3801,34 @@ _WebImpl::SetBlockSelectionPosition(const Point& startPoint)
 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);
+                               }
                        }
                }
        }
@@ -3836,6 +3865,9 @@ _WebImpl::GetBlockRange(FloatPoint& startPoint, FloatPoint& endPoint) const
        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);
@@ -3857,18 +3889,9 @@ _WebImpl::GetFaviconN(void) const
        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)
@@ -3876,18 +3899,24 @@ _WebImpl::GetFaviconN(void) const
                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();
 
 }
 
@@ -5232,4 +5261,11 @@ _WebImpl::HideFormDataWindow(bool delWindow)
 }
 
 
+void
+_WebImpl::OnDownloadCompleted(RequestId reqId, const String &path)
+{
+//     _ContentManagerImpl::ScanFile(path);
+}
+
+
 }}} // Tizen::Web::Controls
index fc7a729..30a0761 100755 (executable)
@@ -28,6 +28,7 @@
 #include <EWebKit2.h>
 #include <FBaseColArrayList.h>
 #include <FBaseString.h>
+#include <FCntIDownloadListener.h>
 #include <FUiIActionEventListener.h>
 #include <FUiIOrientationEventListener.h>
 #include <FUiITextEventListener.h>
@@ -138,6 +139,7 @@ class _WebImpl
        : public Tizen::Ui::_ContainerImpl
        , public Tizen::Ui::ITextEventListener
        , public Tizen::Web::Controls::_IWebEventListener
+       , public Tizen::Content::IDownloadListener
 {
 public:
        _WebImpl(Web* pWeb, Tizen::Ui::_Control* pCore);
@@ -432,6 +434,12 @@ private:
        result OnHandleWebUiEventF(const Tizen::Base::Runtime::IEventArg& arg);
        result OnHandleTextSearchEvent(const Tizen::Base::Runtime::IEventArg& arg);
 
+       virtual void OnDownloadCanceled(RequestId reqId) {}
+       virtual void OnDownloadCompleted(RequestId reqId, const Tizen::Base::String &path);
+       virtual void OnDownloadFailed(RequestId reqId, result r, const Tizen::Base::String &errorCode) {}
+       virtual void OnDownloadInProgress(RequestId reqId, unsigned long long receivedSize, unsigned long long totalSize) {}
+       virtual void OnDownloadPaused(RequestId reqId) {}
+
 private:
        bool __isFooterVisible;
        bool __isKeypadVisible;