GNOME Bugzilla – Bug 459333
Double-engine: Gecko and Webkit
Last modified: 2007-07-30 11:13:06 UTC
As far as I remember epiphany with webkit backend has been presented on GUADEC. It is kindly ask to include it to mainstream.
Working on it. Keep in mind that this is in the very firsts stages of development, so it is not even near to be usable as a day-to-day browser.
Created attachment 92309 [details] [review] Webkit support Initial support for webkit: * Add support for multiple backends (at compile time) * Very preliminar support for WebKit
+ENGINE=mozilla +AC_ARG_WITH([engine], + AC_HELP_STRING([--with-engine@<:@=mozilla|webkit@:>@], + [Which engine to build against @<:@mozilla@:>@]), + [ENGINE="$withval"]) Just do AC_ARG_WITH([engine],AS_HELP_STRING(...),[],[with_engine=mozilla]) and use $with_engine instead of $ENGINE. (Note AS_HELP_STRING, not AC_HELP_STRING). +AM_CONDITIONAL([ENABLE_MOZILLA_EMBED], test "$ENGINE" = "mozilla") quote the test, and I'd name this WITH_MOZILLA_BACKEND or so. - AC_DEFINE([HAVE_MOZILLA_PSM],[1],[Define if you have the mozilla NSS headers installed]) + AC_DEFINE([HAVE_GECKO_PSM],[1],[Define if you have the mozilla NSS headers installed]) Why rename this? +AM_CONDITIONAL([ENABLE_WEBKIT_EMBED], test "$ENGINE" = "webkit") +if test "x$ENGINE" = "xwebkit" ; then + AC_DEFINE([ENABLE_WEBKIT_EMBED],[1],[Define if you wish to enable webkit engine]) + PKG_CHECK_MODULES([WEBKIT], WebKitGdk) + AC_SUBST([WEBKIT_CFLAGS]) + AC_SUBST([WEBKIT_LIBS]) +fi # $ENGINE = webkit No "x$FOO" please, just the quoting is enough. Is WebKitGdk not versioned? If it is, should define a WEBKIT_REQUIRED variable and use that to check for >=. libephyembed_la_CPPFLAGS = \ -I$(top_builddir)/lib \ - -I$(top_srcdir)/embed/mozilla \ + -I$(top_srcdir)/embed/$(ENGINE) \ You shouldn't need the embed/mozilla or embed/ENGINE at all for libephyembed_la_CPPFLAGS, if you just remove the obsolete includes of mozilla-*.h in ephy-embed.c. + * Copyright �� 2000-2004 Marco Pesenti Gritti + * Copyright �� 2003, 2004 Christian Persch Fix the UTF-8. @@ -160,7 +160,7 @@ libpyphany_la_CPPFLAGS = \ -I$(top_builddir)/lib/widgets \ -I$(top_builddir)/lib/egg \ -I$(top_builddir)/embed \ - -I$(top_builddir)/embed/mozilla \ + -I$(top_builddir)/embed/$(ENGINE)\ What does pyphany need the backend includes for?
Xan: I love you.
Vuntz: I saw him first.
Created attachment 92479 [details] [review] Fix misc bits Ok, I think this addresses all the bits from the review.
Created attachment 92481 [details] [review] Quote the test. Agh, forgot to quote the test.
A few nits: + [with_engine=$withval], [with_engine=mozilla]) No need for the first part, just use []. +dnl ******************************* +dnl webkit renderer +dnl ******************************* #, not dnl. +if WITH_GECKO_ENGINE +libephyembed_la_CFLAGS += -I$(GECKO_INCLUDE_ROOT)/gtkembedmoz +endif What's this needed for? I think that can be removed. +G_DEFINE_TYPE_WITH_CODE (WebkitEmbedSingle, webkit_embed_single, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (EPHY_TYPE_EMBED_SINGLE, + ephy_embed_single_iface_init) + G_IMPLEMENT_INTERFACE (EPHY_TYPE_COOKIE_MANAGER, + ephy_cookie_manager_iface_init) + G_IMPLEMENT_INTERFACE (EPHY_TYPE_PASSWORD_MANAGER, + ephy_password_manager_iface_init) +#ifdef ENABLE_CERTIFICATE_MANAGER + G_IMPLEMENT_INTERFACE (EPHY_TYPE_CERTIFICATE_MANAGER, + ephy_certificate_manager_iface_init) +#endif + G_IMPLEMENT_INTERFACE (EPHY_TYPE_PERMISSION_MANAGER, + ephy_permission_manager_iface_init)) Would you mind applying that part to MozillaEmbedSingle too, instead of its hand-written get_type? :) The Makefile.am in doc/reference/ needs to be updated too.
Created attachment 92492 [details] [review] Latest As commented on IRC, the moz build is broken now.
Excuse me - will it be any transport from/to Webkit Engine? Shared informations if possible would be perfect but I doubt if they are allowed by engines.
Created attachment 92570 [details] [review] Fix mozilla build Ok. This one fixes the mozilla build, moves MozEmbedSingle to the nice macros and addresses all the previous comments. Splitting the WebKit CPPFLAGS makes the build fail for some reason, so I'd vote to fix it later if you don't mind.
That's fine with me.
Fixed in trunk, woo :) 2007-07-27 Xan Lopez <xan@gnome.org> * Makefile.am: * configure.ac: * doc/reference/Makefile.am: * embed/Makefile.am: * embed/ephy-embed-factory.c: (ephy_embed_factory_new_object): * embed/ephy-embed-persist.c: * embed/ephy-embed-shell.c: * embed/ephy-embed.c: * embed/webkit/Makefile.am: * embed/webkit/webkit-embed-find.cpp: * embed/webkit/webkit-embed-find.h: * embed/webkit/webkit-embed-persist.cpp: * embed/webkit/webkit-embed-persist.h: * embed/webkit/webkit-embed-single.cpp: * embed/webkit/webkit-embed-single.h: * embed/webkit/webkit-embed.cpp: * embed/webkit/webkit-embed.h: * src/Makefile.am: Add support for the WebKit engine, compile with --with-engine=webkit to activate. * embed/mozilla/mozilla-embed-single.cpp: Move to the G_DEFINE_TYPE_WITH_CODE macro.