WebKitGTK+ 1.2.2 and 1.2.3 released!

July 16th, 2010

Some of you may have noticed WebKitGTK+ 1.2.2 and 1.2.3 have been uploaded recently. Here’s their announcement =). A quick summary: if you’re running the 1.2.x series upgrade to 1.2.3.

Here’s some information regarding 1.2.2:

1.2.2 is an update to the 1.2.x stable series; along with a lot of crash, and misc fixes the biggest changes are: 1) the inclusion of a new API from the development branch (webkit_back_forward_list_clear()),
because it’s simple and will help with fixing a problem in Epiphany stable, and 2) lots of drag and drop, and clipboard related work by Martin Robinson.

Despite not being strictly fixes, we believe the stable series has a lot to gain from this work; a couple examples should illustrate this better: the changes included fix both a crash when dragging links from WebKit into other browsers, and the annoying bug that made the cursor get stuck in a grab when dragging, sometimes.

http://webkitgtk.org/webkit-1.2.2.tar.gz
MD5: 40338001324a38b977c163291e8816d3

Here’s some information regarding 1.2.3:

To some such a quick succession in releases may look like a brown paper bag was in order. Not strictly, but indeed 1.2.3 aims to fix some oversights with easy fixes. First of all, WebKit was not buildable with ICU 4.4.1, but thankfully a fix had already been checked in to trunk, so 1.2.3 includes that fix. Secondly, Debian’s Michael Gilbert has done a great job going through all CVEs released about WebKit, and including patches in the Debian package. 1.2.3 includes all of the commits from trunk to fix those, too.

http://webkitgtk.org/webkit-1.2.3.tar.gz
MD5: 0ab5c478a6f5b74a1ae96bf13a456662

You can read some more details, including the list of CVEs that were addressed, in the NEWS file:

http://gitorious.org/webkitgtk/stable/blobs/master/WebKit/gtk/NEWS

Enjoy!

Google’s pacman doodle in Epiphany/Midori?

May 21st, 2010

Google has had a very nice idea today, to celebrate Pacman’s aniversary: they made their logo become a playable HTML5 pacman. If you’re wondering why your WebKitGTK+ browser is not being able to play the game here’s why: Google is doing User-Agent sniffing and denying you the fun, sending a static image that you can click to perform a search instead of the game.

If you make Epiphany or Midori identify themselves as Chrome or Firefox, the game will work. I really don’t get this User Agent sniffing bullshit coming from Google. If you go to gconf-editor, and under epiphany->general set the user_agent key to “Mozilla/5.0 (X11; U; Linux; en-gb; rv:1.9.0.2) Gecko/2008092313 Firefox/3.8″ it works. I’m starting to seriously consider User Agent spoofing for *.google.com as a quirk on WebKitGTK+. Lame.

Update: as a protest, I’m making blog.kov.eti.br and kov.eti.br say Chrome/Chromium are not supported, by doing User Agent sniffing.
Update2: it’s been pointed out to me that the game is not HTML5 - it’s actually smart usage of divs, and flash *urgh* for the audio
Update3: thanks to a friend who works at Google getting in touch with pacman’s designer, it looks like it now works without faking U-A - I’m happy for this, thank you! Despite this good step forward, google is still denying us the nice fade in effect, and still sees us as ‘unsupported’ in Wave and similar products, so I’ll keep my protest for now.

WebKitGTK+ and WebM

May 20th, 2010

So you probably heard about WebM, right? It’s the awesome new media format being pushed by Google and a large number of partners, including Collabora, following the release of the VP8 video codec free of royalties and patents, along with a Free Software implementation.

It turns out that if you are a user or developer of applications that use the GStreamer framework, you can start taking advantage of all that freedom right away! Collabora Multimedia has developed, along with Entropy Wave GStreamer support for the new format, and the code has already landed in the public repositories, and is already being packaged for some distributions.

I just couldn’t wait the few days it will take for the support to be properly landed in Debian unstable, so I went ahead and downloaded all of the current packages from the pkg-gstreamer svn repository, built everything after having the libvpx-dev package installed, and went straight to a rather unknown, small video site called Youtube with my GStreamer-powered WebKitGTK+-based browser, Epiphany!:


Youtube showing a webm video in Epiphany

If you’re running Debian unstable, or any of the other distributions which will be lucky to get the new codecs, and support packages soon, you should be able to get this working out of the box real soon now. Check the tips on WebM’s web site on how to find WebM videos on youtube.

Inacreditável, mas continua lá.

May 17th, 2010

Lembra daquele cabo pendurado na minha rua? Pois é… nem mandar mensagem pra ouvidoria, nem passar o protocolo pra alguém falar com “conhecidos” na CEMIG parece ter ajudado. Já passou mais quase um mês e o cabo, apesar de alguém ter cortado um pedaço pra não ficar caído até a calçada, continua lá. Sugestões? =)

Cabo curtindo um bonito dia

A melhor energia do Brasil não é assim tão boa no meu bairro

April 21st, 2010

A CEMIG é a empresa prestadora de energia elétrica em Minas Gerais. É uma empresa de capital misto controlada pelo governo do Estado. Recentemente a CEMIG tem feito propaganda com frequência ultimamente por ter ganho grande reconhecimento no mercado financeiro como empresa que se preocupa com uso racional de energia. O slogan da campanha é “A melhor energia do Brasil”.

Tudo isso me deixa, como mineiro, muito orgulhoso, mas minha experiência pessoal com a qualidade da CEMIG poderia melhorar bastante. Além do fato de que o bairro Ouro Preto, onde estou morando agora, tem quedas de energia frequentes por quase qualquer chuva e de nós já termos ficado 15 horas sem energia num final de semana, há algo que me preocupa mais; isso aqui:

A melhor energia do Brasil

Esse cabo está aí pendurado há alguns meses. Parece ser a borracha de isolamento do cabo que saiu em parte do cabo. Já há mais de um mês eu liguei para a CEMIG e avisei do cabo, mas tudo que eu recebi de resposta foi um ‘avise às pessoas que não é pra encostar no cabo’. Essa primeira foto é do dia 2 de abril, bastante tempo depois do aviso. O cabo continuava lá no dia 17 (foto a seguir), e continua lá hoje.

Continua lá

Dessa vez reclamei foi pra ouvidoria, vamos ver se eles vem tirar esse cabo dali.

WebKit2 and WebKitGTK+

April 15th, 2010

So you’ve seen people talking about WebKit2, perhaps have seen someone claiming it “drops support for Linux“, and you’ve been wondering what the hell that means for WebKitGTK+. Well, welcome to the preemptive Q&A section with WebKitGTK+ maintainers =D. Let’s first explore some history so we can better understand what exactly is going on.

What exactly is WebKit2?

Currently, when we say “WebKit” we really mean one of the ports that are built on top of WebCore using the WebKit layer. WebCore is the part that does all of the hard Web-related work, WebKit an API layer that exposes WebCore functionality in a coherent way, so that the platform-specific ports can expose a public API layer for their applications to use, which is usually also called “WebKit”. This WebKit layer was designed by Apple to build the Mac, and Windows ports it maintains, and was later released as Free Software so that other ports, such as the GTK+, Qt, EFL ports could be built on top of it, instead of having to do all the heavy lifting from WebCore directly.

Current WebKit model

WebKit2 is nothing more than the second version of that interface, with a whole lot of changes on what you can expect from it, and on how it interacts with WebCore, and the platform-specific API and UI. First of all, the first WebKit was not API stable, and that interface was usually not made public by the various ports - they only exposed their platform-specific APIs. WebKit2 is being designed to provide a stable, cross-platform, C-based, non-blocking public API. This is huge. It will allow cross-platform code to be written without having to consider language, and port differences for basic functionality.

The second big change is the API will be made fully non-blocking. Currently most things you do are asynchronous already, but some of them may be completed in a synchronous ways (like, loading a string into WebKit instead of an URI). This is important for responsiveness, and is also a very important need for what comes next: process splitting.

WebKit2 will bring into WebKit proper the concept of splitting the UI process from the Web process, similar to what Chromium has. It also much more awesome than what Chrome has for a large number of reasons, including, but not limited to:

  1. It’s being contributed directly to the WebKit project, in a cross-platform way that lets ports such as WebKitGTK+ take advantage of it, instead of being shipped directly into Safari, like Google does with Chrome;
  2. The process separation goes bellow the API layer, meaning that all complexity involved in managing the process separation is handled by the library, and hopefully none of it leaks to the application using it; that means that applications like Devhelp and Yelp will be able to take advantage of this without having to make their lives more complicated;
There’s a much better diagram in WebKit2’s wiki page, but here goes a simplified version that demonstrates what I’m talking about:
WebKit2 model

What WebKit2 is not?

WebKit2 is NOT a rewrite of the whole WebKit stack. Webcore will continue mostly unchanged, and all ports currently building on top of it will keep working. It is also not a fork - the code lives in the same tree as the current version of WebKit, which will allow us to progressively move towards using this new, improved layer. WebKit2 is not Apple-only, and it is not dropping Linux support. Initial builds of the code that is being landed will likely show up building on Linux in the near future (specially because us porters are already eager to play with it).

What happens to WebKitGTK+?

In the near future, nothing special. We will continue working towards making it feature-complete, more stable, faster, and rocking on it as always. We will, though, start working out how we can best take advantage of WebKit2 in order to provide an even more awesome library for the G world. What this means is you can expect us to have a library that will provide a nice GTK+ widget, just like we have today, with a GObject-based API, like we have today, but that is built on top of this new WebKit2 infrastructure, taking advantage of the process-splitting, and the bigger focus on not blocking the UI thread. This should give us a platform that is more stable, and faster and more responsive than what we already have today.

The API is bound to change, of course, but the WebKit2 version of WebKitGTK+ will be a separate, parallel-installable library, and we will keep supporting the WebKit1 version while we work on making the new one at least as good as the current one. This is long term we’re talking here. We’ll likely see WebKitGTK+ 1.4, and 1.6 come to life before we are satisfied enough with WebKitGTK+2.

We hope this clears some of the doubts up, and lightens your hearts!

The WebKitGTK+ maintainers.

Designing from the bottom up

April 8th, 2010

Have you ever seen, while dealing in a support channel with a novice that just got in touch with the power of UNIX a conversation that goes like this?:

<novice> How can I process the output of a command, so that any number of spaces gets turned into a newline?
<seasoned> What are you trying to do?
<novice> I want to list the contents of a directory, but I want one per line.
<seasoned> ls -1

I have seen this numerous times, even as one of the actors. At times I was the novice, and many times in #debian-br I was the seasoned person trying to get the novice to focus on the problem they were trying to solve, not on the solution they thought was right.

While reading Máirín Duffy’s awesome paper about contributing to Free Software as a designer I couldn’t help but get that image brought to my memory again, and again. Specially when I read this part:

This means the language and even the approach FLOSS projects take to solving problems tend to be focused on implementation and technology rather than starting with a real-life user problem to solve and determining appropriate implementation afterwards.

That does sound like us, and it does sound like many of the solutions we come up with. While I was reading her paper, there was a reference I got very interested in checking. It’s a PDF with no links in it, so I only had the number of the reference. What I would have to do is I would have to scroll to the end of the paper, and find the reference, then somehow come back to the place I was looking at.

My most immediate thought was ‘you know, maybe evince should have tabs’. Why? Because I could open a new tab, go to the place the reference was at, and to ‘go back’ I just needed to close the new tab. Other options require much more effort - remembering the page I was at, or maybe the scroll offset more or less, and scan for the part of the text I was at. But those are not the only options! I could have the application set a marker on where I am, and have an easy command to go back to that marker, for instance, or evince could provide a way of ‘looking ahead’ without throwing away the current state at all. I’m pretty sure if I look around enough I will find tools that solve this problem in a fairly good way.

Now, I think that is exactly how we ended up with tabs in so many places they do not make sense in, and with so many ad-hoc solutions that solve our problems in half-assed ways. Even in browsers, we tend to use tabs as ad-hoc solutions to real problems we have no real solution to handle yet, such as “I want to check this other thing out real quick, but I do not want to lose any state of this page”, or “I want to check this out, but not right now, so let me open it, and then I’ll come back to it”, or maybe even “I want to look at this now, but since it is going to take a while to load, I might as well let it load in the background, and when I finish reading this I can go look at it”. These are the real problems we have, and I think we need better designs that solve them for real, instead of just patching them with the ad-hoc solution that tabs are.

The other extreme of the spectrum is, of course, not doing something, or even anything for lack of the perfect solution. Using ‘this is not a real solution’ as an excuse to not implement something that could serve as a temporary solution to a problem may cause more frustration than having to deal with the ad-hoc solution that is tested, and being applied to other applications for some time. After all, in many cases the ad-hoc solution can be later replaced with a proper one.

I guess this is another instance of the very difficult problem of balancing different realities: proper design is not always available to start something up, specially if the application is backed by individuals and not by a company or a bigger project that could bring in designers to work on it from the start. In this case having something up and running is usually a very important first step in a free software project - usually required to get enough interest to make it worth designing for.

Um exemplo de Brasil

March 27th, 2010

No começo dessa semana, o programa CQC (de quem eu ainda espero alguma piadinha pela mancada do Bóris, btw, porque isso é uma vergonha ;D) nos prestou um serviço importantíssimo: colocou nua e cruamente na TV um flagrante de funcionários públicos se apropriando de uma doação de TV de plasma feita pelo programa com um GPS dentro para que se soubesse onde foi parar. Mas não sem antes ter a exibição censurada por uma juíza sem noção que acatou um pedido de liminar do prefeito da cidade de Barueri, Rubens Furlan (PMDB - ugh).

Santa tecnologia, Batman. Mas o mais triste dessa história não foi essa instância em si ter ocorrido. O triste é que esse é só um exemplo do que acontece praticamente todos os dias, em praticamente todos os lugares do Brasil. O triste mesmo é que a chance de que cada um de nós tenha gente próxima - amigos, familiares que fazem coisas do tipo é muito alta.

E o pior mesmo é que essas mesmas pessoas reclamam da corrupção dos políticos, talvez tenham se indignado com o exibido no quadro, mas no dia seguinte foram para seus empregos públicos torrar dinheiro dos cidadãos imprimindo convites de festa dos filhos na gráfica do órgão, deixando de declarar ligações pessoais feitas em telefones celulares funcionais, passando gente conhecida na frente em serviços públicos, dando carteirada para entrar em shows e bares. Quem não conhece gente que, assim como as pessoas exibidas na reportagem, confundam o público com o privado? Eu conheço e conheci um monte na minha vida, até aqui.

Quando eu trabalhava no Ministério do Desenvolvimento Social, por exemplo, indo de um prédio a outro no carro do Ministério, para uma reunião, presenciei uma das cenas mais insólitas da minha vida: o motorista se gabava de como trabalhava “voluntariamente” num hospital público e falava de como estava se “agarrando” a um deputado que o poderia oficializar como funcionário no hospital. Para demonstrar quão bom ele era para o hospital, descreveu casos em que passou gente na frente em filas de atendimentos. “Que benção!” foi a resposta dos outros funcionários. “Benção”? Pra mim isso é crime. Claro que ele ajudou algumas pessoas, mas em detrimento de quantas? Pra exemplificar numa escala de dano reduzida, sabe aqueles motoristas que, numa fila, saem para o acostamento e voltam à pista quando encontram um obstáculo no acostamento? Eles se deram bem, mas todos os carros que estão entre a posição que eles ocupavam e a nova posição foram prejudicados. Que direito eles acham que têm de causar esse dano a tantos?

Num evento de Software Livre em Goiás que participei um tempo atrás conheci um policial civil que se gabava de encher o computador do trabalho de vídeos e músicas e de dar carteirada para entrar em shows e bares. Na primeira menção nossa de que isso não era muito bacana ele insinuou rapidamente que era melhor nós tomarmos cuidado com o que iríamos falar, porque ele nos poderia prender por desacato.

Eu poderia continuar dando exemplos um atrás do outro aqui. O triste não é o caso de Barueri. O triste é saber que isso é praticamente a regra, que se você vai contra a regra é em geral considerado “bobo” e principalmente que a maioria das pessoas que são corruptas não consideram sua corrupção “tão ruim quanto” a dos políticos e ainda tem a cara de pau de reclamar dos deputados que fazem como eles e se aproveitam da máquina, ou de ficar pegando no pé do presidente da República. Sinceramente, a corrupção é muito mais danosa e muito mais difundida pra baixo do segundo escalão.

No Brasil, se já não bastasse o gigantesco corporativismo dos funcionários públicos, pessoas que não fazem parte do funcionalismo acabam por defender os marajás (pelo menos quando não estão na fila de uma repartição). Por quê? Porque o sonho brasileiro é ser funcionário público, ter estabilidade garantida e poder trabalhar quando quer, então não existe interesse em tirar vantagens da posição que é cobiçada.

O que o CQC nos prestou foi um serviço importantíssimo. Foi uma injeção de indignação, que sempre faz falta para lembrar de quanto ainda falta para nós evoluirmos como sociedade. Espero que eles exponham mais e mais casos como esse. Quem sabe as pessoas não começam a ter vergonha de serem corruptas?

E ao Rubens Furlan eu quero desejar que reconsidere o significado dos seus vinte e quatro anos de “luta pela democracia” e se olhe no espelho. Babaca.

WebKitGTK+ 1.1.90 is out!

March 17th, 2010

We’re coming close to GNOME 2.30 release date, and we are getting ready to branch a stable release off of WebKit’s svn trunk in preparation for that. The idea of the stable branch is to try to maintain, and improve stability, with no additional features going in. Speaking of features, though, if you’ve been paying attention you will have noticed WebKitGTK+ has come a long way, now.

We came from not having basic features such as download support or openning links in new tabs, a more-or-less working HTML5 media implementation, and very few or missing in action developers to a thriving project, that gets more, and more attention, and contributors every day, with advanced features available, and rocking HTML5 media support that leaves little to be desired. It’s been just over one year since we started rolling mostly bi-weekly releases, each adding more awesome features.

There are still many issues, and we are not always equipped as a team to handle all the specifics of the engine ourselves, but I am really happy with the progress we’ve made, and really thankful for the support my employer Collabora has given all the way for this to happen, including the early work on plugins, and many other things before my time as a contributor. When I switched to using Epiphany with the WebKit backend as my default browser back in January 2009, that meant having to deal with a whole lot of misbehaviour, and work-around a lot of painful brokeness. These days I enjoy a snappy, functional browser that makes me happy.

If you haven’t done so yet, go download, and test the newest Epiphany, with the latest WebKitGTK+, and help us make the GNOME 2.30’s web browser rock even more!

WebKitGTK+ testing

February 19th, 2010

Most times when I blog about WebKitGTK+ it’s to talk about new features, and their usage in Epiphany. This time I’d like to tell those who care more about our test infrastructure. Like I said in my previous post, testing is something we take very seriously in WebKit land. It would be hard to get such a complex project, with such diversity of platforms moving forward without automated testing.

Apple hosts a buildbot master that controls a whole lot of build slaves, for many platforms. Today we added the fourth WebKitGTK+ build slave to the family: 64bits release. This makes up for 4 build slaves in total, 2 release bots sponsored by Collabora, and 2 debug bots sponsored by Igalia. These bots build WebKitGTK+, and then run what we call the “layout tests”. I use quotes there because the name is a bit misleading. Despite being HTML/JavaScript tests, they cover a whole lot of functionality, and tests for regressions in many areas, including security, crashes, animations, media playing, DOM behaviour, and javascript API behaviour. WebKitGTK+ bots currently run 6397 tests, which represent about half the available tests.

Our bots are also, as of today, the first ones to run platform-specific API tests. Almost a year ago we started writing small tests based on glib’s GTestSuite, and they have been very valuable in helping us make sure our API expectations aren’t breaking (at least unknowingly), and to be able to test things that would be very hard to have Layout Tests for. So, yay! Thanks to everyone involved.

Back to layout tests, now: the other half is currently skipped because of one of three main reasons:

  • We suck, and the test fails for real, either because we are missing implementation of something it uses (say, JavaScript isolated worlds, which has been recently added), or because our implementation is wrong
  • The test is a render dump, and we did not generate results for it yet
  • We lack functionality to run the test in our DumpRenderTree implementation

The first one is the worst of all. It means we have broken functionality, or lack web compatibility. The second one is less bad, we can usually trust layout, and rendering to be good because most of the rendering code is shared (thought there are exceptions, of course). Render dumps are a special way of representing the render tree as text, and we need to generate our own results because of differences in things such as font sizes. The third one is also pretty bad - it means we cannot test some features; DumpRenderTree is an application that uses the port’s API to run the tests, and provide additional JavaScript API through JavaScriptCore.

If you feel like helping WebKitGTK+, choosing a bunch of these (specially non-render-dump) skipped tests to make them pass could likely be a good first step =).