#define ENABLE_TIZEN_MEMORY_CONTROLLER 1 /* Krzysztof Czech(k.czech@samsung.com) : */
#define ENABLE_TIZEN_SUPPORT_RSS_LINK_PARSING 1 /* Jaesick Chang(jaesik.chang@samsung.com), Ryuan Choi(ryuan.choi@samsung.com) (WebKit1), KueHwan Sihn, Eunmi Lee(eunmi15.lee@samsung.com) (WebKit2): RSS Link Parsing patches */
#define ENABLE_TIZEN_EDITABLE_LINK_ACTIVE_SET 1 /* Who is owner ? */
-#define ENABLE_TIZEN_READER 1 /* Changhyup Jwa(ch.jwa@samsung.com) : Reader feature */
#define ENABLE_TIZEN_TEXT_ENCODING 1 /* Łukasz Ślachciak(l.slachciak@samsung.com) : */
#define ENABLE_TIZEN_DROPDOWN_SUPPORT 1 /* Gyuyoung Kim(gyuyoung.kim@samsung.com) : */
#define ENABLE_TIZEN_WEAK_ZOOM_VIEWPORT 1 /* JungJik Lee(jungjik.lee@samsung.com) */
#if ENABLE(TIZEN_GEOLOCATION)
Eina_Bool geolocation:1;
#endif
-#if ENABLE(TIZEN_READER)
- Eina_Bool enableReader: 1;
-#endif
#if ENABLE(TIZEN_EDITABLE_LINK_ACTIVE_SET)
Eina_Bool editableLinkBehavior:1;
#endif
priv->settings.domTimerInterval = priv->pageSettings->defaultMinDOMTimerInterval();
-#if ENABLE(TIZEN_READER)
- priv->settings.enableReader = true;
-#endif
#if ENABLE(TIZEN_PLUGIN_PARENT_WINDOW)
priv->settings.parentWindow = 0;
#endif
#endif
}
-Eina_Bool ewk_view_setting_enable_reader_get(const Evas_Object* ewkView)
-{
-#if ENABLE(TIZEN_READER)
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
- EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
- return priv->settings.enableReader;
-#else
- LOG_ERROR("TIZEN_READER is disabled. \n");
- return false;
-#endif
-}
-
-Eina_Bool ewk_view_setting_enable_reader_set(Evas_Object* ewkView, Eina_Bool enable)
-{
-#if ENABLE(TIZEN_READER)
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
- EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
- enable = !!enable;
- if (priv->settings.enableReader != enable)
- priv->settings.enableReader = enable;
- return true;
-#else
- LOG_ERROR("TIZEN_READER is disabled. \n");
- return false;
-#endif
-}
-
/**
* Get amount of plugins
*
return false;
}
-Eina_Bool
-ewk_view_reader_article_get(Evas_Object* ewkView, char** url, char** html)
-{
-#if ENABLE(TIZEN_READER)
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
- EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
-
- return false;
-#else
- LOG_ERROR("TIZEN_READER is disabled. \n");
- return false;
-#endif
-}
-
void ewk_view_screenshot_contents(const Evas_Object* ewkView, cairo_t* cr, const Eina_Rectangle* area)
{
#if ENABLE(TIZEN_EFL_EXT_API)
EAPI Eina_Bool ewk_view_setting_editable_link_active_set(Evas_Object *o, Eina_Bool clickable);
/* #endif */
-/* #if ENABLE(TIZEN_READER) */
-EINA_DEPRECATED EAPI Eina_Bool ewk_view_setting_enable_reader_get(const Evas_Object *o);
-EINA_DEPRECATED EAPI Eina_Bool ewk_view_setting_enable_reader_set(Evas_Object *o, Eina_Bool enable);
-/**
- * Call Reader::showArticle() and get the result of article extraction
- *
- * @param o view object to get scaled bounding box value
- * @param url url string which is newly allocated - should be freed by caller
- * @param html article html string which is newly allocated - should be freed by caller
- *
- * @return EINA_TRUE if article extracted successfully
- */
-EAPI Eina_Bool ewk_view_reader_article_get(Evas_Object *o, char **url, char **html);
-/* #endif */
-
/* #if ENABLE(TIZEN_GEOLOCATION) */
/**
* Gets if the geolocation feature is enabled.
#endif
}
-void WKPageCheckReaderArticle(WKPageRef page, void* context, WKPageGetReaderFunction callback)
-{
-#if ENABLE(TIZEN_READER)
- toImpl(page)->checkPageForReader(DictionaryCallback::create(context, callback));
-#endif
-}
-
void WKPageExecuteCommandWithArgument(WKPageRef page, WKStringRef command, WKStringRef argument)
{
toImpl(page)->executeEditCommandWithArgument(toImpl(command)->string(), toImpl(argument)->string());
WK_EXPORT void WKPageGetWebAppIconURL(WKPageRef page, void* context, WKPageGetWebAppIconURLFunction function);
// #endif
-/* WK2 Reader APIs and callback */
-typedef void (*WKPageGetReaderFunction)(WKDictionaryRef reader, WKErrorRef error, void* functionContext);
-WK_EXPORT void WKPageCheckReaderArticle(WKPageRef page, void* context, WKPageGetReaderFunction callback);
-
WK_EXPORT void WKPageExecuteCommandWithArgument(WKPageRef page, WKStringRef command, WKStringRef argument);
#ifdef __cplusplus
#include "ewk_view_notification_provider.h"
#endif
-#if ENABLE(TIZEN_READER)
-#include "WKDictionary.h"
-#endif
-
#if ENABLE(TIZEN_WEBKIT2_POPUP)
#include "WebPopupItem.h"
#include "WebPopupMenuProxyEfl.h"
Ewk_View_Rss_Items_Get_Callback rssItemsGetCallback;
Ewk_Web_App_Capable_Get_Callback webAppCapableCallback;
Ewk_Web_App_Icon_URL_Get_Callback webAppIconURLCallback;
-#if ENABLE(TIZEN_READER)
- Ewk_View_Reader_Callback readerCallback;
-#endif // #if ENABLE(TIZEN_READER)
#if ENABLE(TIZEN_WEB_STORAGE) && ENABLE(TIZEN_WEBKIT2_NUMBER_TYPE_SUPPORT)
Ewk_Web_Storage_Quota_Get_Callback webStorageQuotaCallback;
#endif
return true;
}
-#if ENABLE(TIZEN_READER)
-static void getReaderCallback(WKDictionaryRef reader, WKErrorRef error, void* functionContext)
-{
- EINA_SAFETY_ON_NULL_RETURN(functionContext);
- Ewk_View_Callback_Context* context = static_cast<Ewk_View_Callback_Context*>(functionContext);
-
- if (!reader || error) {
- delete context;
- return;
- }
-
- WKRetainPtr<WKStringRef> urlKey(AdoptWK, WKStringCreateWithUTF8CString("url"));
- WKRetainPtr<WKStringRef> htmlKey(AdoptWK, WKStringCreateWithUTF8CString("html"));
- WKStringRef urlString = static_cast<WKStringRef>(WKDictionaryGetItemForKey(reader, urlKey.get()));
- WKStringRef htmlString = static_cast<WKStringRef>(WKDictionaryGetItemForKey(reader, htmlKey.get()));
- ASSERT(urlString);
- ASSERT(htmlString);
-
- int htmlLength = WKStringGetMaximumUTF8CStringSize(htmlString);
- ASSERT(htmlLength);
- OwnArrayPtr<char> html = adoptArrayPtr(new char[htmlLength]);
- WKStringGetUTF8CString(htmlString, html.get(), htmlLength);
-
- ASSERT(context->readerCallback);
-
- int urlLength = WKStringGetMaximumUTF8CStringSize(urlString);
- if (urlLength) {
- OwnArrayPtr<char> url = adoptArrayPtr(new char[urlLength]);
- WKStringGetUTF8CString(urlString, url.get(), urlLength);
- context->readerCallback(context->ewkView, url.get(), html.get(), context->userData);
- } else {
- context->readerCallback(context->ewkView, "", html.get(), context->userData);
- }
-
- delete context;
-}
-#endif
-
-void ewk_view_reader_article_check(Evas_Object* ewkView, Ewk_View_Reader_Callback callback, void* userData)
-{
-#if ENABLE(TIZEN_READER)
- EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
- EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
- EINA_SAFETY_ON_NULL_RETURN(callback);
-
- Ewk_View_Callback_Context* context = new Ewk_View_Callback_Context;
- context->readerCallback = callback;
- context->ewkView = ewkView;
- context->userData = userData;
- WKPageCheckReaderArticle(toAPI(priv->pageClient->page()), context, getReaderCallback);
-#endif
-}
-
#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
void ewk_view_mark_for_sync(Evas_Object* ewkView)
{
//#endif
// #if OS(TIZEN)
-// #if ENABLE(TIZEN_READER)
-typedef struct _Ewk_View_Reader_Data Ewk_View_Reader_Data;
-// #endif
// #if ENABLE(TIZEN_MM_PLAYER)
typedef struct _Ewk_View_Html5_Video_Data Ewk_View_Html5_Video_Data;
// #endif
*/
typedef void (*Ewk_View_Rss_Items_Get_Callback)(Evas_Object* o, const Eina_List* items, void* user_data);
-// #if ENABLE(TIZEN_READER)
-/**
- * @brief ewk_view reader callback.
- *
- * @param o view object to get reader article
- * @param url base url of reader article
- * @param html reader article
- * @param user_data user data
- */
-typedef void (*Ewk_View_Reader_Callback)(Evas_Object* o, const char* url, const char* html, void* user_data);
-// #endif
-
/**
* \enum EwkFindOptions
* @brief Provides option to find word
*/
EAPI Eina_Bool ewk_view_text_zoom_set(Evas_Object* o, double text_zoom_factor);
-// #if ENABLE(TIZEN_READER)
-/**
- * Checks it is possible to parse article html for reader in the current webpage.
- * If it is possible to parse reader article, it calls callback with parsed html.
- *
- * @param o view object to check reader article
- * @param callback callback to get reader article
- * @param user_data user data
- */
-EAPI void ewk_view_reader_article_check(Evas_Object* o, Ewk_View_Reader_Callback callback, void* user_data);
-// #endif
-
EAPI void ewk_view_suspend(Evas_Object* o);
EAPI void ewk_view_resume(Evas_Object* o);
#include "PlatformString.h"
#endif
-#if ENABLE(TIZEN_READER) || ENABLE(TIZEN_MM_PLAYER)
+#if ENABLE(TIZEN_MM_PLAYER)
#include "WKString.h"
#endif
#if PLATFORM(GTK)
invalidateCallbackMap(m_printFinishedCallbacks);
#endif
-#if ENABLE(TIZEN_READER)
- invalidateCallbackMap(m_dictionaryCallbacks);
-#endif
Vector<WebEditCommandProxy*> editCommandVector;
copyToVector(m_editCommandSet, editCommandVector);
#if PLATFORM(GTK)
invalidateCallbackMap(m_printFinishedCallbacks);
#endif
-#if ENABLE(TIZEN_READER)
- invalidateCallbackMap(m_dictionaryCallbacks);
-#endif
Vector<WebEditCommandProxy*> editCommandVector;
copyToVector(m_editCommandSet, editCommandVector);
typedef GenericCallback<WKUInt32Ref> WebStorageQuotaCallback;
#endif
#endif
-#if ENABLE(TIZEN_READER)
-typedef GenericCallback<WKDictionaryRef> DictionaryCallback;
-#endif
#if PLATFORM(GTK)
typedef GenericCallback<WKErrorRef> PrintFinishedCallback;
#endif
void printMainFrame();
-#if ENABLE(TIZEN_READER)
-void checkPageForReader(PassRefPtr<DictionaryCallback>);
-void showReaderForArticle(const String& readerUrl, const String& readerHtml, uint64_t callbackID);
-#endif
#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
void recordingSurfaceSetEnableSet(bool enable);
#if ENABLE(TIZEN_WEB_STORAGE)
HashMap<uint64_t, RefPtr<WebStorageQuotaCallback> > m_quotaCallbacks;
#endif
-#if ENABLE(TIZEN_READER)
- HashMap<uint64_t, RefPtr<DictionaryCallback> > m_dictionaryCallbacks;
-#endif
HashSet<WebEditCommandProxy*> m_editCommandSet;
SaveRecentSearches(WTF::String name, Vector<String> searchItems)
LoadRecentSearches(WTF::String name) -> (Vector<String> result)
-#if ENABLE(TIZEN_READER)
- ShowReaderForArticle(WTF::String readerUrl, WTF::String readerHtml, uint64_t callbackID)
-#endif
#if ENABLE(TIZEN_WEBKIT_PASTEBOARD)
WriteDataToClipboardWithType(WTF::String data, uint64_t type)
#endif
#if ENABLE(TIZEN_CONTEXT_MENU_WEBKIT_2)
#include "WebContextMenuProxy.h"
#endif
-#if ENABLE(TIZEN_READER)
-#include "MutableDictionary.h"
-#endif
using namespace WebCore;
#endif
}
#endif
-#if ENABLE(TIZEN_READER)
-void WebPageProxy::checkPageForReader(PassRefPtr<DictionaryCallback> prpCallback)
-{
- RefPtr<DictionaryCallback> callback = prpCallback;
- if (!isValid()) {
- callback->invalidate();
- return;
- }
-
- uint64_t callbackID = callback->callbackID();
- m_dictionaryCallbacks.set(callbackID, callback.get());
- process()->send(Messages::WebPage::CheckPageForReader(callbackID), m_pageID);
-}
-
-void WebPageProxy::showReaderForArticle(const String& readerUrl, const String& readerHtml, uint64_t callbackID)
-{
- RefPtr<DictionaryCallback> callback = m_dictionaryCallbacks.take(callbackID);
- if (!callback)
- return;
-
- if (readerHtml.isEmpty()) {
- callback->performCallbackWithReturnValue(0);
- return;
- }
-
- RefPtr<MutableDictionary> readerData = MutableDictionary::create();
- readerData->set("url", RefPtr<WebString>(WebString::create(readerUrl)).get());
- readerData->set("html", RefPtr<WebString>(WebString::create(readerHtml)).get());
- callback->performCallbackWithReturnValue(readerData.get());
-}
-#endif
-
void WebPageProxy::initializeTizenClient(const WKPageTizenClient* client)
{
m_tizenClient.initialize(client);
void getFocusedInputElementDataList(Vector<String>&);
#endif
-#if ENABLE(TIZEN_READER)
- void checkPageForReader(uint64_t callbackID);
-#endif
-
#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL)
void scrollOverflow(const WebCore::FloatPoint&, bool& scrolled);
void setPressedNodeAtPoint(const WebCore::IntPoint&, bool& pressed);
GetFocusedInputElementDataList() -> (Vector<WTF::String> options)
#endif
-#if ENABLE(TIZEN_READER)
- CheckPageForReader(uint64_t callbackID)
-#endif
-
#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
RecordingSurfaceSetEnableSet(bool enable)
#endif
}
#endif
-#if ENABLE(TIZEN_READER)
-void WebPage::checkPageForReader(uint64_t callbackID)
-{
-}
-#endif
-
#if ENABLE(TIZEN_WEBKIT2_HIT_TEST)
#if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
static IntRect getFocusedRect(HitTestResult hitTestResult, Page* page)