tauri-runtime-servocat 3.31.0

Servo-replacement runtime for Tauri: wires html-cat, css-cat, dom-cat, layout-cat, paint-cat, net-cat, boa-cat, ecma-runtime-cat, and web-api-cat into a single rendering + scripting pipeline. v3.31.0 picks up web-api-cat 0.7.19 + 0.7.20. 0.7.19 finishes the form-state pseudo trio with `:disabled` and `:enabled`, tag-gated to the HTML form-control set. 0.7.20 wires the `<img>` element to scripts via a seven-property accessor pack: `src` / `alt` / `width` / `height` reflect HTML attributes, and `naturalWidth` / `naturalHeight` / `complete` read hidden state slots that this runtime will populate from the fetch + decode pipeline. Public helpers `web_api_cat::image::set_natural_size` and `set_complete` are now the integration points for the downstream image-rendering chunk. No tauri-runtime-servocat source change beyond the manifest in this release. Seventh sub-crate of a Servo-replacement webview runtime targeting Tauri.
//! Pipeline driver: HTML + CSS + viewport -> [`Frame`].

use boa_cat::Value;
use boa_cat::heap::Heap;
use layout_cat::Viewport;

use crate::error::Error;
use crate::frame::Frame;

/// Parse `html` and `css`, build the DOM, run cascade + block layout,
/// emit the paint-cat display list, and wrap everything in a
/// [`Frame`].  The script-side fields are empty (`Value::Undefined`
/// and an empty heap).
///
/// # Errors
///
/// Propagates parser and layout errors from the cat-stack.
pub fn render(html_source: &str, css_source: &str, viewport: Viewport) -> Result<Frame, Error> {
    let html_doc = html_cat::parse(html_source)?;
    let dom = dom_cat::Document::from_html_doc(&html_doc);
    let stylesheet = css_cat::parse(css_source)?;
    let layout_tree = layout_cat::layout(&dom, &stylesheet, viewport);
    let display_list = paint_cat::build(&layout_tree, &dom);
    Ok(Frame::new(
        dom,
        layout_tree,
        display_list,
        Value::Undefined,
        Heap::new(),
    ))
}