Slashdot Log In
Examining Chrome's Source Code
Posted by
Soulskill
on Sat Sep 13, 2008 07:04 AM
from the work-in-progress dept.
from the work-in-progress dept.
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.'"
Related Stories
Submission: Building Google Chrome: A first look by Anonymous Coward
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
the core not even running under mac? (Score:4, Insightful)
Re:the core not even running under mac? (Score:5, Informative)
Parent
Re: (Score:3, Informative)
Just because WebKit runs, doesn't mean that the browser won't.
Re:the core not even running under mac? (Score:5, Interesting)
It uses webkit for layout, but it uses a (sort of) homegrown library for rendering:
http://gigaom.com/2008/09/02/google-open-sources-skia-graphics-engine/ [gigaom.com]
http://src.chromium.org/viewvc/chrome/trunk/src/skia/ [chromium.org]
Parent
Re:the core not even running under mac? (Score:5, Interesting)
Chrome naturally consists of many other components as well, such as the actual user interface, all the glue code to actually read and write files (like the cache), doing network connections, DNS lookups, checking SSL certificates, handling its famous sandbox processes, loading plugins and all sorts of other things.
Parent
Re:the core not even running under mac? (Score:4, Interesting)
Parent
Re: (Score:3, Insightful)
Yes it matters, because competition spurs progress. Just look at how IE stagnated until Firefox started to take market share.
Re:Does it really matter? (Score:5, Insightful)
They've surrounded the tasty nugget of Mac-compatible Webkit code with a thick layer of Windows-only user-interface and thread-maintenance code.
Parent
It's not over for Mozilla after all (Score:4, Funny)
They still have a near monopoly on the entire Linux desktop market!
Re:It's not over for Mozilla after all (Score:5, Insightful)
And google is really happy with that. They don't need to target the linux market because Mozilla is already working for them here.
The target is obviously internet explorer.
Parent
Re:It's not over for Mozilla after all (Score:5, Insightful)
Parent
Re:It's not over for Mozilla after all (Score:5, Insightful)
But of the eleventy billion IE users who still haven't switch to !IE, why would they switch to Chrome? I think the vast majority of them can be split into two groups: their bank/intranet/some stupid thing/fucking activex/etc doesn't work right elsewhere, and "the blue e takes me to the internet!". The first group can't switch and the second just doesn't care - why/how would Chrome change that?
Parent
Re:It's not over for Mozilla after all (Score:5, Interesting)
Parent
Re:It's not over for Mozilla after all (Score:4, Insightful)
I've tried removing the icon on her desktop, but that just makes her confused and annoyed =P
So make a firefox shortcut with the IE icon. :P
Parent
Re:It's not over for Mozilla after all (Score:5, Insightful)
And give the developers of that site an excuse to keep producing bad code?
I think not.
Parent
Re:It's not over for Mozilla after all (Score:5, Interesting)
And google is really happy with that. They don't need to target the linux market because Mozilla is already working for them here.
The target is obviously internet explorer.
I disagree for two reasons.
First, we can only presume Google wants Chrome to run on Android, Google's handset OS. Which is based on Linux. So clearly Google has a direct and powerful motivation to target Linux with Chrome. (In fact a much stronger motivation than to get Chrome running on OS X - I wouldn't be surprised to see the Android/Linux version out earlier.)
Second, one of the best ways to weaken IE is to weaken Windows - the less people running Windows, the less run IE. But if Chrome is Windows-only, that just strengthens Windows as the only platform able to run the 'best' browser ('best' at least in Google's eyes and those that like Chrome).
In other words, every IE convert to Chrome is still locked in to Windows. Whereas Google's long-term goal is to make the OS irrelevant so long as it can access Google's web services.
Parent
Re:It's not over for Mozilla after all (Score:5, Interesting)
They still have a near monopoly on the entire Linux desktop market!
Truth is, I don't really care if Chrome runs under Linux or not. What _is_ important is that there is a lot of buzz about a non-IE browser out there, and that will help Linux users no matter which browser they use. Chrome will get the attention of at least some PHBs and Frontpa^w webdevs who code IE-only websites. I have been complaining about this for years [dotancohen.com] but now there finally is a product that they will have a hard time ignoring. Firefox was close, but was only talked about by gearheads. Even my mother-in-law asked me about Chrome. Which is too bad, as she's on Ubuntu and feels left out...
Parent
Re:It's not over for Mozilla after all (Score:4, Interesting)
Unfortunatelly, Firefox wasn't close at all; it simply shifted the mindset in most places from "we support only IE" to "we support only IE and Firefox".
It was noticeable when you use something else, like Opera... (luckily not on sites originating in my area of the world, since Opera here has from 5 to 25 percent, depending on the country; and since Firefox has over 40% in most of them, aiming sites for duopoly doesn't work)
Seems like three major browsers is a minimum needed for them to start noticing _true_ interoperability...
Parent
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...
Parent
What I don't get... (Score:5, Interesting)
So they want to develop a cross-platform browser.
Why exactly is it then tied that tightly to a platform that porting it over to other platforms seems to basically mean starting all over again? After all, it's not like all 3 platforms would be completely alien in the backend -- they are POSIX compliant. Then the GUI: it's not like there aren't any cross-platform widget sets out there. But even if you want to go for individual approaches for each platform, then you still can separate functionality from the GUI.
So why again is the Mac port "closer to start than finish" (especially when reminding that Chrome is based on Webkit) and the Linux port "even worse"?
Re:What I don't get... (Score:5, Insightful)
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.
Parent
Re:What I don't get... (Score:4, Insightful)
Not that different really. Qt does a very cross-platform good job, and several other toolkits do a more-than-passable job as well such wxWidget or FLTK.
To me cross-platform is the only way to go, if you don't want your code to obsolete itself in no time at all.
Parent
Re:What I don't get... (Score:5, Informative)
Parent
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.
Parent
Re:What I don't get... (Score:4, Interesting)
mod-parent up. QT is the native toolkit for KDE.
IT isn't some artificial toolkit people only use for cross platform work, wxwindows or tk. It's a real native toolkit on Linux.
Heck, there's a windows port of KDE4.x in the works.
I mean come on...
Parent
Re:What I don't get... (Score:4, Interesting)
There can't be a grand unified HIG, but you're thinking about the problem backwards. Instead of trying to unify the HIGs, just have classes that abstract out the differences. For example, wxPython actually handles much of this already - the SizedControls library gives controls HIG-compliant borders and spacing on Win/Mac/GTK, while wxStdDialogButtonSizer (long name, I know ;-) will take your OK and Cancel button and make sure they appear in the right order on each platform. The platform-specific code is all built into the library - you don't need to deal with it yourself.
The reason most cross-platform apps don't follow HIGs too well is that rather than use a library like this, they hand-code spacing, positioning, etc., usually doing the whole thing on one platform first. So then when they decide to make it cross-platform, going through and making a huge preferences window, for example, follow HIGs is a massive task.
Parent
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.
Parent
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.
Parent
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.
Parent
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 :-)
Parent
Re: (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:What I don't get... (Score:5, Insightful)
So they want to develop a cross-platform browser.
Not really - they want a Windows browser to deliver their apps on which, largely thanks to the Google name, might stand a chance of making some inroads against IE.
Mac and Linux versions would be nice too - but those users already use either Firefox or Webkit/Safari which have a better reputation for standards compliance and aren't controlled by Microsoft. That last is particularly important if your name is Google and you produce webapps which compete with Microsofts office products.
So why again is the Mac port "closer to start than finish"
Because they obviously chose to develop for Windows and port later, rather than develop all 3 versions in parallel. So maybe they delayed the Mac and Linux versions at the expense of Windows, but the upshot is that they got the Windows beta out before IE8 launches. Kinda strategic.
Chrome is based on Webkit
So what if they don't have to write WebKit for Mac? They didn't have to write WebKit for Windows, either! What Google are spending their time on will be the not insubstantial bits that wrap around Webkit to make it Chrome.
it's not like there aren't any cross-platform widget sets out there
Looks to me like they're using their own Widget set. Plus (as both MS and Mozilla have found in the past) Mac users tend to come down hard on apps that don't look as if they were born and bred on a Mac.
Parent
Re: (Score:3, Insightful)
I don't see how POSIX is even introduced as a reason it should work, at least for Windows. I've never heard of it being useful in Windows except for command line software, that it precluded even using a GUI. I recall it was put in to satisfy a checklist for government purchases, only rarely being useful for anything other than that.
Re:What I don't get... (Score:4, Funny)
Yeah, now they're stuck with 90+% of the existing desktops on the planet. Whatever will they do?
Parent
Good Business Sense? (Score:5, Funny)
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, it would be prudent to sink resources into a windows browser, rather than Mac or Linux.
On the other hand, Mac use is steadily climbing and climbing among young people. Young people are typically drawn to free and shiny (one might say, Chromed) things. They're also good at starting and perpetuating trends. In that light, it might make sense for Google to sink more resources into making an OS X version. It's important to not only have a good product, but to make it fashionable to use that product. Lord knows how many people are still using IE, not because they like it, but rather because they don't know there's anything faster or better out there out there.
They might as well forget about Linux though. Everybody knows that Linux users are crotchety and only really want to use wget and for really special pages, lynx. I for one can't remember the last time I used a window manager and LIKED that new fangled environment. Too many colors and flashing lights, it's like those arcades that them darn kids like to visit.
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: (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.
Re: (Score:3, Interesting)
That was a fun read.
I mean FireFox 3.0 was touted for its "security"....In reality that browser offers even less protection / mitigation against web exploits than IE7 on Vista...
and this
I for one don't run FireFox 3.0 . . . I don't consider it even a worthy challenger (though it sure is fast) to IE7 let alone IE8 (due to lack of protection / mitigation technologies, the vuln counts etc.),
Now, I'm no expert, I'm not saying he's wrong, but what I do know is that this goes against everything I've been hearing around here.
Re: (Score:3, Insightful)
Dude, they freaking bought GreenBorder, one of the original companies that does sandboxing for normal Winblows executables.
What makes you think they have to rip off anyone?
Not open source! (Score:5, Informative)
Tracemonkey vs. V8 (Score:5, Interesting)
Chrome is currently faster than Firefox at most things even when Tracemonkey is enabled. I mostly work with browser based math/finance apps, and one of the most intensive things that can be done is a numerical integral. No other browser even comes close to Chrome in terms of speed. The only drawback is that it isn't cross platform yet. From what I hear, Tracemonkey is working really well on different processors so it will be an interesting match up. Try pasting this code into JavaScript Shell [squarefree.com] from Chrome and Firefox for a comparison.
Travesty (Score:4, Insightful)
Google had the chance to show openness, platform independence, support for Open Systems principles and designs, and true independence from Microsoft control with Chrome, but lost it. If ever there were an important time to make sure of a simultaneous, multiplatform release, this would have been it. Instead, we have a typical "release for the largest platform" with weak promises of eventual support for everyone else. That isn't a good message for 2008; it doesn't match the "visionary" of what they are trying to do with Chrome.
Google irritated a large number of users that would have been most likely to try and promote Chrome and to give contributions to the code- those NOT using MS-Windows. I think it was a huge mistake they didn't hold the release until there was a reasonable set of code for all the three major platforms. Given Google's resources, I doubt it would have been all that difficult.
I have talked to many Linux and MacOS users about Chrome- most are disappointed, some extremely disappointed, and many are quite bitter, too. You can't blame them for being unhappy... and this article indicates that seeing Chrome on Linux and MacOS is nowhere near "right around the corner".
Okay, explaining Beta (Score:5, Funny)
When MS uses the word Beta, they really mean pre-alpha. Release is Beta. If you want a release quality MS product you need to look for the discontinued tag.
Google is simpler, they got beta, beta and beta. One works, one doesn't, the other works for everyone except you and just when you became totally dependent on it, they kill the project.
Linux has Beta and RC. RC is solid but out of date so nvidia doesn't have drivers for it anymore, beta is solid but nvidia doesn't have drivers for it yet.
Solaris has only one version, more solid and sensible then a rock, it is labelled "Giving your accountant a heart attack".
Parent
Re: (Score:3, Insightful)
the great irony (Score:3, Interesting)
The great irony of all of this is that Chrome (also Safari) directly owe the KDE and Qt projectÅ credit for constructing the base on which this is built. And now they are primarily targeting windows. When discussing either Safari or Chrome, I never ever even see mention of the F/OSS projectÅ to which they owe their existence. More than a pity, itÅ a crying shame. Do no evil my ass.
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.
Parent
Truly, wtf? (Score:5, Insightful)
It's a really confusing situation that in my eyes loses them serious geek points. Hell, use
As for the old argument that nothing cross-platform can look good: eclipse.
Re:It's going to have maintainability problems. (Score:5, Interesting)
And, yuck, they checked in a whole bunch of binaries. If you so a checkout of the Subversion repository (weighing in at 1.5G for the single revision checkout, 8G or so to build!) it is a huge mess. I don't think Chrome is going anywhere for a long time due to these maintainability problems you mentioned, and you won't find hackers poking around Chromium with the mess that the codebase is in. Plus, it's all tied very closely to Windows, and who wants to hack in the hacker-unfriendly Windows?
Once I saw this, I sort-of forgot all about Chrome/Chromium. It's all hype for now.
Parent
Re: (Score:3, Insightful)
Of course, IE7 then came out, with every new "innovation" basically being a copy of whatever made Firefox unique
Hardly unique. IE7 didn't rip anything off Firefox that Opera hadn't had for years before either Firefox or IE7.