[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 14:38:25 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6b7a7552111d390a17788f2c1fae0d3ab0476309
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 14 18:36:47 2010 +0000

    2010-10-14  Ryuan Choi  <ryuan.choi at samsung.com>
    
            Reviewed by Eric Seidel.
    
            [EFL] Add setting api for enabling encoding detector
            https://bugs.webkit.org/show_bug.cgi?id=45427
    
            Add settings api for enabling encoding detector.
    
            * ewk/ewk_view.cpp:
            (_ewk_view_priv_new):
            (ewk_view_setting_encoding_detector_set):
            (ewk_view_setting_encoding_detector_get):
            * ewk/ewk_view.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69783 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
index 48b17a3..060d94f 100644
--- a/WebKit/efl/ChangeLog
+++ b/WebKit/efl/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-14  Ryuan Choi  <ryuan.choi at samsung.com>
+
+        Reviewed by Eric Seidel.
+
+        [EFL] Add setting api for enabling encoding detector
+        https://bugs.webkit.org/show_bug.cgi?id=45427
+
+        Add settings api for enabling encoding detector.
+
+        * ewk/ewk_view.cpp:
+        (_ewk_view_priv_new):
+        (ewk_view_setting_encoding_detector_set):
+        (ewk_view_setting_encoding_detector_get):
+        * ewk/ewk_view.h:
+
 2010-10-13  Leandro Pereira  <leandro at profusion.mobi>
 
         [EFL] Unreviewed. Build fix.
diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp
index 657a085..141c18d 100644
--- a/WebKit/efl/ewk/ewk_view.cpp
+++ b/WebKit/efl/ewk/ewk_view.cpp
@@ -115,6 +115,7 @@ struct _Ewk_View_Private_Data {
         Eina_Bool enable_scripts:1;
         Eina_Bool enable_plugins:1;
         Eina_Bool enable_frame_flattening:1;
+        Eina_Bool encoding_detector:1;
         Eina_Bool scripts_window_open:1;
         Eina_Bool resizable_textareas:1;
         Eina_Bool private_browsing:1;
@@ -570,6 +571,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
     priv->page_settings->setLocalStorageEnabled(true);
     priv->page_settings->setOfflineWebApplicationCacheEnabled(true);
     priv->page_settings->setUsesPageCache(true);
+    priv->page_settings->setUsesEncodingDetector(true);
 
     url = priv->page_settings->userStyleSheetLocation();
     priv->settings.user_stylesheet = eina_stringshare_add(url.prettyURL().utf8().data());
@@ -614,6 +616,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
     priv->settings.local_storage = priv->page_settings->localStorageEnabled();
     priv->settings.offline_app_cache = true; // XXX no function to read setting; this keeps the original setting
     priv->settings.page_cache = priv->page_settings->usesPageCache();
+    priv->settings.encoding_detector = priv->page_settings->usesEncodingDetector();
 
     // Since there's no scale separated from zooming in webkit-efl, this functionality of
     // viewport meta tag is implemented using zoom. When scale zoom is supported by webkit-efl,
@@ -2526,6 +2529,37 @@ Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object* o, const char* enco
     return EINA_TRUE;
 }
 
+/**
+ * Sets the encoding detector.
+ *
+ * @param o view object to set if encoding detector is enabled.
+ * @return @c EINA_TRUE on success and @c EINA_FALSE on failure
+ */
+Eina_Bool ewk_view_setting_encoding_detector_set(Evas_Object* o, Eina_Bool enable)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+    enable = !!enable;
+    if (priv->settings.encoding_detector != enable) {
+        priv->page_settings->setUsesEncodingDetector(enable);
+        priv->settings.encoding_detector = enable;
+    }
+    return EINA_TRUE;
+}
+
+/**
+ * Gets if the encoding detector is enabled.
+ *
+ * @param o view object to get if encoding detector is enabled.
+ * @return @c EINA_TRUE if encoding detector is enabled, @c EINA_FALSE if not or on errors.
+ */
+Eina_Bool ewk_view_setting_encoding_detector_get(Evas_Object* o)
+{
+    EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+    return priv->settings.encoding_detector;
+}
+
 const char* ewk_view_setting_cache_directory_get(const Evas_Object* o)
 {
     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
@@ -2744,8 +2778,8 @@ Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_Bool enab
 /**
  * Gets if the local storage is enabled.
  *
- * @param o view object to set if local storage is enabled.
- * @return @c EINA_TRUE if local storage is enabled, @c EINA_FALSE if not.
+ * @param o view object to get if local storage is enabled.
+ * @return @c EINA_TRUE if local storage is enabled, @c EINA_FALSE if not or on errors.
  */
 Eina_Bool ewk_view_setting_local_storage_get(Evas_Object* o)
 {
diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h
index aea9aca..d34a8ec 100644
--- a/WebKit/efl/ewk/ewk_view.h
+++ b/WebKit/efl/ewk/ewk_view.h
@@ -455,6 +455,9 @@ EAPI Eina_Bool    ewk_view_setting_local_storage_database_path_set(Evas_Object *
 EAPI Eina_Bool    ewk_view_setting_page_cache_get(Evas_Object* o);
 EAPI Eina_Bool    ewk_view_setting_page_cache_set(Evas_Object* o, Eina_Bool enable);
 
+EAPI Eina_Bool    ewk_view_setting_encoding_detector_get(Evas_Object* o);
+EAPI Eina_Bool    ewk_view_setting_encoding_detector_set(Evas_Object* o, Eina_Bool enable);
+
 /* to be used by subclass implementations */
 EAPI Ewk_View_Smart_Data *ewk_view_smart_data_get(const Evas_Object *o);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list