All checks were successful
ci / fast (linux) (push) Successful in 3m18s
Add end-to-end image rendering: HTML <img> elements are now decoded, sized with CSS replaced-element rules (intrinsic dimensions, proportional scaling), emitted as DisplayItem::Image in the display list, and rasterized with nearest-neighbor scaling and alpha blending. Key changes: - ImageId newtype in shared crate, DecodedImage/ImageStore/ImagePipeline in image crate using the `image` crate for PNG/JPEG/GIF/WebP decoding - DisplayItem::Image variant in display list with render_image() emission - LayoutBox gains intrinsic_width/height/image_id; <img> elements coerced from Inline to InlineBlock only when image is successfully loaded - Replaced element sizing in block layout: intrinsic width/height short-circuits with proportional scaling and infinity guards - Pipeline wires image loading (DOM walk, URL resolve, decode) through to layout_with_images() and stores ImageStore in PipelineResult - CpuRasterizer.rasterize_with_images() draws images with nearest-neighbor scaling, safe usize arithmetic, bounds checking, and alpha blending - Replaced standalone png crate with image_decoder for PNG writing - 12 golden tests (125-136) and 28 unit tests covering sizing, edge cases, zero dimensions, and rasterization Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
478 B
Plaintext
18 lines
478 B
Plaintext
LayoutBox node=#1 tag=html box=block
|
|
content: (0, 0, 800, 66)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
LayoutBox node=#3 tag=body box=block
|
|
content: (8, 8, 784, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 8 8 8 8
|
|
LayoutBox node=#5 tag=img box=block
|
|
content: (8, 8, 100, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
image: img#0 (intrinsic: 100x50)
|
|
inline_context: 0 lines, height=0, max_width=0
|