Hit Testing Architecture in Blink and Chromium
Blink2862 Feb

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.

Avsnitt(392)

blink::PaintArtifactCompositor

blink::PaintArtifactCompositor

turns chunks into compositor layers & updates cc property trees. Consumes the new PaintArtifact and does the layerization and property‑tree updates required for compositor draw. It supports fast paths...

10 Okt 202529min

blink::PaintChunk and blink::DisplayItemList

blink::PaintChunk and blink::DisplayItemList

grouping and content. PaintChunk: groups sequential display items that share the same property‑tree state and cull/visibility; it’s the unit we layerize and invalidate.DisplayItemList: the recorded Sk...

10 Okt 202537min

blink::PaintArtifact

blink::PaintArtifact

the immutable “what to draw” package for this frame. A PaintArtifact is the product of Blink painting: a DisplayItemList plus an ordered vector of PaintChunks. It is immutable post‑creation and design...

10 Okt 202531min

blink::PaintController

blink::PaintController

builds the display list + paint chunks and manages caching. As painters call into GraphicsContext, they also drive a PaintController which groups drawing into display items and paint chunks (each keye...

10 Okt 202529min

blink::GraphicsContext

blink::GraphicsContext

immediate drawing API that records to a display list. Painters for layout objects use GraphicsContext to “draw”—but in modern Blink those calls get recorded into a display list (PaintRecord) backed by...

10 Okt 202544min

blink::TransformPaintPropertyNode / ClipPaintPropertyNode / EffectPaintPropertyNode / ScrollPaintPropertyNode

blink::TransformPaintPropertyNode / ClipPaintPropertyNode / EffectPaintPropertyNode / ScrollPaintPropertyNode

These are the nodes within those four trees. Every piece of painted content (a “paint chunk”) is associated with a tuple of (Transform, Clip, Effect, Scroll) nodes—its PropertyTreeState. This precisel...

10 Okt 202533min

blink::PaintPropertyTreeBuilder

blink::PaintPropertyTreeBuilder

builds/updates paint property trees.Consumes the layout/fragment data and produces the four paint property trees (Transform, Clip, Effect, Scroll) for the current frame. These trees encode coordinate ...

10 Okt 202547min

blink::PrePaintTreeWalk

blink::PrePaintTreeWalk

cross‑frame pre‑paint traversal. Runs in the InPrePaint lifecycle phase. Walks the entire layout tree starting at the root LocalFrameView, updating paint invalidation state and computing the context n...

10 Okt 202531min

Populärt inom Teknik

uppgang-och-fall
market-makers
elbilsveckan
natets-morka-sida
rss-elektrikerpodden
gubbar-som-tjotar-om-bilar
skogsforum-podcast
rss-laddstationen-med-elbilen-i-sverige
bilar-med-sladd
rss-technokratin
rss-uppgang-och-fall
bli-saker-podden
rss-it-sakerhetspodden
developers-mer-an-bara-kod
bosse-bildoktorn-och-hasse-p
rss-sakerhetspodcasten
rss-kack-tech-podcast
rss-en-ai-till-kaffet
rss-sogeti-sweden-podcasts
rss-milpodden