WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
patch for ewk_setting.
ewk_setting.patch (text/plain), 9.65 KB, created by
Eunmi Lee
on 2012-07-13 02:43:10 PDT
(
hide
)
Description:
patch for ewk_setting.
Filename:
MIME Type:
Creator:
Eunmi Lee
Created:
2012-07-13 02:43:10 PDT
Size:
9.65 KB
patch
obsolete
>diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog >index c90085c..836c484 100644 >--- a/Source/WebKit2/ChangeLog >+++ b/Source/WebKit2/ChangeLog >@@ -1,3 +1,30 @@ >+2012-07-13 Eunmi Lee <eunmi15.lee@samsung.com> >+ >+ [EFL][WK2] Add ewk_setting. >+ https://bugs.webkit.org/show_bug.cgi?id=91206 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add ewk_setting which wraps the WKPreferencesRef. >+ The ewk_setting will be created by ewk_view and it will be destroyed >+ when ewk_view is destroyed. The application can get the ewk_setting >+ from ewk_view using ewk_view_setting_get API. >+ >+ * PlatformEfl.cmake: >+ * UIProcess/API/efl/EWebKit2.h: >+ * UIProcess/API/efl/ewk_setting.cpp: Added. >+ (_Ewk_Setting): >+ (ewk_setting_new): >+ (ewk_setting_free): >+ * UIProcess/API/efl/ewk_setting.h: Added. >+ * UIProcess/API/efl/ewk_setting_private.h: Added. >+ * UIProcess/API/efl/ewk_view.cpp: >+ (_Ewk_View_Private_Data): >+ (_ewk_view_priv_del): >+ (ewk_view_base_add): >+ (ewk_view_setting_get): >+ * UIProcess/API/efl/ewk_view.h: >+ > 2012-07-12 Carlos Garcia Campos <cgarcia@igalia.com> > > [GTK] Add API to get HTTPS status to WebKit2 GTK+ >diff --git a/Source/WebKit2/PlatformEfl.cmake b/Source/WebKit2/PlatformEfl.cmake >index e5e54e6..43dbe22 100644 >--- a/Source/WebKit2/PlatformEfl.cmake >+++ b/Source/WebKit2/PlatformEfl.cmake >@@ -40,6 +40,7 @@ LIST(APPEND WebKit2_SOURCES > UIProcess/API/efl/ewk_intent.cpp > UIProcess/API/efl/ewk_intent_service.cpp > UIProcess/API/efl/ewk_navigation_policy_decision.cpp >+ UIProcess/API/efl/ewk_setting.cpp > UIProcess/API/efl/ewk_url_request.cpp > UIProcess/API/efl/ewk_url_response.cpp > UIProcess/API/efl/ewk_view.cpp >@@ -170,6 +171,7 @@ CONFIGURE_FILE(efl/ewebkit2.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc @O > SET (EWebKit2_HEADERS > "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/EWebKit2.h" > "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_context.h" >+ "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_setting.h" > "${CMAKE_CURRENT_SOURCE_DIR}/UIProcess/API/efl/ewk_view.h" > ) > >diff --git a/Source/WebKit2/UIProcess/API/efl/EWebKit2.h b/Source/WebKit2/UIProcess/API/efl/EWebKit2.h >index 8fa90ae..673401f 100644 >--- a/Source/WebKit2/UIProcess/API/efl/EWebKit2.h >+++ b/Source/WebKit2/UIProcess/API/efl/EWebKit2.h >@@ -31,6 +31,7 @@ > #include "ewk_intent.h" > #include "ewk_intent_service.h" > #include "ewk_navigation_policy_decision.h" >+#include "ewk_setting.h" > #include "ewk_url_request.h" > #include "ewk_url_response.h" > #include "ewk_view.h" >diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_setting.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_setting.cpp >new file mode 100644 >index 0000000..da7965f >--- /dev/null >+++ b/Source/WebKit2/UIProcess/API/efl/ewk_setting.cpp >@@ -0,0 +1,46 @@ >+/* >+ * Copyright (C) 2012 Samsung Electronics >+ * >+ * This library is free software; you can redistribute it and/or >+ * modify it under the terms of the GNU Library General Public >+ * License as published by the Free Software Foundation; either >+ * version 2 of the License, or (at your option) any later version. >+ * >+ * This program is distributed in the hope that it will be useful, >+ * but WITHOUT ANY WARRANTY; without even the implied warranty of >+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+ * Library General Public License for more details. >+ * >+ * You should have received a copy of the GNU Library General Public License >+ * along with this program; see the file COPYING.LIB. If not, write to >+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >+ * Boston, MA 02110-1301, USA. >+ * >+ */ >+ >+#include "config.h" >+#include "ewk_setting.h" >+ >+#include <Eina.h> >+#include <WebKit2/WKRetainPtr.h> >+ >+using namespace WebKit; >+ >+struct _Ewk_Setting { >+ WKRetainPtr<WKPreferencesRef> preferences; >+}; >+ >+Ewk_Setting* ewk_setting_new(WKPreferencesRef wkPreferences) >+{ >+ Ewk_Setting* setting = new Ewk_Setting; >+ setting->preferences = wkPreferences; >+ >+ return setting; >+} >+ >+void ewk_setting_free(Ewk_Setting* setting) >+{ >+ EINA_SAFETY_ON_NULL_RETURN(setting); >+ >+ delete setting; >+} >diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_setting.h b/Source/WebKit2/UIProcess/API/efl/ewk_setting.h >new file mode 100644 >index 0000000..de1c30f >--- /dev/null >+++ b/Source/WebKit2/UIProcess/API/efl/ewk_setting.h >@@ -0,0 +1,33 @@ >+/* >+ * Copyright (C) 2012 Samsung Electronics >+ * >+ * This library is free software; you can redistribute it and/or >+ * modify it under the terms of the GNU Library General Public >+ * License as published by the Free Software Foundation; either >+ * version 2 of the License, or (at your option) any later version. >+ * >+ * This program is distributed in the hope that it will be useful, >+ * but WITHOUT ANY WARRANTY; without even the implied warranty of >+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+ * Library General Public License for more details. >+ * >+ * You should have received a copy of the GNU Library General Public License >+ * along with this program; see the file COPYING.LIB. If not, write to >+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >+ * Boston, MA 02110-1301, USA. >+ * >+ */ >+ >+#ifndef ewk_setting_h >+#define ewk_setting_h >+ >+#ifdef __cplusplus >+extern "C" { >+#endif >+ >+typedef struct _Ewk_Setting Ewk_Setting; >+ >+#ifdef __cplusplus >+} >+#endif >+#endif // ewk_setting_h >diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_setting_private.h b/Source/WebKit2/UIProcess/API/efl/ewk_setting_private.h >new file mode 100644 >index 0000000..d517d19 >--- /dev/null >+++ b/Source/WebKit2/UIProcess/API/efl/ewk_setting_private.h >@@ -0,0 +1,30 @@ >+/* >+ * Copyright (C) 2012 Samsung Electronics >+ * >+ * This library is free software; you can redistribute it and/or >+ * modify it under the terms of the GNU Library General Public >+ * License as published by the Free Software Foundation; either >+ * version 2 of the License, or (at your option) any later version. >+ * >+ * This library is distributed in the hope that it will be useful, >+ * but WITHOUT ANY WARRANTY; without even the implied warranty of >+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+ * Library General Public License for more details. >+ * >+ * You should have received a copy of the GNU Library General Public License >+ * along with this library; see the file COPYING.LIB. If not, write to >+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >+ * Boston, MA 02110-1301, USA. >+ * >+ */ >+ >+#ifndef ewk_setting_private_h >+#define ewk_setting_private_h >+ >+#include "ewk_setting.h" >+#include <WebKit2/WKPreferences.h> >+ >+Ewk_Setting* ewk_setting_new(WKPreferencesRef); >+void ewk_setting_free(Ewk_Setting*); >+ >+#endif // ewk_setting_private_h >diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp >index eb1e5e7..e29cc8c 100644 >--- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp >+++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp >@@ -31,12 +31,14 @@ > #include "ewk_context.h" > #include "ewk_context_private.h" > #include "ewk_intent_private.h" >+#include "ewk_setting_private.h" > #include "ewk_view_loader_client_private.h" > #include "ewk_view_policy_client_private.h" > #include "ewk_view_private.h" > #include "ewk_view_resource_load_client_private.h" > #include "ewk_web_resource.h" > #include <wtf/text/CString.h> >+#include <WebKit2/WKPageGroup.h> > > using namespace WebKit; > using namespace WebCore; >@@ -50,6 +52,7 @@ struct _Ewk_View_Private_Data { > const char* uri; > const char* title; > LoadingResourcesMap loadingResourcesMap; >+ Ewk_Setting* setting; > > _Ewk_View_Private_Data() > : uri(0) >@@ -282,6 +285,7 @@ static void _ewk_view_priv_del(Ewk_View_Private_Data* priv) > priv->pageClient = nullptr; > eina_stringshare_del(priv->uri); > eina_stringshare_del(priv->title); >+ ewk_setting_free(priv->setting); > delete priv; > } > >@@ -503,6 +507,7 @@ Evas_Object* ewk_view_base_add(Evas* canvas, WKContextRef contextRef, WKPageGrou > } > > priv->pageClient = PageClientImpl::create(toImpl(contextRef), toImpl(pageGroupRef), ewkView); >+ priv->setting = ewk_setting_new(WKPageGroupGetPreferences(WKPageGetPageGroup(toAPI(priv->pageClient->page())))); > ewk_view_loader_client_attach(toAPI(priv->pageClient->page()), ewkView); > ewk_view_policy_client_attach(toAPI(priv->pageClient->page()), ewkView); > ewk_view_resource_load_client_attach(toAPI(priv->pageClient->page()), ewkView); >@@ -569,6 +574,14 @@ Eina_Bool ewk_view_stop(Evas_Object* ewkView) > return true; > } > >+Ewk_Setting* ewk_view_setting_get(Evas_Object* ewkView) >+{ >+ EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0); >+ EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, 0); >+ >+ return priv->setting; >+} >+ > /** > * @internal > * Load was initiated for a resource in the view. >diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.h b/Source/WebKit2/UIProcess/API/efl/ewk_view.h >index 58552ec..9b482dd 100644 >--- a/Source/WebKit2/UIProcess/API/efl/ewk_view.h >+++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.h >@@ -49,6 +49,7 @@ > > #include "ewk_context.h" > #include "ewk_intent.h" >+#include "ewk_setting.h" > #include "ewk_url_request.h" > #include "ewk_url_response.h" > #include "ewk_web_error.h" >@@ -255,6 +256,15 @@ EAPI Eina_Bool ewk_view_reload_bypass_cache(Evas_Object *o); > EAPI Eina_Bool ewk_view_stop(Evas_Object *o); > > /** >+ * Gets the Ewk_Setting of this view. >+ * >+ * @param o the view object to get Ewk_Setting >+ * >+ * @return the Ewk_Setting of this view >+ */ >+EAPI Ewk_Setting* ewk_view_setting_get(Evas_Object* o); >+ >+/** > * Delivers a Web intent to the view's main frame. > * > * @param o view object to deliver the intent to
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 91206
:
152196
|
152198
|
152408
|
152413
|
152420
|
152422
|
152424
|
152938
|
152951
|
157896
|
157930
|
158004
|
160600
|
161895
|
161898
|
161913
|
161915