Browsers: The Engines
30 min read
Rendering EngineBlinkWebKitCritical Rendering PathReflow & RepaintDOM TreeCSSOM
How Chrome/Safari Actually Turn Code into Pixels
Browsers are incredibly sophisticated software. Understanding their internals separates good developers from great ones.
Rendering Engines
Blink (Chrome, Edge, Opera) and WebKit (Safari) are the two dominant rendering engines. They parse HTML into a DOM tree, CSS into a CSSOM tree, and combine them into a Render Tree.
The Critical Rendering Path
This is the sequence of steps the browser takes to convert HTML, CSS, and JavaScript into actual pixels:
- Parse HTML → DOM Tree
- Parse CSS → CSSOM Tree
- Combine → Render Tree
- Layout → Calculate geometry (position, size)
- Paint → Fill in pixels
- Composite → Layer management and GPU acceleration
Reflow & Repaint
Reflow (Layout recalculation) is expensive — it happens when you change element dimensions. Repaint is cheaper — it happens when you change visual properties like color.