After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 459333 - Double-engine: Gecko and Webkit
Double-engine: Gecko and Webkit
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Backend
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Xan Lopez
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-07-22 20:48 UTC by Maciej (Matthew) Piechotka
Modified: 2007-07-30 11:13 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Webkit support (48.58 KB, patch)
2007-07-24 21:33 UTC, Xan Lopez
needs-work Details | Review
Fix misc bits (45.05 KB, patch)
2007-07-26 17:37 UTC, Xan Lopez
none Details | Review
Quote the test. (45.05 KB, patch)
2007-07-26 17:40 UTC, Xan Lopez
reviewed Details | Review
Latest (47.26 KB, patch)
2007-07-26 20:06 UTC, Xan Lopez
none Details | Review
Fix mozilla build (52.47 KB, patch)
2007-07-27 19:49 UTC, Xan Lopez
none Details | Review

Description Maciej (Matthew) Piechotka 2007-07-22 20:48:59 UTC
As far as I remember epiphany with webkit backend has been presented on GUADEC. It is kindly ask to include it to mainstream.
Comment 1 Xan Lopez 2007-07-22 21:26:53 UTC
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.
Comment 2 Xan Lopez 2007-07-24 21:33:24 UTC
Created attachment 92309 [details] [review]
Webkit support

Initial support for webkit:
* Add support for multiple backends (at compile time)
* Very preliminar support for WebKit
Comment 3 Christian Persch 2007-07-24 22:24:42 UTC
+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?
Comment 4 Vincent Untz 2007-07-24 22:26:20 UTC
Xan: I love you.
Comment 5 Diego Escalante Urrelo (not reading bugmail) 2007-07-25 05:55:36 UTC
Vuntz: I saw him first.
Comment 6 Xan Lopez 2007-07-26 17:37:04 UTC
Created attachment 92479 [details] [review]
Fix misc bits

Ok, I think this addresses all the bits from the review.
Comment 7 Xan Lopez 2007-07-26 17:40:03 UTC
Created attachment 92481 [details] [review]
Quote the test.

Agh, forgot to quote the test.
Comment 8 Christian Persch 2007-07-26 17:47:26 UTC
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.
Comment 9 Xan Lopez 2007-07-26 20:06:07 UTC
Created attachment 92492 [details] [review]
Latest

As commented on IRC, the moz build is broken now.
Comment 10 Maciej (Matthew) Piechotka 2007-07-27 07:33:59 UTC
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.
Comment 11 Xan Lopez 2007-07-27 19:49:39 UTC
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.
Comment 12 Christian Persch 2007-07-27 20:03:34 UTC
That's fine with me.
Comment 13 Xan Lopez 2007-07-27 20:31:51 UTC
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.