After finishing some loose ends in a remarkable place I found in Bairro Alto the GObject DOM bindings are in good enough shape to start doing some damage in this world (queue video that probably won’t appear in Planet GNOME, click into my blog to see it):
What you just (hopefully) saw is a GTK+ button that, when clicked, gets all the links from its cousin WebKitWebView and makes them do a small bounce, all with the DOM APIs you know and hate^Wlove exported through GObject.
For instance, to get all links simply call webkit_dom_document_get_links on the WebKitDOMDocument associated with the WebView, which will return a WebKitDOMHTMLCollection. Now we just iterate through the elements, get the WebKitDOMCSSStyleDeclaration associated to each one, and set the CSS properties we want on each one. Simple as that! No “evaluate this string as JavaScript”, and no using the JavaScript bindings through JavaScriptCore. In fact, since we are generating our own bindings instead of using the JavaScript ones, we can get the proper semantics for GObject toolkits instead of having to live with the decisions other people made for other languages and contexts. You can see the code snippet here; I use a two-step animation instead of using the full-blown css transitions because of a small technical issue that I didn’t want to fix before pushing this post, but of course we should be doing it right in the future. In fact, we should create proper APIs for CSS animations in general, not too different from what you have in, say, Clutter.
Most of the code for this is already in Webkit trunk, and now that the initial phase of the work is done I keep improving the code incrementally and pushing the patches to bugzilla, where my compadre Gustavo promptly reviews them. Now if you’ll excuse me I’ll go to expose all events as glib signals on the DOM objects, watch this space (or the upstream bug) for more updates. Happy hacking!
Starting this Saturday I’m going to spend a few days (at least 7) in Lisbon. Not really on holidays, but since my company is awesome and I just have to do my hours from anywhere I want I figured I might as well see a bit more of the world I live in.
So here’s the deal: if you live in the city, or near, and want to talk about free software, WebKit, GNOME, politics or metaphysics and get a free lunch, you can get that and in exchange you only have to show me around a bit. Or, better yet, do you belong to a LUG or any other social group with some interest in free software? If you want we can arrange some kind of GNOME/WebKit/Epiphany talk, or we can improvise some kind of hackfest (“Your first GNOME patch”?, “Become a WebKitGTK+ hacker in 4 hours”?). Or maybe you have better ideas? Just leave a comment in my blog, or drop me a few lines at ‘xan at gnome dot org’. See you around!
I hadn’t blogged about it yet, but the last weekend I crossed 10 time zones, one ocean and some insane border inspections to attend the first ever WebKit Contributors Meeting. I just returned to my hotel in San Francisco from two hectic days at the Apple campus in Cupertino, putting faces to the names I see daily in my WebKit work and attending some really interesting working sessions and hackatons. Of course a lot of productive discussions and coding happened, but I also value some incorporeal sense of unity and direction that you can get when you put a bunch of people that work together in a project physically in the same place for a couple of days; I’m already looking forward to next year’s meeting, and I thank Apple for organizing the event.
4 of us from Igalia have come to the US (Álex, Philippe, Juanjo and myself), and we’ll stay until Saturday to attend the Linux Collaboration Summit and do some fast-paced sight-seeing around the city (although we already enjoyed a great day off on Sunday with Martin around the city, including the awesome shoe-garden in Alamo Square).
To finish it off, I have to mention that I used the ever productive airplane time and some dead hours these days to advance quite a bit in the GObject DOM Bindings for WebKitGTK+, and that I can already correctly generate large enough portions of it to do actual applications and meaningful unit testing (basically, I cover Document and most of its dependencies!). More about this soon!
Home is an spectacular wake-up call for all of us living on this planet, if we’d only care to listen. Accompanied by a series of stunning aerial images of Earth, the history of our relationship with the environment is quickly reconstructed, and the unsustainability of our current practices made very explicit.
Its authors want the move to have the biggest exposure, and it can be freely distributed with their permission. I personally got it in HD from this torrent, but you can find alternative sources from a quick google search. Go and watch it when you have some time, I think it’s an hour and a half well spent.