2010-08-24 Lukasz Slachciak <l.slachciak@samsung.com>
authordemarchi@webkit.org <demarchi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Aug 2010 16:48:39 +0000 (16:48 +0000)
committerdemarchi@webkit.org <demarchi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Aug 2010 16:48:39 +0000 (16:48 +0000)
        Reviewed by Antonio Gomes.

        [EFL] Extended EFL WebView API to allow enable/disable Frame Flattening
        https://bugs.webkit.org/show_bug.cgi?id=44253

        * ewk/ewk_view.cpp:
        (ewk_view_setting_enable_frame_flattening_get):
        (ewk_view_setting_enable_frame_flattening_set):
        * ewk/ewk_view.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@65907 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/efl/ChangeLog
WebKit/efl/ewk/ewk_view.cpp
WebKit/efl/ewk/ewk_view.h

index b190d5c24f0742e73da2b0d915c19bd11b8848fa..9b3f30e49e665af07a36e7481c909b25a70697b8 100644 (file)
@@ -1,3 +1,15 @@
+2010-08-24  Lukasz Slachciak  <l.slachciak@samsung.com>
+
+        Reviewed by Antonio Gomes.
+
+        [EFL] Extended EFL WebView API to allow enable/disable Frame Flattening
+        https://bugs.webkit.org/show_bug.cgi?id=44253
+
+        * ewk/ewk_view.cpp:
+        (ewk_view_setting_enable_frame_flattening_get):
+        (ewk_view_setting_enable_frame_flattening_set):
+        * ewk/ewk_view.h:
+
 2010-08-23  Leandro Pereira  <leandro@profusion.mobi>
 
         [EFL] Build fix for platforms that do not require linking with "dl".
index 7a98bac02d42eebf3f34799df8a82b1c134c8cdf..4a100d72b3b7f97f89a73131af28e8831aa70b95 100644 (file)
@@ -102,6 +102,7 @@ struct _Ewk_View_Private_Data {
         Eina_Bool auto_shrink_images:1;
         Eina_Bool enable_scripts:1;
         Eina_Bool enable_plugins:1;
+        Eina_Bool enable_frame_flattening:1;
         Eina_Bool scripts_window_open:1;
         Eina_Bool resizable_textareas:1;
         Eina_Bool private_browsing:1;
@@ -589,6 +590,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
     priv->settings.auto_shrink_images = priv->page_settings->shrinksStandaloneImagesToFit();
     priv->settings.enable_scripts = priv->page_settings->isJavaScriptEnabled();
     priv->settings.enable_plugins = priv->page_settings->arePluginsEnabled();
+    priv->settings.enable_frame_flattening = priv->page_settings->frameFlatteningEnabled();
     priv->settings.scripts_window_open = priv->page_settings->allowScriptsToCloseWindows();
     priv->settings.resizable_textareas = priv->page_settings->textAreasAreResizable();
     priv->settings.private_browsing = priv->page_settings->privateBrowsingEnabled();
@@ -2291,6 +2293,41 @@ Eina_Bool ewk_view_setting_enable_plugins_set(Evas_Object* o, Eina_Bool enable)
     return EINA_TRUE;
 }
 
+/**
+ * Get status of frame flattening.
+ *
+ * @param o view to check status
+ *
+ * @return EINA_TRUE if flattening is enabled, EINA_FALSE
+ *         otherwise (errors, flattening disabled).
+ */
+Eina_Bool ewk_view_setting_enable_frame_flattening_get(const 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.enable_frame_flattening;
+}
+
+/**
+ * Set frame flattening.
+ *
+ * @param o view to set flattening
+ *
+ * @return EINA_TRUE if flattening status set, EINA_FALSE
+ *         otherwise (errors).
+ */
+Eina_Bool ewk_view_setting_enable_frame_flattening_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.enable_frame_flattening != enable) {
+        priv->page_settings->setFrameFlatteningEnabled(enable);
+        priv->settings.enable_frame_flattening = enable;
+    }
+    return EINA_TRUE;
+}
+
 Eina_Bool ewk_view_setting_scripts_window_open_get(const Evas_Object* o)
 {
     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
index 8dd61783c11f5efb3478924df7c1286c729fc833..9d5997c60a96fcc42a9683f5c64143e8ab813fc8 100644 (file)
@@ -389,6 +389,9 @@ EAPI Eina_Bool    ewk_view_setting_enable_scripts_set(Evas_Object *o, Eina_Bool
 EAPI Eina_Bool    ewk_view_setting_enable_plugins_get(const Evas_Object *o);
 EAPI Eina_Bool    ewk_view_setting_enable_plugins_set(Evas_Object *o, Eina_Bool enable);
 
+EAPI Eina_Bool    ewk_view_setting_enable_frame_flattening_get(const Evas_Object* o);
+EAPI Eina_Bool    ewk_view_setting_enable_frame_flattening_set(Evas_Object* o, Eina_Bool enable);
+
 EAPI Eina_Bool    ewk_view_setting_scripts_window_open_get(const Evas_Object *o);
 EAPI Eina_Bool    ewk_view_setting_scripts_window_open_set(Evas_Object *o, Eina_Bool allow);