Tali Garsiel writes a marvelous high level look at modern browser
architecture. If you’ve been curious how the parsers deal with the
forgiving nature of HTML syntax, or how CSS is applied efficiently, you might
enjoy this read. Given the way Apple keeps augmenting Safari and WebKit, I
think it will behoove you to keep up to date with the browser mechanism. There
will come a day when it won’t be Cocoa all the way down.