2 ms·
For those wanting to dive deeper, the layout code in Chromium is surprisingly easy to read considering its a 20+ year old codebase. This is a good starting poi
by londons_explore 6y ago
For those wanting to dive deeper, the layout code in Chromium is surprisingly easy to read considering its a 20+ year old codebase.
This is a good starting point:
https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/layout/layout_object.h;l=178;drc=bba0186702ff39303c487a012626e5fba8ab42ed;bpv=1;bpt=1 https://source.chromium.org/chromium/chromium/src/+/master:t...
- machello13 6y agoHow much diverged is this code from WebKit? 20 years ago Blink didn't even exist, right?
- londons_explore 6y agoMost of it. The main changes from WebKit to blink are a different approach to memory allocation (oilpan) and object lifetimes to help security. Most of the main files still say Copyright 1999 **@kde.org showing the origin of the original codebase that hasn't changed much to today. It's now so huge and complex that a major redesign/rewrite is pretty much out of the question. It's still mostly single threaded and all the main objects aren't thread safe. JavaScript shares that thread too. Parts of the rendering are multiththreaded and async, but that's it.
- pavpanchekha 6y agoAuthor here. Yes, the Chromium code is very good, and I learned a lot from reading the Servo code as well. We hope to do some more advanced chapters at the end of the book that reference real browser code bases more directly—if we can find an interesting way to write them, anyway.