[epiphany] Update to WebKit API changes



commit 236f6ea468bcd2a8f9403227d61dc421746d5650
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Mon Feb 10 17:12:54 2014 +0100

    Update to WebKit API changes
    
    The process model enum names have changed.

 configure.ac             |    6 ++++++
 embed/ephy-embed-shell.c |    4 ++++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ee3eaba..7e2a9e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -233,6 +233,12 @@ AC_DEFINE_UNQUOTED([LSB_DISTRIBUTOR],["$LSB_DISTRIBUTOR"],[Distributor name])
 
 AC_DEFINE([EPIPHANY_COMPILATION],[1],[Compiling epiphany])
 
+# Remove this when new WebKit version is released with this API.
+ephy_save_LIBS=$LIBS
+LIBS="$LIBS $WEB_EXTENSION_LIBS"
+AC_CHECK_FUNCS(webkit_web_view_new_with_related_view)
+LIBS=$ephy_save_LIBS
+
 AC_CONFIG_FILES([
 Makefile
 data/Makefile
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 42e967f..07704c0 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -370,7 +370,11 @@ ephy_embed_shell_setup_process_model (EphyEmbedShell *shell,
     webkit_web_context_set_process_model (web_context, WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS);
     break;
   case EPHY_PREFS_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW:
+#ifdef HAVE_WEBKIT_WEB_VIEW_NEW_WITH_RELATED_VIEW
+    webkit_web_context_set_process_model (web_context, WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
+#else
     webkit_web_context_set_process_model (web_context, 
WEBKIT_PROCESS_MODEL_ONE_SECONDARY_PROCESS_PER_WEB_VIEW);
+#endif
     break;
   }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]