Repository navigation
Conversation
staging-devin-ai-integration
Bot
force-pushed
the
devin/1794509720-resvg-test-suite
branch
from
November 12, 2026 19:23
21797cd to
309392c
Compare
…e, report revision
This was referenced Nov 13, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds resvg's test suite as a second signal for SVG rendering, next to WPT. It is mostly a usvg-parity check for native SVG (#1541). resvg's
crates/resvg/testshas about 1,780 SVGs, one feature each, and each one has a PNG that resvg rendered. Nothing gets vendored:wpt/RESVG_COMMITpins resvg v0.50.0 (5bdbae6), the same version as Blitz's usvg.just wpt-resvgfetches that commit, wraps every test as a reftest (wpt resvg-generate), runs the existing WPT runner on the wrapped tests and prints a per-directory table (wpt resvg-summary). Both are subcommands of the WPT runner (wpt/runner/src/resvg.rs), so nothing needs Python.Each test is generated three times. You pick which ones to run with the usual path args.
resvg/img/...<img src=test.svg>resvg/inline/...BLITZ_NATIVE_SVG=1)resvg/parity/...<img src=test.svg>BLITZ_NATIVE_SVG=1)To inline an SVG, the generator drops the XML prolog, expands the entities its DOCTYPE declares, and removes a namespace prefix on the elements (
<svg:svg xmlns:svg=...>), because the HTML parser handles neither.Runner changes:
fuzzymeta can't ignore small differences, so the runner now reads a Blitz-only<meta name="blitz-fuzzy" content="<threshold>;<pixels>">: the renders match if at most<pixels>pixels differ by more than<threshold>in any channel. Attribute order and quoting don't matter, and a malformed value (such as a threshold over 255) panics instead of falling back to the default comparison. PNG comparisons use64;100, which is 0.25% of a 200×200 render, about one edge's worth. The scope's64;450letshape-rendering="crispEdges", dash-phase and arc differences of 100–370 pixels pass, and the tighter count fails 22 of those on usvg. Parity uses16;90.REVISIONin the generatedWPT_DIR, and the report records it asrevision. Without it the report would record the Blitz commit, sincewpt/resvg/outis inside the Blitz checkout. A newWPT_OUTPUT_DIR(defaultwpt/output) lets the recipe write towpt/resvg/output, so a resvg run doesn't overwrite an earlier WPT run.Fonts: the generator writes a
fonts.confthat loads only resvg'stests/fontsand maps generic families the way resvg's harness does (serif → Noto Serif, etc.). The recipe passes it asFONTCONFIG_FILE, which both fontdb (usvg) and fontique (parley) read. That takestextfrom 17 to 369 passes out of 387 on usvg.Results
This PR is based on
main. The native numbers come from this branch merged locally with #1541 (c032101); theBLITZ_NATIVE_SVGswitch only exists after that PR. "parity where img passes" counts parity only on tests where usvg matches resvg's PNG, so two backends failing the same way don't count as a pass.usvg backend (
just wpt-resvg, onmain):Native backend (
BLITZ_NATIVE_SVG=1 just wpt-resvg, with #1541):Native fails mostly in the areas #1541 leaves for later (
<use>, paint servers, clip/mask, text). Twoshapesfindings are worth noting:shapes/path/M-A*and the arc-flag tests) on the wrong side, which looks like a real bug.shapes/rect/*-valuesfail by construction. Inline,vw/rem/chresolve against the HTML page; in an<img>, they resolve against the image.Known usvg inline failures. On usvg, 13 tests pass as
imgbut failinlineorparity. Both causes are in Blitz's usvg inline path, not in how the tests are generated, so they don't count against native:colorattribute (12 tests): thecurrentColortests setcolor="green"as an attribute (painting/color/*,stop-color-with-currentColor-*,current-color-*-before-color,use/with-currentColor, and thefill/*currentColor*tests). The usvg inline path resolvescurrentColorfrom the CSScolor, which doesn't see SVG'scolorpresentation attribute, so these render black. Native maps presentation attributes and passes thepainting/colorandpainting/fillones. The gradient and<use>ones fail on native because it doesn't support paint servers or<use>yet.structure/svg/background-color(parity): inline, the<svg>'s CSS background is painted twice, once by the CSS box and once by usvg. The double-painted#0000ff80lands just inside the 64 threshold against the PNG but fails parity.not-UTF-8-encodingandbackground-color-with-viewboxalready fail asimg, so they aren't in "parity where img passes".A full run (5,340 tests) takes a few seconds on vello_cpu. This PR doesn't add it to CI.
Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/6223775f21c0494ebbea21c5c7971ecf
Link to Bot: https://dioxus.staging.devinenterprise.com/org/dioxus-engineering/bots/3904245e951a4a7fa4631b37b308d89b
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/6223775f21c0494ebbea21c5c7971ecf?variant=devin-insiders
WPT results
No changes in test results compared to
main.Generated by the WPT workflow.