SEP
11
2004

aKademy Hackers Port Mozilla to Qt/KDE

Among the most exciting things to come out of aKademy, the recent KDE Community World Summit, is a Qt port of Mozilla's Gecko rendering engine. This will give Gecko the full native look and feel of KDE/Qt, and make it available as a KPart, where it can provide an alternative HTML renderer for Konqueror.

"This is the best of both worlds for KDE" said Lars Knoll of the KHTML
project. "Integrating Gecko side by side with our existing renderer
opens a lot of doors, without any compromise of the hard work and clean
design that make KHTML what it is."

On the night before the start of the hacking marathon, a conversation
including, among others, Ian Geiser, Lars Knoll, Dirk Mueller, and Zack
Rusin happened onto the topic of integrating Gecko into KDE. Lars and
Zack jumped into Mozilla's code, to see how feasible such a plan might
be. Within four days (and before the end of the marathon) the two had
a working port: Gecko running on Qt. They credited the speed of
implementation to the maturity of the respective technologies and KDE's
component architecture (though the caliber of the hackers certainly
didn't hamper the effort). In their implementation, Qt is just another
platform for Mozilla, parallel to the drawing and widget layer for
Mozilla's other platforms like GTK, Win32, or MacOS X. Though the work
is on-going, the team is close to integrating Gecko into Konqueror,
connecting Gecko to the higher level browser machinery in Konqueror
such as KWallet and KCookieJar.

The Mozilla organization was supportive: "We are delighted to work with
the KDE community, both to extend the reach of Gecko, and to be part of
an effort bringing even greater depth to the KDE desktop. Making Qt
another platform for Mozilla, and Gecko another option for KDE is a win
for both users and developers" commented Mitchell Baker, President of
the Mozilla Foundation.

There have been previous starts at this idea in the past. Trolltech's
QtScape, some initial Corel work, and a Mozilla-based XPart, foundered
from lack of maintenance and little advocacy within the Mozilla
community. The current team will be full-fledged contributors to the
Mozilla code-base, with KDE people and mozilla.org behind the effort.
The Qt port will live and develop in Mozilla's CVS repository. The
code to embed the corresponding QWidget will live, naturally, in KDE's
repository.

Comments

"KHTML is great, but having the web browser integrated with the file manager is a real PITA."

That's your opinion, but a lot of us love it. I started my GUI life with OS/2, and was consequently weaned on the document-centric model of the desktop. Windows is the opposite with the application-centric model. What Konqueror does is to provide more document-centricity to the desktop. It's not perfect (nothing is), but being able to browse anything without worrying what application you're using is a major feature.

"a web browser and a file manager are two completely seperate concepts."

Not at all! Think of them as purpose-specific browsers. One browses the web and the other browses the file system. The actions for each are remarkably similar (back, home, follow, etc). Konqueror is a universal viewer with browsing capabilities. It's a generic browser. It's not just for the web or just for the file system. You can browse an ftp site as if it were a remote filesystem, or an audio CD as if it were a digital CD full of MP3 and OGG files. You can browse your photo gallery without having to open each photo in a separate viewer or creating a gallery html page. Dump xman and browse your man pages in Konqueror! Etc, etc, etc.


By David at Mon, 2004/09/13 - 5:00am

Exactly. What a lot of people seem to miss is that much so-called file-management is, in fact, document browsing. Go to some directory. View six out of eight files. Dump the first. Browse somewhere else. Check the contents of a text file.

I seldom use Konqueror for file management -- I more at home with bash -- but I use it a lot for document browsing. And that's where, for instance, the OS X finder falls short.


By Boudewijn Rempt at Mon, 2004/09/13 - 5:00am

I completely agree.

Take this. In Konqueror, split the content pane into left and right views. Then, click at the right view, click the button to go to your home direcotry. Then, click at the left view, typing "ftp.kernel.org" in the URL bar to get a dirctory listing. Then click and click to find your favoriate version of kernel, point on it, drag it to the right view. After some minutes, you got the .tgz file in your home directory.

Now just double click and double click on the .tgz file to get a virtual directory tree of the new kernel. Right click on the Readme file, select "open in new tab" to view the file in other tab. Or do the same with a .c file and view the source with syntax highlighting. With some setting, you can even view the file in the left view without opening other tab.

I never saw such capability in any other desktop environment. I love and adore Mozilla, but I must dump it after migrating to Konqueror and KDE.


By Monte Lin at Tue, 2005/06/07 - 5:00am

"Clicking on home takes you to your home directory."

For all those who don't like this behavior: Vote here: http://bugs.kde.org/show_bug.cgi?id=8333. But please, don't add comments before reading through all the comments already made. This bug is already a mess.

BTW: I can only select Encoding: "Plain Text" and the html tags don't work when submitting a comment to the dot. Does anybody know why? I am using Konqueror 3.3


By Michael Jahn at Sat, 2004/09/11 - 5:00am

People used to abuse HTML comments, so it was disabled.


By AC at Sun, 2004/09/12 - 5:00am

I'd like that very much.
I prefere Firefox, but I use konqueror because:

1. Little-to-none respect for (KDE's) file-associations in Firefox and Mozilla, when I click a link to a .pdf in my browser I want it to suggest opening it in the associated program. eg. kpdf.
(I know this might change, if/when KDE/GNOME starts the share MIME-types, but still)
2. Forms looks very bad (old) in Firefox.
3. Different filedialog from the rest of my apps (I use mustly KDE-apps)
4. Very bad printing dialog in Firefox.
5. Konqueror seems to start much faster.

This is NOT a bashing of Firefox, as I already said I prefere Firefox.

I think most of my complains would be resolved if Firefox were ported to Qt/KDE.

I miss my plugins and the better IMO pop-up protector. And oh, I don't want to change browser to use my home-banking, only Firefox+Blackdown-java-1.4.1 works with mine.


By Morten at Sun, 2004/09/12 - 5:00am

No adblock was the only think keeping me from switching to konq until I found http://www.privoxy.org. Give it a try. It runs circles around adblock, and because it runs as a proxy you can have all your browsers go through it, which is really great if you need to use different browsers for different things during the day.

For me the killer feature in KDE right now is spell checking in every text box. That's why I finally had to switch to konq.


By Scott at Sun, 2004/09/12 - 5:00am

Yes! I use/love KDE and Konqueror, but the tight browser/file integration drives me nuts.

To the various people below who point out that Konqueror is just a chrome around IOSlave plugins and that there are profiles etc. etc., you're missing the point. I know how Konqueror is built architecturally, but from a user perspective that is irrelevant. When I am MANAGING files, I want the application to work in one specific way. When I am viewing web pages (i.e., HTTP IOSlave to an apache server somewhere), I want it to behave VERY differently. I want my "browser application" to always have tabs visible, and my "file manager application" to never have tabs visible, because that's how I like to work. I want web URLs on my bookmark toolbar for my "browser application", and either none or common local URLs like my music directory or remote SFTP servers on my "file manager application". Doing that with a single unified program/chrome/framing system is extremely difficult. Perhaps profiles could help there, but the fact that I never figured them out is proof that they're not sufficient. :-)

If the solution is to have a KDEified Firefox as a standalone HTTP-viewing-only application and then just set Konqueror to direct HTTP to KFireFox or whatever, so be it. That would suit me fine.

As for the differences in the engines and their feature sets, welcome to the glory of Free Software. I love the auto-spellcheck in Konqueror. No reason that can't be ported into Gecko. I find the popup blocking in Firefox far superior to that in Konqueror. Port that over into KHTML/Konqueror. Let both engines share and improve. That's what makes FS/OSS superior to proprietary/closed software. Both sides can improve without anyone being bought out.

And if in the end we end up with Gecko-with-KHTML-inspired-improvements as the de facto default browser/engine for all FS/OSS web browsing, so much the better. This is the browser/engine that the entire security world and Homeland Security (in the US) is recommending over IE, so it's the one that clueful but pragmatic developers are going to support. If the OSS world can standardize on a unified "single target" browser and rendering engine, that provides a united front to make everyone's lives easier and try to stamp out IE, and making the Internet a safer place in the process.


By Larry Garfield at Mon, 2004/09/13 - 5:00am

I want to use Firefox, but I need that when I open a link to an image file, the file opens in a program different from Firefox. I can do it with konqueror, but I dont know if it is possible whit firefox
Can you help me?


By Leire at Fri, 2004/10/01 - 5:00am

This a very surprising and exciting! And it raises an even more important question: if the Gecko port offers all the features of the current engine and can be embedded easily, should KDE get rid of khtml + kjs?

Warning: uninformed user opinion below ;)
I am all for it. Now don't get me wrong, I use konqueror almost exclusively. And I don't think this is very likely to happen but one may speculate. The reasoning:
1. Gecko has much more exposure (even though there is Safari) and thus at least _some_ web developers pay attention to make their site compatible.
2. Reduce duplication of efforts. The OSS world would have only one major rendering engine.
3. IMHO Gecko is still a little more standards compliant.
4. The most important part last: devs could spend more time improving KDE instead of working on khtml :-)

What do you think?


By Michael Jahn at Sat, 2004/09/11 - 5:00am

Absolutely not..

1. there are only a few khtml developers anyways (e.g, less than 5 of them)
2. only one major open-source engine is not good
3. khtml has a more elegant design and probably has more expansion possiblities in the future. I bet khtml gets things like WebForms much quicker than Gecko does.


By anon at Sat, 2004/09/11 - 5:00am

agreed.. and, IMHO, the most important thing is: having our own html rendering engine can give us the ability to add features, and integrate them fully in KDE, without having to rely on an external (and cross-platform) project.


By fake at Sat, 2004/09/11 - 5:00am

Yes, I agree with all of the arguments made. Well, at the very least it is an impressive feat and choices don't hurt anybody. Thanks, devs :)


By Michael Jahn at Sat, 2004/09/11 - 5:00am

well.. i don't agree.

the future is: cross-platform. and gecko has it


By FJ at Sun, 2004/09/12 - 5:00am

Thanks for allowing all of us a glance in that glass bowl of yours.


By Andre Somers at Sun, 2004/09/12 - 5:00am

What is wrong with the cross-platformness of khtml? It's already the defacto native browser of OSX, the native engine of the most popular Linux desktop, and will be arriving in Windows soon.


By anon at Sun, 2004/09/12 - 5:00am

There are things Mozilla can't do. And Opera can't, too.

Only Konqueror deals correctly with certain sites. I'm not sure whether it's because of KHTML, it probably has to do with going beyond standards to support certain "javascript" proprietary extensions.

While I'm not exactly enthusiastic about this, it is more or less like Openoffice.org excellent compatibility with the .doc format: it is essential to make proprietary software, erm, less relevant.

So, yes, I think this Gecko porting is great (and technically impressive, considering the short time they spent). Nonetheless, what I think is more important is that people are starting to exchange ideas and programs.

Isn't it what open/free people are supposed to do best? :-) I think this is really good to the spirit.

Good luck to y'all!


By Gr8teful at Sat, 2004/09/11 - 5:00am

www.monark.com.br, click on "Produtos" and after a new page loads, click on words beside red arrows on the left. Expanded submenus only appear in Konqueror.

I'm not affiliated with such company.


By Gr8teful at Sat, 2004/09/11 - 5:00am

The website works great in Internet Explorer 6.0 SP1, which is what it was designed for, I am 100% sure.
Who the fuck cares what it looks like on a web browser running on a dead os that *NOBODY* uses.


By timecop at Sun, 2004/09/12 - 5:00am

Never feed the trolls & all that, but still...

First: the usage of a webbrowser for a given website is never 100% IE6. So the $$$ question should come to mind: which of my customers am I p*ss*ng off?

Second: be careful if you target an academic audience or certain other large organisations. Chances are that the people there are still forced to use Netscape 4.7 on an NT4 system or something.

As long as websites are still not build using 100% standard code, choice is good.

'nough said.


By matt at Sun, 2004/09/12 - 5:00am

Why post to this site?


By David at Mon, 2004/09/13 - 5:00am

You make a good point. I was with a group of Mac users last weekend. One worked for Apple, one for a major ISP, and one for a law firm. All used both Camino and Safari. All said that there were some sites Camino could render and Safari not, and others that Safari could render and Camino not.

And all agreed that they preferred Safari.


By David at Mon, 2004/09/13 - 5:00am

> should KDE get rid of khtml + kjs?

No! This is exactly the kind of senseless prattle that we should avoid as somebody is bound to think it's inside information. I was hacking Quanta only a couple meters from Lars and Zack, and KHTML is Lars' baby, along with a few other developers. I don't see them ditching it, thankfully.

> Warning: uninformed user opinion below ;)

Yes indeed. And while everyone has a right to their opinions we should also recognize that it's generally better to direct things from informed opinions. ;-)

> 1. Gecko has much more exposure (even though there is Safari) and thus at least _some_ web developers pay attention to make their site compatible.

Neither has enough market share to make a difference, but together they approach significance. FYI it's W3C standards compliance that serious web developers (who are not just using FlunkPage) want. That's a compliance issue with CSS-2 mainly right now.

> 2. Reduce duplication of efforts. The OSS world would have only one major rendering engine.

Remember KHTML working great when Mozilla was at 0.8 and less and had egregious rendering errors and couldn't even show form buttons right among other things? Go look at www.w3c.org and read everything there (that should take about a year) and tell me that you want to trust everything to one rendering engine. If that logic worked why not use IE? One is what MS is about. Choice is what OSS is about.

> 3. IMHO Gecko is still a little more standards compliant.

Okay, a little, but not by much. Now look at the architecture. Why did Apple choose KHTML when their team members were involved with Mozilla even though it was slightly more compliant? The answer to that question is why dropping it is utterly nuts.

> 4. The most important part last: devs could spend more time improving KDE instead of working on khtml :-)

BZZT!!! News flash! KHTML is part of KDE. Flash number two... uninformed users _shouldn't_ decide what developers work on... In fact since they don't what's the point? It's interesting that people almost always offer opinions with no substantial basis but rarely ask questions to determine if the facts support their initial supposition.

Informed software decisions by developers based on their assessments is why OSS is growing so fast and producing such respected software. What has been the problem with commercial software? Bean counters, investors, cliche marketing types and clueless journalists have had too much input in direction and scheduling. Think about it. If you're infected with interest (which is how developers get hooked) then seek information. ;-)


By Eric Laffoon at Sat, 2004/09/11 - 5:00am

Lay off the coffee for a while, man.


By yeahright at Sun, 2004/09/12 - 5:00am

indeed. He's more than allowed to give his opinion and If I read correctly, he actually changed his ming about some of the things he said after becoming informed.
See how much good can happen when you don't go off attacking those unfortunate enough to not know better and instead explaining in a calm manner?


By illogic-al at Mon, 2004/09/13 - 5:00am

Maybe Eric's post was a little harsh, but he is absolutely correct. Choice is a good thing. Competition is a good thing. We need to get away from the mentality that there can (or should) only be one product in any category. If you are a commercial software company it is in your best interest to try to kill off competing products until yours is the only one left. But, if you are a consumer/user it is in your best interest to encourage the existance of multiple competing products, even if you only use one of them. If only one product exists what will you do when you become unhappy with it?

Competition causes products to improve faster. It also keeps any one product from dictating standards or having too much control of a market. Do we really want to have one development team dictating the future of the web? That is what we have now with Microsoft and IE. Is anyone happy with the current situation we're in? I'm not.

It is good to have multiple competing browser engines. It helps keep the browser developers focused on supporting standards instead of trying to rule the world. It also keeps web designers from getting lazy and only supporting the dominant web browser.

By the way, Mozilla is my browser of choice. I only use Konqueror as a file manager and to test web pages. But I hope KHTML has a bright future. KHTML is important regardless of whether or not it is the number one browser engine or not.


By wg at Tue, 2004/09/14 - 5:00am

Reducing the duplication of effort is a trap. Do not fall for it. This is the antithesis of Free and Open Source Software. Duplication of resources has a great many advantages.

First of all, the different projects are not interchangable. A developer that is happy working on KHTML might not be happy working on Gecko. Or vice versa. Similar arguments about merging (or dumping one of) KDE and GNOME have been around for years, but they ignore that KDE development is a completely different thing than GNOME development. The communities are different, the cultures are different, the even the coding is different (C vs C++, GTK-- vs Qt, multiple disjoint APIs vs fewer complementary APIs, etc).

Second, different free projects allows cross-pollination of ideas and code. Tabbed browsing came about because *one* browser first decided to try it out. GCC only got decent C++ support because Cygnus forked off egcs. Think of all the stuff you dislike about GNOME (or KDE) and imagine that they were the standard with no alternative.

Third, why dump KTHML? Why not dump Gecko instead? Perhaps the vote will go against you. While Gecko has more support for "broken" HTML, KHTML is smaller and faster. Would you stop using a Gecko browser if the "vote" for a single engine went against you?

Fourth, choice is king. There are lots of reasons why people use Free and Open Source Software, but choice ranks up near the top. This is not a dictatorship. You cannot tell a developer what she can or cannot code for. You cannot tell a user what he can or cannot use. Heck, you can't even tell them what kernel they must use! This is not a proprietary commercial software house where the CEO gets to choose what the employees will be working on. This is not their product where the customer gets a one-size-fits-all solution.


By David at Mon, 2004/09/13 - 5:00am

I have looking for some NEWS in Konqueror homepage and Mozilla, but I can't find anything related to this.

Where is the code for that? What's the actual status? Is it usable?
Are there more links about it?
Thx


By KikoV at Sat, 2004/09/11 - 5:00am

The code could not be committed before the announcement, don't argue about that. And if you follow the next top-level comment to Zack's blog you will read that he has limited internet connectivity at the moment. So just wait a few (work) days.


By Anonymous at Sun, 2004/09/12 - 5:00am


By Anonymous at Sun, 2004/09/12 - 5:00am

Just added this comment to specify that Mozilla's ECMAScript/JavaScript engine consists of SpiderMonkey (it wasn't clear in some replies, which seemed to assume that Gecko absolutely has to replace kjs)... So we have:

Konqueror:
KHTML
KSJ

Mozilla:
Gecko
SpiderMonkey

This also means that combinations of the two would also be possible if it was necessary provided there be a unified API between the ECMAScript engines...

Also, what I also consider a productive effort would be to make optional all non-standards behavior in KHTML and KJS. A user could decide to enable or disable proprietary extensions which are already implemented then, and if those extensions were documented (I.E. for each "feature" a checkbox with a comment, it would even be better. This would allow KHTML to be used even by standards pedantics, while not necessarily limiting it's functionality, and Web developers to easily migrate non-standard code to standard one, disabling a particular feature one by one and seeing where it breaks, to address each problem one by one...


By Anonymous at Sun, 2004/09/12 - 5:00am

Very interesting. Thanks.

BTW, a lot of middleware work depend on such JS quirks, which force me to use IE (albeit I have Firefox and Opera installed).


By Gr8teful at Sun, 2004/09/12 - 5:00am

I love your proposition ! I allready think about that but you explain it very clearly.
You must fill in a whishlist. I'll vote for it :)


By Shift at Sun, 2004/09/12 - 5:00am

Assuming this gets into konqueror at some point, Have a per-domain setting on which rendering engine to use: ala plugins, and browser id.

That would make sites that don't work with khtml (gmail) or gecko available to users of one or the other engine.

Amazing work, as usual. Thanks to all the people who work on KDE.


By James L at Sun, 2004/09/12 - 5:00am

this is a very great idea, i use firebird most of the times nowadays but there are a couple of sites that doesnt act like they are intended to be with mozilla, so i switch to konqi. so i think this would be the most useful feature that would come with doubling the engines


By emre at Sun, 2004/09/12 - 5:00am

...is Gecko finally cleanly separated out of all those different Mozilla products? Or is this just the addition of choice to depend on a whole Mozilla software package even when just using a part of it which should instead be available as runtime library?

For years GNOME (as in Epiphany and Galeon) already uses Gecko as default web rendering engine. But that didn't get anyone to finally solve the above mentioned huge dependency, leading to the experimental import of Webkit (aka khtml + kjs) into the GNOME CVS (see http://cia.navi.cx/stats/project/gnome/gnome-webkit ). I'm afarid this announcement is a nice showcase of flexibility of the involved projects, but not really anything more.


By ac at Sun, 2004/09/12 - 5:00am

Now i can think in remove Firefox from my machine and start to use Konqueror for access my gmail account...


By Rogério at Sun, 2004/09/12 - 5:00am

While I can see value in having Firefox/Mozilla ported to QT/KDE, I prefer konqi. It is fast. It is clean. It does what I want it to do. In addition, one problem that I see with this port is that in the past, these kind of ports fall to the way.


By a.c. at Sun, 2004/09/12 - 5:00am

This is obviously great news for all the Firefox users, who know can have a KDE native version.
Though, as a KDE user and lover, I would have preferred to see time spent hacking on KHTML/Konqueror instead of on Gecko. I mean, we all know that since 3.2 our beloved Konqi has made giant steps. But there are a few things still missing or to polish more, like cluttered menus, better CSS2 support, or an integrated adblock-like plugin. Well, why don't spend time hacking on those?
I'm not saying that porting Firefox is bad, since it isn't. But shouldn't Konqi have more "priority" on the development?


By fake at Sun, 2004/09/12 - 5:00am

> or an integrated adblock-like plugin.
Use Privoxy.


By Anonymous at Sun, 2004/09/12 - 5:00am

Yeah, who doesn't like annoying checkboard patterns where annoying banners used to be?


By Zooplah at Mon, 2004/09/13 - 5:00am

Isn't great that developers do what _they_ want? I love it. ;-)


By Christian Loose at Sun, 2004/09/12 - 5:00am

This is great news, I can't wait to try it out.

Konqueror is my primary browser, keep up the good work guys!


By Mikhail Capone at Sun, 2004/09/12 - 5:00am

One of my favorite aspects of Konqueror is the site-specific settings. Will these settings work with Gecko? Can I enable javascript for some sites and disable it for others? Can I accept and reject cookies based on the site I am visiting? Can I make the browser identify itself as Lynx on some sites and Internet Explorer on others? Can I choose the rendering engine itself based on the site I'm visiting?

How about other config settings, like the default fonts, animation settings, or form completion?

KHTML also allows KMail to not load external images and other resources. Will this functionality apply to the Gecko KPart?

While I'm on the topic of settings, could we have a setting to lower the priority of the javascript interpreter? Some sites have scripts that seriously bog down the browser.


By Burrhus at Sun, 2004/09/12 - 5:00am

Oh, i didn't know you could do that with Konqueror :) mozilla/firefox can do that for years


By Joruus at Sun, 2004/09/12 - 5:00am

Sadly there is no UI for it (at least not for the complete version)


By Anonymous at Sun, 2004/09/12 - 5:00am

Look at screenshots of the article:

http://www.solutions.lv/~dimss/gallery/tmp/khtml_vs_gecko/index.html

I think they speak for themselves...


By Dmitry Ivanov at Sun, 2004/09/12 - 5:00am

Congratulations, you proved that you don't use the current Konqueror version.


By Anonymous at Sun, 2004/09/12 - 5:00am

Konqueror 3.3:
http://home.knuut.de/MWieser_/Konqueror-3.3.png

Gecko:
http://www.solutions.lv/~dimss/gallery/tmp/khtml_vs_gecko/20040912-10301...

Gecko does not even show the links to the Gnome-, KDE-, Mac OS X-Reviews and the Digital Video Cleaning guide!


By Asdex at Sun, 2004/09/12 - 5:00am

Pages