Epiphany extensions, WebKit porting



Hi gang,

In the run up to 2.24 I took a first stab at porting some of the remaining epiphany-extensions to work with our new WebKit browser engine.

GreaseMonkey is now in the default set of extensions and works for basic scripts. We aren't yet installing the callbacks to support the full GM API (I'm guessing the old implementation relied partly on the official GreaseMonkey extension). There are many examples of how to implement JS callbacks -- the nicest is the code in Midori, which provides utilities to bridge GObject with JavaScript. It might be worth picking this up or borrowing ideas from it -- at the very minimum the string conversion utility function. The callbacks that need to be implemented for GM are fairly straightforward -- for example there's a preferences API (get/set preference) which we can maybe hook up to GConf.

The auto-scroll extension now works. To get this going, I had to replace the DOM mouse event callback handlers with a standard GTK+ mouse down one. When we get GObject DOM support in WebKit, we'll be able to test the element the middle-click is made on to make sure we're not stealing clicks from web content, but for now it works well enough without that. Porting push-scroll and gestures should be a similar task -- you can basically copy what I do in auto-scroll.

If you're already an Epiphany or WebKit/GTK+ contributor, please feel free to commit porting changes without review in both epiphany and epiphany-extensions. We can back out any changes that cause trouble but right now we need to get moving to make sure there are no regressions by 2.24.

Epiphany core hackers: I need some help factoring out EphyEmbed and using WebKit API more directly in the core. To enable this, we need to standardise some convenience API to cast from EphyEmbed to WebView for incremental porting as Xan suggests. Of course, if anyone wants to take a stab at killing off EphyEmbed in one go, that's also good.

Porting is fun! Go go go!


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