Eyes Above The Waves

Robert O'Callahan. Christian. Repatriate Kiwi. Hacker.

Monday 29 October 2007

Linux Matters

I've been reading some dissastisfaction with the state of Firefox and Gecko on Linux. I feel I should comment because for a couple of years I was Novell's "Firefox guy" and did significant work on Gecko/GNOME integration.

I take exception to comments like:

However it geniunely seems that Mozilla does not care about Linux the slightest.

The truth is that during every development cycle we sink a ton of effort into making sure that Gecko and all its features work well on Linux. In 1.9 we've done lots of work to integrate with Pango, fix cairo-on-X issues, make sure <video> works, wrangle build-system and compiler issues, etc. If we didn't care about Linux, we'd just drop support for it. That would help us get Mac and Windows releases out faster, and after all they're where most users are. Fortunately we don't make decisions purely for economic reasons. I'd like to see people recognise that.

Part of the problem is that people are using Gecko 1.8.1 which is over two years old now. We'll ship Gecko 1.9 soon which has a ton of good stuff for Linux users:


  • Michael Ventnor (awesome volunteer contributor) has fixed a bunch of GTK theme bugs and turned on GTK themes for HTML form widgets --- very sexy. (MoCo is hiring him as an intern to carry on working on these and other issues during the summer.)
  • Teune van Steege (another contributor) has implemented GTK theme support for tree headers, which fixes the most important remaining non-native-looking UI element.
  • We've ripped out our own cross-platform drawing code and are now using cairo for everything. Along the way we've made a lot of contributions to cairo. We're trying really hard to be good community players here.
  • We integrate nicely with Pango now, using it to shape all complex scripts and also Latin text in many situations. By tweaking one pref you can disable the non-Pango fast path and get Pango for all text.
  • Thanks to Theppitak Karoonboonyanan and other contributors we use Pango line-breaking for scripts that have extraordinary line-breaking needs such as Thai, Lao, and Tibetan.
  • Karl Tomlinson (MoCo) designed and implemented "windowless plugin" support for X so that Linux can have platform parity with Mac and Windows users when Adobe supports it in their Linux Flash player (or if swfdec beats them to it!).
  • We've landed in 1.9 some of the GNOME integration work that I did for Novell, in particular startup notification support and dbus-based NetworkManager integration. (Some of the other work I did, like improved GConf integration has still to land ... just needs someone to push it in.)
  • Update Aaron Leventhal (IBM) and many other contributors have done a ton of work to make Firefox and the entire Mozilla platform accessible on Linux. This includes helping out with Linux-specific accessibility infrastructure and assistive technologies such as Orca.

There's definitely more we could do. I've been soliciting volunteers to implement RGBA translucent windows for X, for example, and it would be nice to support the GNOME print dialog. But I think we've made good progress.

One observation is that the number of Mozilla developers who are Linux users has dropped quite a bit as many of us (including me) have switched to Macs. I think this is partly due to Apple's hardware and software being very good and partly due to the fact that because Apple is evil, you can virtualize Linux on Mac but not the other way around. No doubt this has impacted Linux support a little bit. I still think that Linux is ultimately very important to Mozilla because proprietary client platforms will always pose a threat to the open Internet; the client vendors will constantly be trying to find ways to extend their control into the network. (And of course an open Internet is crucial to the survival of open clients, which is one of the main reasons I do what I do.)

Let me just address a few other complaints while I'm here:



  • The list of things Firefox could do to improve integration with the underlying environment goes on and on

    I'd like to see that list. Now that we have more heads, we might get some of those things done within MoCo, and I'd be more than happy to help other contributors get them done.
  • We have done a lot of work on memory consumption, some with help from Federico Mena-Quintero. We know this is a big deal. We're getting better in this and other areas and we're going to keep getting better.
  • Webkit is a good engine and getting it running in GNOME is a good thing, but be careful about comparing a two-year-old engine you use all the time (and hence see all the bugs of) with something that isn't quite there yet. Also, I would hate to see Apple with too much power over the free desktop ... keep options open.

  • WebKit ... happily uses GTK the way it was meant to be used instead of doing crappy hacks like cloning several instances of one widget and overloading its painting context.

    I'm not sure if this person knows what they're talking about, but if the Webkit/GTK port is using real GTK widgets in Web pages, then either they're doing some wizardry that I don't understand or they're going to have serious problems rendering content like this:


    (This demo might be mangled by feed readers etc.) Even Webkit on Mac and IE on Windows don't use real native widgets. I agree our theming approach on GTK is a crappy hack; I've been begging for years for a real GTK theme-drawing API we could use, like Mac and Windows provide.


Update Here's a screenshot of the Bugzilla query page in Firefox 3 trunk using Clearlooks:

Shiny Bugzilla


Comments

Jeff Walden
I could be wrong -- I've not tried it out -- but none of the existing screenshots on the main hacker's blog contain any in-web-content form elements. Appearances suggest that part of the port may not have been completed yet. I expect to be vociferously corrected with screenshots if my induction is incorrect.
I should also note I'm one of the Mac heathens using it because I can then use everything else. I'm not sure whether, given the option, I'd use Linux over OS X; I use it now because 1) I don't have any choice if I want to be able to use everything without rebooting, and 2) I *really really* like being able to just download random pre-compiled third-party software from websites and be able to escape the walled garden of my distro's repositories. All that said, there are enough gratuitous differences from everything else, and there are things I've grown to love in GNOME that aren't in OS X (the time/date widget drops down into a calendar, for one -- it's *unconscionable* that nobody else I've used does this yet), that I'd probably switch back if I could.
Per Thulin
We know it takes effort to target another platform, we know you care, and we appreciate it. I think part of what makes it look like you're not is that when reading your blogs, it often feels like your work revolves around Win/Mac, with Linux hanging on the side.
On the topic of Linux integration, have you looked at what Ubuntu has done in the latest release? Add-ons and extensions (Flash included) are handled with the package manager, and I downloaded an Ubuntu Firefox theme pack, and when turned on it sure looks a lot more native. I'm sure someone put down a lot of work on this -- is anything going back upstream?
I've been excited of Firefox 3 for a long time now, it sure looks good. I esp. like how you integrate more with underlying infrastructure. Keep it up!
Richard Weber
Hey, you might want to check out this webkit guy's blog, he just toasted you on most points
http://www.atoker.com/blog/2007/10/29/gtk-matters/
Benjamin Otte
I think what you are missing about Linux is not integrating the application with the desktop. That is your problem on Windows and OS X, where people are used to download a bundle that they can drop into their applications folder.
What you are missing about Linux is the Linux way. It's hard to integrate Mozilla (or even Mozilla technology) into other applications, because Mozilla doesn't ship libraries that are usable. Looking at Webkit-Gtk, it seems there's a lot of people very excited about the ability to have a widget for doing HTML and AJAX that just works. Also in other places, Mozilla works different than Linux applications do. As an example, I cannot easily build a Swfdec Mozilla plugin and have it just work. Why not? Well, there is both no development headers to link it against (Swfdec packages these headers themselves) and there is no place to install it in, because every Mozilla app wants their own directory.
Anyway, I don't wanna list bugs here. I just wanna make the statement that using Mozilla for development feels different from all the other things I'm using on Linux. It's just different.
Robert O'Callahan
Per: I don't know what Ubuntu has done. If they're just added a custom Firefox theme, that doesn't really need to go upstream.
Richard: "toasted"? He didn't address this post directly at all. He just listed some good things about Webkit/GTK+ ... which is fine, they are good things.
Benjamin: OK, I did miss that. Maybe Blizzard can help us get these issues nailed down and fixed.
Michael Ventnor
I can think of two mainstream complaints that we can easily fix for Fx 3:
a) Get rid of the shiny tab bar and use a natively constructed one
b) Use stock icons for the toolbar
Both can easily be fixed if/when browser/'s winstripe is forked to a gnomestripe. Removal of the go and search buttons would also help since GNOME typically doesn't have buttons next to textfields that duplicate the behaviour of the Enter key. But we really, really, really need a gnomestripe directory under browser/themes/.
Robert O'Callahan
Sounds good to me!
clee
It's worth pointing out that WebKit on Leopard does in fact render that button using native widgets (but seems to be confused as to where it should put the blue background for the span element following it).
http://c133.org/img/native_hello.png
Igor
We are talking about this blog post:
http://blog.mozilla.com/faaborg/2007/10/10/the-firefox-3-visual-refresh-system-integration/
Where a Mozilla guy sadly totally forgot about Linux platform...
I'm seeing Mozilla actually releasing Firefox *late* for Linux(and other Unix-like systems), just like Azureus people just done.
Egor Pelevin
@Robert
Ubuntu folks implemented a custom plugin finder service, which allows to install packaged plugins (e.g. Flash) with their package manager. I'm not sure this can go upstream though, keeping in mind that there are different package managers in Linux.
Also they redirected 'Get Extensions' link from Tools -> Add-ons to their own list of pre-packaged extensions. This sounds like a bad idea.
Robert O'Callahan
clee: it renders the button with the native *look*, sure, but it's not implemented as a *real native widget*. Just like we render buttons with the GTK+ look, but they're not real GTK+ native widgets.
Hmm, looks like my demo triggers some kind of Webkit bug rendering that span. Maybe something to do with the columns.
Igor:
> I'm seeing Mozilla actually releasing Firefox
> *late* for Linux(and other Unix-like systems)
When have we ever done that?
Egor: interesting. Sounds like the sort of thing that might go upstream.
Aaron Leventhal
Another item for your list:
* We've done a *ton* of work on making Firefox and the entire Mozilla platform accessible on Linux. This includes helping out with Linux-specific accessibility infrastructure and assistive technologies such as Orca.
Boris
It seems to me that there are two things being conflated here in the comments, and especially in the linked-to blog:
1) Firefox integration with GNOME. This has been getting a lot of work and getting better, as roc says.
2) Gecko embedding as a gtk widget. This hasn't been getting much work for years. Not has Gecko embedding of any kind. For a while some GNOME folks maintained gtkmozembed, but they seem to have stopped doing that, more or less.
dustin
http://noodge.org/random/linuxsupport.png
This is what that button looks like in Firefox 2.0.latest. I'd be curious to know what it looks like in gecko 1.9