3 ms·
Basically, WebKit is the most immediately understandable large scale C++ codebase I've ever seen. They have a strict culture of code reviews on check-in, and re
by kilowatt 18y ago
Basically, WebKit is the most immediately understandable large scale C++ codebase I've ever seen. They have a strict culture of code reviews on check-in, and reverting any changesets that cause regressions. My commits have been rejected for style--I was first pissed, and eventually impressed :P
I can't speak for Mozilla's collaborative culture (and the fact that Firefox emerged from Netscape means it can't be half-bad), but just on an aesthetic level, WebKit C++ is a lot easier on the eyes than Mozilla. One thing that's interesting about WebKit is that in the last 12 months when I've been pulling upstream changesets from them, I've noticed that they're not afraid to do project-wide renames to keep the code clean. It seems like a small thing, but it's a lot more approachable to see clean C++ that uses namespaces and abstracts away platform differences in a coherent way. Mozilla is full of COM interfaces like
#define NS_IHTML_CSS_STYLE_SHEET_IID \
{0xb5cc4ac0, 0xeab6, 0x11d1, {0x80, 0x31, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x5a}}
class nsIHTMLCSSStyleSheet : public nsIStyleSheet
... and so on. edit: To be fair, I'm just a lot more familiar with WebKit, so maybe someone can defend (or pick apart) Mozilla's sources better than I can. If you check out WebKit, you'll also notice that there's an impressive collection of 210MB(!) of individual layout tests.
- ii 18y agoMozilla/Gecko is not just a browser engine, it's a platform (XPCOM) and everything is implemented on top of this platform as XPCOM components/interfaces. The bad thing is that these components are not very easy to use, write and integrate into anything else.