X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=Source%2FWebKit2%2FUIProcess%2FAPI%2Fefl%2Fewk_context.cpp;h=ab51c9f9497f202b683340cfafa9727be218ce71;hb=6ef8e73ccf67afaa2663727d56a1f0da040a9107;hp=89b9a5efeebc0da320aeb5d036f35918e45e4046;hpb=95d20b4da50663057681af2ae20425adf5935032;p=framework%2Fweb%2Fwebkit-efl.git diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp index 89b9a5e..ab51c9f 100755 --- a/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp +++ b/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp @@ -81,6 +81,11 @@ #include #endif +#if ENABLE(TIZEN_HW_MORE_BACK_KEY) +#include +void* EflAssistHandle = 0; +#endif + using namespace WebCore; using namespace WebKit; @@ -147,6 +152,11 @@ Ewk_Context::Ewk_Context(WKContextRef context) m_formDatabase->open(FormDatabase::defaultDatabaseDirectoryPath(), FormDatabase::defaultDatabaseFilename()); #endif #endif + +#if ENABLE(TIZEN_HW_MORE_BACK_KEY) + if (!EflAssistHandle) + EflAssistHandle = dlopen("/usr/lib/libefl-assist.so.0", RTLD_LAZY); +#endif } Ewk_Context::~Ewk_Context() @@ -390,18 +400,7 @@ void Ewk_Context::addFormData(const char* url, WKDictionaryRef& formData, bool i WKStringRef wkKey = static_cast(WKArrayGetItemAtIndex(wkKeys.get(), i)); WKStringRef wkValue = static_cast(WKDictionaryGetItemForKey(formData, wkKey)); - int length = WKStringGetMaximumUTF8CStringSize(wkKey); - if (length <= 0) - continue; - OwnArrayPtr keyBuffer = adoptArrayPtr(new char[length]); - WKStringGetUTF8CString(wkKey, keyBuffer.get(), length); - - length = WKStringGetMaximumUTF8CStringSize(wkValue); - if (length <= 0) - continue; - OwnArrayPtr valueBuffer = adoptArrayPtr(new char[length]); - WKStringGetUTF8CString(wkValue, valueBuffer.get(), length); - formDataVector.append(pair(keyBuffer.get(), valueBuffer.get())); + formDataVector.append(pair(toImpl(wkKey)->string(), toImpl(wkValue)->string())); } m_formDatabase->addFormDataForURL(String::fromUTF8(url), formDataVector, isPasswordForm); @@ -1370,20 +1369,7 @@ Eina_Bool ewk_context_web_database_usage_for_origin_get(Ewk_Context* ewkContext, Eina_Bool ewk_context_web_indexed_database_delete_all(Ewk_Context* ewkContext) { #if ENABLE(TIZEN_INDEXED_DATABASE) - EINA_SAFETY_ON_NULL_RETURN_VAL(ewkContext, false); - - TIZEN_LOGI("ewkContext (%p)", ewkContext); - DEFINE_STATIC_LOCAL(const String, fileMatchPattern, ("*")); - DEFINE_STATIC_LOCAL(const String, indexedDatabaseDirectory, ("/opt/apps/com.samsung.browser/data/.webkit/indexedDatabases")); - - Vector paths = WebCore::listDirectory(indexedDatabaseDirectory, fileMatchPattern); - Vector::const_iterator end = paths.end(); - for(Vector::const_iterator it = paths.begin(); it != end; ++it){ - String path = *it; -#if ENABLE(TIZEN_FILE_SYSTEM) - WebCore::removeDirectory(path); -#endif - } + WKContextDeleteIndexedDatabaseAll(ewkContext->wkContext()); return true; #else