Surprise: Apple's New Browser Is a Sister to Konqueror

by Doc Searls

Steve Jobs' Macworld keynotes are always Major Events in which lots of new stuff gets announced, but they rarely carry much news of unusual interest to folks on the Linux side of the OS tracks. True, Apple has been talking up UNIX and open source for several years now, and its OS X-based laptops are popular Type O devices in UNIX-y environments, including plenty of Linux shops and households. But hardly anybody expected Jobs to deliver any open-source surprises--least of all a new application based on a code developed by and for the Linux community.

Surprise: Apple's New Browser Is a Sister to Konqueror

But that's exactly what they did with Safari, Apple's new browser.

There had been rumors that Apple would replace Microsoft's Internet Explorer as the default browser in the OS X "dock". While standing in line with other "media" waiting to be herded into our special section in the keynote theater, I talked with some old-timers who rolled their eyes remembering Apple's last browser effort, the late Cyberdog. The default assumption was that Apple would add to the growing list of browsers based on Mozilla's Gecko engine, perhaps coming out with its own branded version of Chimera.

But that didn't happen. Instead Apple did something far more radical: They based their new browser on KHTML, from KDE.

Here's how Jobs put it in his keynote:

"How did we do this? We based Safari on an HTML rendering engine that is open source. About half the code in Safari is this open-source rendering engine. Now, we started working with this over a year ago. And it needed a lot of improvement. We've dramatically improved the performance. Some things are up to an order of magnitude faster. And, some people have a problem with open source. We think it's great [applause] and, we are going to be putting all of our improvements to this code base -- we're going to be hosting them on the Web today. [Applause.]

The code base that we decided to start with was KHTML. It's very popular in the Linux world. And it was a very well architected HTML rendering engine that is now dramatically improved.... We have built an incredible browser around it. We could not be happier with it.

Avie Tevanian, Apple's development chief, told me this:

"We looked at all the different potential code bases to build a browser on, including building one completely from scratch. And what we discovered was that KHTML gave us the best set of trade-offs between speed, size, quality, ability to render the most sites, things like that. It wasn't always the best at all of these, but for some things it excelled, and we thought we could take our resources and add to it, to make it the best in all these aspects. We'll keep contributing changes, and we expect others will contribute changes back."

KDE's news page added this:

The KDE connection: "[f]or its Web page rendering engine, Safari draws on software from the Konqueror open-source project. Weighing in at less than one tenth the size of another open-source renderer, Konqueror helps Safari stay lean and responsive." The good news for Konqueror: Apple, which said that it will be "a good open-source citizen [and] share[] its enhancements with the Konqueror Open Source community ", has today sent all changes, along with a detailed changelog, to the KHTML developers. Congratulations to the KHTML developers for this recognition of their outstanding efforts.... Hats off to collaboration!

Those developers got the news by this e-mail to Dirk Mueller from Don Melton of the Safari development team.:

From: Don Melton <gramps@apple.com>
Subject: Greetings from the Safari team at Apple ComputerDate: Tue, 7 Jan 2003 11:31:10 -0800Hi,
I'm the engineering manager of Safari, Apple Computer's new web browser
built upon KHTML and KJS.  I'm sending you this email to thank you for
making such a great open source project and introduce myself and my
development team.  I also wish to explain why and how we've used your
excellent technology.  It's important that you know we're committed to
open source and contributing our changes, now and in the future, back to
you, the original developers.  Hopefully this will begin a dialogue among
ourselves for the benefit of both of our projects.  I've "cc"-ed
my team on this email so you know their names and contact information.
Perhaps you already recognize some of those names.  Back in '98 I was
one of the people who took Mozilla open source.  David Hyatt is not only
the originator of the Chimera web browser project but also the inventor
of XBL.  Darin Adler is the former lead of the Nautilus file manager.
Darin, Maciej Stachowiak, John Sullivan, Ken Kocienda, and I are all
Eazel veterans.
The number one goal for developing Safari was to create the fastest
web browser on Mac OS X.  When we were evaluating technologies over a
year ago, KHTML and KJS stood out.  Not only were they the basis of an
excellent modern and standards compliant web browser, they were also less
than 140,000 lines of code.  The size of your code and ease of development
within that code made it a better choice for us than other open source
projects.  Your clean design was also a plus.  And the small size of
your code is a significant reason for our winning startup performance
as you can see reflected in the data at http://www.apple.com/safari/.
How did we do it?  As you know, KJS is very portable and independent. The
Sherlock team is already using it on Mac OS X in the framework my
team prepared called JavaScriptCore.  But because KHTML requires other
components from KDE and Qt, we wrote our own adapter library called KWQ
(and pronounced "quack") that replaces these other components.
KHTML and KWQ have been encapsulated in a framework called WebCore.
We've also made significant enhancements, bug fixes, and performance
improvements to KHTML and KJS.
Both WebCore and JavaScriptCore, which account for a little over half the
code in Safari, are being released as open source today.  They should
be available at http://developer.apple.com/darwin/projects/webcore/
very soon.  Also, we'll be sending you another email soon which details
our changes and additions to KHTML and KJS.  I hope the detailed list
in that email will help you understand what we've done a little better.
We'd also like to send this information to the appropriate KDE mailing
list. Please advise us on which one to use.
We look forward to your comments.  We'd also like to speak to you and
we'd be happy to set up a conference call at our expense for this purpose.
Please forward this email to any contributor whom I may have missed.
-- 
Don MeltonSafari Engineering ManagerApple ComputerP.S. -- I'm sending you this email while attending Macworld exposition
so it may take myself and my staff several hours before we can respond
to email.  My apologies in advance. 

Here's Dirk's response:

From: Dirk Mueller <mueller@kde.org>Subject: Re: Greetings from the Safari team at Apple ComputerTo: Don Melton @apple.com[......]Date: Tue, 7 Jan 2003 21:18:19 +0100On Die, 07 Jan 2003, Don Melton wrote:
> I'm the engineering manager of Safari, Apple Computer's new web browser> built upon KHTML and KJS.  I'm sending you this email to thank you for> making such a great open source project and introduce myself and my> development team.  I also wish to explain why and how we've used your> excellent technology.  It's important that you know we're committed to> open source and contributing our changes, now and in the future, back> to you, the original developers.  Hopefully this will begin a dialogue> among ourselves for the benefit of both of our projects.I hope so too. I'm deeply impressed by your detailed changelog and by the
changes. A few of the changes have already happened in "our"
developing version and many of them were on our TODOs. For example just
about this weekend I was working on improving the kjs garbage collector
and now I read that you apparently already fixed the issues I had with
it. Seems to me like a huge Christmas gift. Thank you. Thanks a lot
Especially I'd like to hope that we could set up a mailing list where we
could exchange ideas, patches and bug reports. Also a common test suite
for regressions would be nice and probably help us a lot in developing
KHTML and KJS further. Ideally the plan should be, and I hope you agree,
to use a common code base for the backend.> Please forward this email to any contributor whom I may have missed.We've forwarded it to kfm-devel@kde.org.> P.S. -- I'm sending you this email while attending Macworld exposition> so it may take myself and my staff several hours before we can respond> to email.  My apologies in advance.Have some nice time there and greetings from Germany, I just watched
the Safari presentation :-)

Later that day, this e-mail came back from Don Melton:

Hi,Here is the second email I promised which details our changes and
additions to KHTML and KJS which were done for Safari.
As it says on our open source web page at
http://developer.apple.com/darwin/projects/webcore/ the sources we will
post later today are based on KDE 3.0.2.  The best way to see every
change line by line is to diff against the originals.- --Don MeltonSafari Engineering ManagerApple Computer

On the floor of the show, I followed one of the Safari developers (I think it was Melton) as a guest on David Lawrence's On-line Tonight radio show. Lawrence told me there had been more than 300,000 downloads of Safari on the first day. It was clearly a hot product, but not only because it came from Apple instead of Microsoft. It was a hot performer too.

Everybody I talked to at the show about the browser remarked on its speed, which seems especially swift next to the notoriously tubby Mac versions of Internet Explorer.

Glenn Fleishman, the wireless guru whose Practical Macintosh column runs in the Seattle Times, told me he had heard reports that Microsoft put countless development hours into optimizing IE for Windows, but never did the same for its Mac versions. With Safari, he said, "Apple put to use the thousands of developer hours that went into KHTML, and put in thousands more of their own, all toward solving the rendering problem." The clear implication: browser leadership has passed not to Apple, but to the Open Source development community, where it has belonged all along. He added, "I'm not sure why Mozilla and Gecko didn't do it," he added, "but it's happened with KHTML."

It's hard to avoid the sense that Apple's choice of KHTML was a slight to Mozilla, especially given the fact that so many key members of the Safari team are Mozilla veterans.

While that's an interesting gossip topic, there are bigger issues, such as the challenges Apple faces in its relationships with the Open Source community.James Davidson (author of Learning Cocoa with Objective C and the original author of Apache Ant and Apache Tomcat) said, "Using KHTML in the browser raises the bar on Apple's open-source commitments. It's a love fest right now, but how they do it from here on out will reallly raise the bar. This isn't like Darwin, which was kind of quiet and not highly exposed. This is much more out in the open. I mean, here's this thing staring millions of users in the face that Apple is calling open source. Users will associate this browser with open source and expect bug reports to go through an open-source process. The press will be asking better questions too." (Safari has a bug report button in its titlebar.)

He also wondered how community involvement would jibe with Apple's notoriously secretive development culture. "They love surprises, but that's not how open source works. I'm sure this was the last surprise we'll see on this project. From now on, everything has to be in the open." He added, "The litmus test there will be how close KHTML and Moz will come on standards support. If they come close, that will throw the ball to Microsoft. Then we'll see whether they play nasty again with IE."

But that's just Apple's issue. The larger issue for everybody is standards. Among the geeks I talked to at the show there was complete agreement that Safari's open-source code base created a new de facto condition that favors de jure standards. One Apple engineer explained, "Until Tuesday, the de facto standard was IE. That's what developers cared about, and that's what webmasters cared about. Not any more. Now everybody's going to be holding every browser's feet to the standard's fire. If you fork the standards, you fork yourself." Adds James Davidson, "It's no longer game-over for web standards interoperability. You'd better adhere to standards now."

Safari is far from a finished work. In spite of its 1.0 version number, it's still in beta. It's getting a proper pounding, too -- not only on various lists, but in geek weblogs too. Mark Pilgrim, for example, posted a buglist-filled review that brought frank and useful responses by Apple's Dave Hyatt on his weblog.

There doesn't seem to be any interference by Apple's PR apparatus. This shouldn't be a surprise. Apple engineers and PR people have been telling me for more than two years that they are very careful not to interfere with the company's Open Source community involvement, preferring to "let nature take its course."

We'll see where it goes.

Doc Searls is senior editor of Linux Journal.

email: doc@ssc.com

Load Disqus comments

Firstwave Cloud