Examining Chrome's Source Code 288
An anonymous reader writes "Chrome is open source, and there's clearly still some work to be done on it. In this article, Neil McAllister decided to take a peek under Chrome's hood and view it through the eyes of the developers who will improve and maintain it in the coming years. It seems Google's open source browser currently has much to offer prospective hackers — provided they use Windows. Quoting: 'The Chromium site explains how to download the source code for Linux, Mac OS X, or Windows. Unfortunately, if you're eagerly awaiting a Mac version of Chrome, you shouldn't hold your breath. As the Mac OS X area of the Chromium developer site explains, "Right now, the Mac build is a work in progress that is much closer to the start than the finish." In fact, according to the latest status report, the Chrome developers have yet to get even the browser core running under Mac OS X. Rendering actual Web pages is still a long way off, to say nothing of a usable Aqua GUI. Then again, the Linux version is in arguably even worse shape.'"
Re:the core not even running under mac? (Score:5, Informative)
Re:What I don't get... (Score:1, Informative)
Cross-platform widget sets are always dreadful. An application developed using cross-platform widgets will, at best, work well on one platform, and more usually on no platforms. OS X and Windows have different UI philosophies, and an OS X application needs a different UI from a Windows application.
Yeah, I quite agree. Knocking out a Windows only GUI application is a hell of lot easier than a cross platform one.
Sandbox (Score:3, Informative)
The implementation of the sandbox in Windows is based on Windows-specific features. I suspect when they finally get it running on other platforms it will behave differenty with different levels of protection.
Re:Sandbox (Score:3, Informative)
Sorry I didn't put this into the parent.
See this blog from Microsoft's Robert Hensing [technet.com] on how Chrome implements sandboxing on Windows and from whom at Microsoft they ripped off the idea.
Not open source! (Score:5, Informative)
Re:Good Business Sense? (Score:2, Informative)
I suppose it's good business sense to write software for the most popular platform. With around 75% [w3schools.com] of the OS hits being from Windows
From your link
http://www.w3schools.com/browsers/browsers_os.asp [w3schools.com]
OS Platform Statistics
Windows XP is the most popular operating system. The windows family counts for over 90%:
Windows XP (73.9%) + Windows 2000 (2.4%) + Win98 (0.2%) + Windows 2003 (1.9%) + Vista (12.5%) = 90.9%
Re:What I don't get... (Score:5, Informative)
"After all, it's not like all 3 platforms would be completely alien in the backend -- they are POSIX compliant."
Uh, sorry? Since when is Windows POSIX compliant? Windows seems to be the only major modern OS in existence that's not POSIX compliant.
I know that Windows provides some POSIX support, but it's broken and non-compliant in various ways. For example fork() is not supported.
Re:the core not even running under mac? (Score:3, Informative)
Just because WebKit runs, doesn't mean that the browser won't.
Re:What I don't get... (Score:4, Informative)
Windows provides basic support for POSIX.1, but it's always been a second-class citizen and was only added to meet some US government requirement or other.
There is also SFU, or whatever they're calling it these days, but IIRC that's never been easy to integrate with the Windows GUI, and isn't available for major OSes like XP Home anyway.
To all intents and purposes, if you want to target Windows you either need to use a proprietary Microsoft API, or you need to use a compatibility layer or cross-platform library that translates to a proprietary Microsoft API; this last option is the one used by real cross-platform browsers like Firefox and Opera.
Portability between architectures (Score:5, Informative)
Worse : Chrome (especially V8) is only designed to work on ARM and i386 (32 bits) architectures. Yes, no AMD64 support, and don't even think of other architectures yet.
However, there is a lot of manpower behind the project and the developpers are very skilled. So this is not hopeless.
Re:Portability between architectures (Score:5, Informative)
It isn't designed just to work on those, they just haven't done others yet. When building a VM it is bad to start out having to support 10 different architectures as it requires you to test them all for every little change you do. It also requires that all developers know these architectures very well if they are to do proper changes.
Besides V8 is probably the most portable thing there is in Chrome, it already works on Linux, OS X and Windows, and they provided two different architectures, making it much easier to do a 3rd and a 4th for anyone who should wish to do so.
How do i know this? Because Lars Bak who leads the V8 team happens to be teaching my VM course, and a guy asked that specific question.
Re:What I don't get... (Score:5, Informative)
I know that Windows provides some POSIX support, but it's broken and non-compliant in various ways. For example fork() is not supported.
Not true.
Microsoft Windows Internals, 4th. Ed (Russinovich & Solomon), p. 60:
And to head off the next common incorrect belief, p.394:
The POSIX subsystem blows for a host of reasons (you can't access most normal Win32 functionality, at least not easily), but it's got fork.
Re:What I don't get... (Score:5, Informative)
Re:It's not over for Mozilla after all (Score:4, Informative)
In places where efficient sofware, perfectly useable on old computers is sometimes preferred
http://www.en.ranking.com.ua/index.php?page=Ranks:RanksPage&stat=22 [ranking.com.ua]|OW (who'd have thought, more than Gecko...) ;P )
http://www.en.ranking.lt/index.php?page=Ranks:RanksPage&stat=22 [ranking.lt]|OW
http://www.en.ranking.pl/index.php?page=Ranks:RanksPage&stat=22 [ranking.pl]|OW
http://www.en.rankings.cz/index.php?page=Ranks:RanksPage&stat=22 [rankings.cz]|OW
(there are also stats for Hungary, where Opera performs similarly to "West"; though many people wouldn't consider Hungary to be in the same region, culturally at least; and I suspect culturall factors also play some role in spending habits/software choices; oh, and there's also Russia with Opera usage share comparable to Ukraine...though it's also a bit "out there"
Anyway, most interesting thing from those stats for most of you, I imagine: yes, there are places where IE is on the brink of falling below 50%
And personally I just think that it would be perfect if all four major layout engines end up each having roughly the same market share...
Re:What I don't get... (Score:5, Informative)
Do you mean to say that OS-X breaks convention by using non-standard keyboard shortcuts?
In OS X, option-left and option-right skip one word to the left or right respectively. This has been the case since the first release of MacOS in 1984. Windows did not exist then, and there were no standards in early X11 toolkits (there still aren't - in 2005 I was using an X11 desktop and had four applications open with different shortcuts in text fields - gtk, tk, Qt and XUL were all doing things subtly differently). Windows standardised on control-left/right, because PCs didn't have an option key and alt was used for the menu (because PCs didn't have a meta key either). It's nothing to do with OS X 'innovating' and 'using non-standard shortcuts,' it's to do with Qt refusing to respect a core element of a user interface that has remained unchanged on a platform for 24 years.
Re:What I don't get... (Score:2, Informative)
A decreasing percentage, as people move to 64bit and mac/linux increase market share.
Last i checked chrome ran fine in vista 64.
Right now its optimized for the 32bit market, that dose not mean it wont run on a 64 bit platform (even IE defaults to its 32bit version)
Re:What I don't get... (Score:5, Informative)
Let me clarify a common misconception. Windows is _NOT_ POSIX compliant for all practical intents and purpose for one simple reason: an application using the POSIX subsystem doesn't have access to the Win32 subsystem, making it completely useless.
For example, you cannot use POSIX functions (fork, etc) and use Win32 GUI at the same time. Thus the need for solutions like Cygwin, which emulate POSIX with enormous performance cost.
I hope this puts the Windows POSIX compatibility myth to rest forever and nobody on SlashDot will make it ever again :-)
Re:Tracemonkey vs. V8 (Score:2, Informative)
There are some pretty benchmarks [mozillazine.org] on the Mozilla site that show what TraceMonkey is faster at and what it's not. What you have here is slow because TraceMonkey doesn't optimize recursion. This feature is scheduled to be implemented in Firefox 3.1b2, so the final version of 3.1 may indeed perform this benchmark faster than V8.
Re:What I don't get... (Score:3, Informative)
It is easy to find a fork() for windows, or indeed posix threads, etc.
In fact, Chrome/Chromium actually uses the Pthreads for win32 [google.com] library.
Re:the core not even running under mac? (Score:2, Informative)
Webkit doesn't include the UI layer. You need to write all the code to connect webkit to the UI to make what Webkit does visible to the user. You also need to write all the networking code to connect it to the internet. Webkit is just middleware...
Re:Not open source! (Score:2, Informative)