diff --git a/Cargo.lock b/Cargo.lock index a3dcf282060..e02d83d61af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5763,7 +5763,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "svgtypes" version = "0.16.1" -source = "git+https://github.com/lexmount/svgtypes?branch=moli#e96c74ca675d56b65de71b4ce2b2d87f927bf79c" +source = "git+https://github.com/lexmount/svgtypes?rev=520374d714d69f8e2dc93c81a9d6be559ecde3ff#520374d714d69f8e2dc93c81a9d6be559ecde3ff" dependencies = [ "color", "kurbo", diff --git a/Cargo.toml b/Cargo.toml index 6c08d51efa1..e84ff5198a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -128,7 +128,7 @@ stylo_atoms = { git = "https://github.com/lexmount/stylo", rev = "5e853c2255715a stylo_dom = { git = "https://github.com/lexmount/stylo", rev = "5e853c2255715a825e3f9ea043d3998a55377e77" } stylo_static_prefs = { git = "https://github.com/lexmount/stylo", rev = "5e853c2255715a825e3f9ea043d3998a55377e77" } stylo_traits = { git = "https://github.com/lexmount/stylo", rev = "5e853c2255715a825e3f9ea043d3998a55377e77" } -svgtypes = { git = "https://github.com/lexmount/svgtypes", branch = "moli" } +svgtypes = { git = "https://github.com/lexmount/svgtypes", rev = "520374d714d69f8e2dc93c81a9d6be559ecde3ff" } # Preserve original SVG selector inputs and collect unclipped source geometry. usvg = { git = "https://github.com/lexmount/resvg", rev = "614aaf4d21ca03a4773f1e4d07c6a404407589a2" } taffy = { git = "https://github.com/ldm0/taffy", rev = "0a337871fa44db7d48571b06668f92737eefa8c2" } diff --git a/moli/tests/fetch_cli/layout_regressions.rs b/moli/tests/fetch_cli/layout_regressions.rs index 7a879052fcb..54bdf587a0d 100644 --- a/moli/tests/fetch_cli/layout_regressions.rs +++ b/moli/tests/fetch_cli/layout_regressions.rs @@ -35,6 +35,30 @@ fn run_layout(html: &str, expression: &str, fonts: bool) -> Result { serde_json::from_slice(&output.stdout).context("layout probe must return JSON") } +#[test] +fn extreme_svg_arc_layout_terminates_without_a_screenshot() -> Result<()> { + // Publishing layout used to expand this one arc into millions of cubics, + // then drain them with quadratic buffer shifts. The external process limit + // also bounds the test if the CLI's readiness timeout cannot interrupt it. + for doctype in ["", ""] { + let control = run_layout( + &format!("{doctype}"), + "document.body.offsetHeight", + false, + )?; + let value = run_layout( + &format!( + "{doctype}" + ), + "({bodyHeight:document.body.offsetHeight,svgHeight:document.querySelector('svg').getBoundingClientRect().height})", + false, + )?; + assert_eq!(value["bodyHeight"], control, "{doctype}"); + assert_eq!(value["svgHeight"], 300); + } + Ok(()) +} + #[test] fn fractional_grid_track_limits_terminate_with_a_finite_item_width() -> Result<()> { // This formerly loops in track growth even after the CLI's own timeout.