Hacker News new | ask | show | jobs
by sillysaurusx 1315 days ago
I would search WebKit, not chromium. But keep in mind that there’s a difference between “unknown code bases” and “one of the largest and most complex code bases ever created.” You’re asking, essentially, “in the Windows source code, where is the window layout algorithm?”

Stuff like that is certainly possible to find. But it requires a lot of time and dedication.

I would personally search for job listings for Chromium / Firefox, then use that knowledge to find someone who works on it. Then I’d ask them where it is.

But only in this specific case. My normal workflow is to build whatever it is I’m looking at, then change things until it breaks. It’s pretty quick to narrow down what I’m looking for at that point.

That doesn’t work here because building chrome requires close to a supercomputer.

EDIT: Actually, I would try to find a crash log related to the DOM. The stack trace will point you precisely where you’re interested in. Doing that is easier said than done, but I’ve pulled that trick a couple times, so it seems worth mentioning.

2 comments

How did you know it was in Webkit or Blink? What was your thought process that lead you to this conclusion? Was it prior knowledge?
I tried to think of a less-unsatisfying answer, but it was just prior knowledge. All the major browsers use Webkit or a fork of WebKit, and WebKit had to be the thing that lays out the DOM since it’s not chrome-specific. (If you were looking for something specific to chrome, it’d probably be a lot harder to find. Or at least for me to find.)

The other comments are good too: try searching the metadata for the code, like git logs, pull requests, etc.

I suppose a new age solution might also be to type “// The DOM layout algorithm:” into Copilot and pray.

>I would search WebKit, not chromium

Why? Blink is a fork of part of WebKit so it would likely even be in the same file.

Smaller surface area. More likely to find tests related to the DOM being built. And as you say, once you find it in WebKit, you can probably find it in chromium.