diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-18 13:59:13 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-18 13:59:28 +0200 |
commit | 4d6084feccab99c0a7b3ecef26bb49c41dd50201 (patch) | |
tree | fd1195897f551eee6d5a15d07ff5733b15aa2a5c /Source/WebKit2/UIProcess/API/efl/ewk_view.cpp | |
parent | ae901828d4689ab9e89113f6b6ea8042b37a9fda (diff) | |
download | qtwebkit-4d6084feccab99c0a7b3ecef26bb49c41dd50201.tar.gz |
Imported WebKit commit ff52235a78888e5cb8e286a828a8698042200e67 (http://svn.webkit.org/repository/webkit/trunk@122948)
New snapshot that should fix the rendering issues recently introduced
Diffstat (limited to 'Source/WebKit2/UIProcess/API/efl/ewk_view.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/API/efl/ewk_view.cpp | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp index eb1e5e7b2..8b7132b48 100644 --- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp +++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp @@ -49,12 +49,21 @@ struct _Ewk_View_Private_Data { OwnPtr<PageClientImpl> pageClient; const char* uri; const char* title; + const char* theme; LoadingResourcesMap loadingResourcesMap; _Ewk_View_Private_Data() : uri(0) , title(0) + , theme(0) { } + + ~_Ewk_View_Private_Data() + { + eina_stringshare_del(uri); + eina_stringshare_del(title); + eina_stringshare_del(theme); + } }; #define EWK_VIEW_TYPE_CHECK(ewkView, result) \ @@ -276,12 +285,6 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData) static void _ewk_view_priv_del(Ewk_View_Private_Data* priv) { - if (!priv) - return; - - priv->pageClient = nullptr; - eina_stringshare_del(priv->uri); - eina_stringshare_del(priv->title); delete priv; } @@ -507,6 +510,8 @@ Evas_Object* ewk_view_base_add(Evas* canvas, WKContextRef contextRef, WKPageGrou ewk_view_policy_client_attach(toAPI(priv->pageClient->page()), ewkView); ewk_view_resource_load_client_attach(toAPI(priv->pageClient->page()), ewkView); + ewk_view_theme_set(ewkView, DEFAULT_THEME_PATH"/default.edj"); + return ewkView; } @@ -738,6 +743,24 @@ void ewk_view_intent_request_new(Evas_Object* ewkView, const Ewk_Intent* ewkInte #endif } +void ewk_view_theme_set(Evas_Object* ewkView, const char* path) +{ + EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData); + EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv); + + if (!eina_stringshare_replace(&priv->theme, path)) + return; + + priv->pageClient->page()->setThemePath(path); +} + +const char* ewk_view_theme_get(const Evas_Object* ewkView) +{ + EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0); + EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0); + return priv->theme; +} + void ewk_view_display(Evas_Object* ewkView, const IntRect& rect) { EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData); |