mirror of
https://github.com/lexmount/moli.git
synced 2026-11-21 16:03:10 +00:00
Reject unsupported MIME hints and nonmatching media before loading ordinary preloads. Parse MIME parameters, use the owning Document viewport, and reprocess media changes. Keep CSS preloads in the typed stylesheet path so rejected hints cannot fall through to generic requests and abort the renderer. Validation: cargo fmt --all; full workspace/all-features clippy with -D warnings; full nextest (19,858 passed, 13 skipped) with 32 build jobs and test threads. Two newly passing WPT files cover 46 subtests; 15 related WPTs and 476 preload admission scenarios pass, including parser, dynamic and emulated-media paths.
32 lines
1.3 KiB
Rust
32 lines
1.3 KiB
Rust
//! Bounded raster buffers, image codecs, and immutable SVG image trees.
|
|
//!
|
|
//! This crate deliberately does not know about DOM, layout, paint snapshots,
|
|
//! or protocol commands. It owns metadata-only probes and bounded decode/parse
|
|
//! contracts; renderer resource owners decide when and how long results live.
|
|
|
|
mod bounded;
|
|
mod budget;
|
|
mod jpeg;
|
|
mod png;
|
|
mod raster;
|
|
mod rgba;
|
|
mod svg;
|
|
|
|
pub use budget::{MAX_DECODED_RGBA_BYTES, MAX_ENCODED_IMAGE_BYTES};
|
|
pub use jpeg::{EncodedJpeg, JpegDecodeError, JpegEncodeError, decode_jpeg, encode_jpeg};
|
|
pub use png::{
|
|
EncodedPng, PngDecodeError, PngEncodeError, PngEncodeOptions, decode_png, encode_png,
|
|
encode_png_rgba8, encode_png_rgba8_with_options, encode_png_with_options,
|
|
};
|
|
pub use raster::{
|
|
DecodedRasterImage, RasterDecodeError, RasterImageFormat, RasterImageMetadata,
|
|
decode_raster_image, decode_raster_image_with_metadata, probe_raster_image,
|
|
raster_image_dimensions, supports_image_mime_essence,
|
|
};
|
|
pub use rgba::{RgbaImage, RgbaImageError};
|
|
pub use svg::{
|
|
MAX_ENCODED_SVG_BYTES, SvgDecodeError, SvgElementStyle, SvgImage, SvgImageMetadata,
|
|
SvgObjectGeometry, SvgScene, SvgStyleProperty, decode_inline_svg_scene, decode_svg_image,
|
|
decode_svg_image_with_metadata, probe_svg_image, svg_image_metadata_from_root_attributes,
|
|
};
|