Hit Testing Architecture in Blink and Chromium
Blink2862 Helmi

Hit Testing Architecture in Blink and Chromium

This document explores the technical architecture of hit testing within the Chromium and Blink engines, the process used to link user input to specific interface elements. The system operates across multiple processes and threads, using the Viz compositor to route events correctly, especially when dealing with out-of-process iframes. While the Blink main thread performs the final, precise mapping using the layout tree and paint order, the compositor thread handles high-speed tasks like scrolling to minimize latency. Special mechanisms are also described for accessibility hit testing, which prioritizes immediate responsiveness through asynchronous tree updates. To maintain high performance, the engine employs caching strategies and coordinate translations that account for CSS transforms and device scaling. Overall, the text highlights how Chromium balances accuracy and speed by coordinating various rendering layers and hardware-accelerated components.

Jaksot(389)

blink::PaintArtifactCompositor

blink::PaintArtifactCompositor

Decides what needs to be composited and prepares the main‑thread representation to feed cc (layers if needed, scrollbar compositing, etc.).

22 Syys 202542min

blink::PaintArtifact

blink::PaintArtifact

The immutable package of paint chunks + display items for this frame, used to drive compositing without re‑painting.

21 Syys 202536min

blink::TransformPaintPropertyNode / ClipPaintPropertyNode / EffectPaintPropertyNode / ScrollPaintPropertyNode

blink::TransformPaintPropertyNode / ClipPaintPropertyNode / EffectPaintPropertyNode / ScrollPaintPropertyNode

The paint property trees captured during painting (transform, clip, effect/opacity, scroll offset) that define visual & coordinate‑space state.

21 Syys 202541min

blink::PaintController

blink::PaintController

Records drawing into a DisplayItemList, segmenting it into PaintChunks keyed by property‑tree state. (Output: a PaintArtifact.)

21 Syys 202533min

blink::LayoutView (root of the layout tree)

blink::LayoutView (root of the layout tree)

Computes geometry for boxes when layout is dirty.

21 Syys 202539min

blink::StyleEngine / style resolver

blink::StyleEngine / style resolver

Recalculates computed styles that changed since last frame (if any).

21 Syys 202542min

blink::Page → blink::LocalFrame / LocalFrameView

blink::Page → blink::LocalFrame / LocalFrameView

The document’s frame & viewport; LocalFrameView is the scrollable root that triggers layout/paint when needed. provided source outlines the fundamental components of the Blink rendering engine, specif...

21 Syys 202539min

blink::WebViewImpl

blink::WebViewImpl

The source text provides an in-depth explanation of the blink::WebViewImpl class within Chromium's Blink rendering engine, characterizing it as the central control point on the renderer's main thread ...

20 Syys 202539min