From d9460e0e97859bf12ca578dc78802b6054771e7f Mon Sep 17 00:00:00 2001 From: "n.bansal" Date: Thu, 6 Sep 2012 13:28:25 +0900 Subject: [PATCH] [WK2] Adding default iconDatabasePath for favicon [Version] N/A [Project] N/A [Title] Adding default iconDatabasePath for favicon [BinType] N/A [Customer] N/A [Issue#] N/A [Problem] Favicon is not displayed in url bar after page load [Cause] Default iconDatabasePath was not set in WebContextEfl.cpp [Solution] APIs modified to set default path [Team] Browser(WCS) [Developer] n.bansal [Request] N/A [Horizontal expansion] N/A [SCMRequest] N/A Change-Id: Id89d0d2c414050ca3f8a03e92ded7ed48fe1eb7f --- Source/WTF/wtf/Platform.h | 1 + Source/WebKit2/UIProcess/API/efl/ewk_view.cpp | 11 +++++++++++ Source/WebKit2/UIProcess/efl/WebContextEfl.cpp | 4 ++++ 3 files changed, 16 insertions(+) mode change 100644 => 100755 Source/WTF/wtf/Platform.h mode change 100644 => 100755 Source/WebKit2/UIProcess/efl/WebContextEfl.cpp diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h old mode 100644 new mode 100755 index 44c595c..395e9c1 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -358,6 +358,7 @@ #define ENABLE_TIZEN_TILE_MATRIX_LIST 1 /* KwangHyuk Kim(hyuki.kim@samsung.com) : Tile matrix for each different zoom level */ #define ENABLE_TIZEN_ZOOM_CHECK_BEFORE_PAINTING 1 /* JungJik Lee(jungjik.lee@samsung.com) : background color set for tiled view */ #define ENABLE_TIZEN_TILE_REUSE_ALREADY_CREATED 1 /* JungJik Lee(jungjik.lee@samsung.com) : To reuse tiles already created without free operation */ +#define ENABLE_TIZEN_ICON_DATABASE 1 /* Nikhil Bansal(n.bansal@samsung.com) : To set the default iconDatabasePath for favicon */ #define ENABLE_TIZEN_ERROR_PAGE 1 /* Dongjae Kim(dongjae1.kim@samsung.com) : Not use webview's error page.*/ #define ENABLE_TIZEN_CREATE_FRAME_VIEW_ALWAYS 1 /* Kamil Blank(k.blank@samsung.com) Dongjae Kim(dongjae1.kim@samsung.com) : Create FrameView Always*/ #define ENABLE_TIZEN_FIX_EMAIL_ONE_TILE_DISPLAY 1 /* Jungjik Lee(jungjik.lee@samsung.com): Fixed email display only one tile area*/ diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp index 71e670c..cdbf605 100755 --- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp +++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp @@ -72,6 +72,11 @@ #include #include +#if ENABLE(TIZEN_ICON_DATABASE) +#include "WKContextPrivate.h" +#include "WebContext.h" +#endif + #if ENABLE(TIZEN_ERROR_PAGE) #include "WebErrorPageEfl.h" #endif @@ -1570,6 +1575,12 @@ Evas_Object* ewk_view_add_with_context(Evas* canvas, Ewk_Context* context) EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0); EINA_SAFETY_ON_NULL_RETURN_VAL(context, 0); +#if ENABLE(TIZEN_ICON_DATABASE) + //set default iconDatabasePath + String platformDefaultPath = toImpl(ewk_context_WKContext_get(context))->iconDatabasePath(); + WKContextSetIconDatabasePath(ewk_context_WKContext_get(context), WKStringCreateWithUTF8CString(platformDefaultPath.utf8().data())); +#endif + Evas_Object* ewkView = _ewk_view_base_add(canvas, ewk_context_WKContext_get(context), 0); EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, ewkView); diff --git a/Source/WebKit2/UIProcess/efl/WebContextEfl.cpp b/Source/WebKit2/UIProcess/efl/WebContextEfl.cpp old mode 100644 new mode 100755 index 60b844e..b75e610 --- a/Source/WebKit2/UIProcess/efl/WebContextEfl.cpp +++ b/Source/WebKit2/UIProcess/efl/WebContextEfl.cpp @@ -87,6 +87,10 @@ String WebContext::platformDefaultDatabaseDirectory() const String WebContext::platformDefaultIconDatabasePath() const { +#if ENABLE(TIZEN_ICON_DATABASE) + return WebCore::pathByAppendingComponent(WebCore::homeDirectoryPath(), ".webkit/iconDatabase/WebpageIcons.db"); +#endif + notImplemented(); return ""; } -- 2.7.4