From 8732ea5b4404639b8c0291df010fbc9cc9153ea3 Mon Sep 17 00:00:00 2001 From: Marcin Lapinski Date: Mon, 10 Aug 2015 11:18:01 +0200 Subject: [PATCH] Reintroduce removed ewk_view_screenshot_contents_get api call. [Issue#] https://bugs.tizen.org/jira/browse/TT-89 [Problem] Bookmark items do not show its thumbnail. [Cause] N/A [Sollution] Put ewk_view_screenshot_contents_get call back as it was moved to public api. [Verify] Bookmark items thumbnalis should be visible. Change-Id: I50538f737eebbce566565f5c6052266125d52610 --- services/WebKitEngineService/WebView.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/services/WebKitEngineService/WebView.cpp b/services/WebKitEngineService/WebView.cpp index 4bb27ed..89ef166 100644 --- a/services/WebKitEngineService/WebView.cpp +++ b/services/WebKitEngineService/WebView.cpp @@ -429,7 +429,7 @@ void WebView::confirmationResult(WebConfirmationPtr confirmation) std::shared_ptr WebView::captureSnapshot(int targetWidth, int targetHeight) { - BROWSER_LOGD("%s:%d %s NOT IMPLEMENTED, returning empty BrowserImage object", __FILE__, __LINE__, __func__); + BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__); M_ASSERT(m_ewkView); M_ASSERT(targetWidth); M_ASSERT(targetHeight); @@ -458,13 +458,12 @@ std::shared_ptr WebView::captureSnapshot(int if (area.w == 0 || area.h == 0) return noImage; - double scaleW = (double)targetWidth / (double)(area.w); - double scaleH = (double)targetHeight / (double)(area.h); + BROWSER_LOGD("[%s:%d] Before snapshot (screenshot) - look at the time of taking snapshot below",__func__, __LINE__); #if defined(USE_EWEBKIT) #if PLATFORM(TIZEN) - Evas_Object *snapshot = nullptr; - // TODO use ewk_view_screenshot_contents_get_async API here + Evas_Object *snapshot = ewk_view_screenshot_contents_get( m_ewkView, area, 1.0, evas_object_evas_get(m_ewkView)); + BROWSER_LOGD("[%s:%d] Snapshot (screenshot) catched, evas pointer: %p",__func__, __LINE__, snapshot); if (snapshot) return tizen_browser::tools::EflTools::getBrowserImage(snapshot); #endif -- 2.7.4