Skip to content

Revert to crates.io usvg v0.46 and anyrender_svg v0.13 - #697

Merged
nicoburns merged 4 commits into
mainfrom
devin/1786547935-crates-io-usvg-anyrender
Aug 12, 2026
Merged

Revert to crates.io usvg v0.46 and anyrender_svg v0.13#697
nicoburns merged 4 commits into
mainfrom
devin/1786547935-crates-io-usvg-anyrender

Conversation

@nicoburns

@nicoburns nicoburns commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary

Removes the [patch.crates-io] overrides for usvg (DioxusLabs/resvg fork) and anyrender/anyrender_svg (DioxusLabs/anyrender fork branch), returning to pure crates.io dependencies while keeping SVG intrinsic-sizing behaviour:

  • The forked usvg's Tree::intrinsic_dimensions is replaced by an in-Blitz SvgIntrinsicDimensions { width, height, view_box_size }, computed in parse_svg_image by re-parsing the root <svg>'s width/height/viewBox attributes with usvg::roxmltree + a direct svgtypes dep (matching usvg's own parsing: percentages kept unresolved, absent attrs None, viewBox validated as finite/positive). SvgImageData accessors (intrinsic_width, resolved_width, viewbox_aspect_ratio, ...) are unchanged in behaviour.
  • usvg is downgraded 0.48.1 → 0.46.0, which is what crates.io anyrender_svg 0.13 requires. The fork branch's "don't apply SVG text transform twice" fix is only needed against usvg 0.48 ("Text nodes now inherit their absolute transform" changed in 0.48.0), so anyrender needs no new release.

Non-UTF-8 sources (e.g. SVGZ) skip the attribute re-parse and fall back to usvg::Tree::size, matching the pre-fork behaviour of having no declared dimensions.

Note: usvg 0.46 reverts SVG text rendering to the rustybuzz/ttf-parser stack (0.48 moved to harfrust/skrifa); this goes away again once upstream linebender/resvg#1119 ships and usvg can be re-bumped.

Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/14862dc9892246ca9c154ba95ceae878
Requested by: @nicoburns

WPT results

0 newly passing, 9 newly failing (net -9).

Full diff (9 changed tests)
- Pass => Fail css/css-flexbox/flex-aspect-ratio-img-column-013.html
- Pass => Fail css/css-flexbox/flex-aspect-ratio-img-column-014.html
- Pass => Fail css/css-flexbox/flex-aspect-ratio-img-column-015.html
- Pass => Fail css/css-flexbox/flex-aspect-ratio-img-row-008.html
- Pass => Fail css/css-flexbox/flex-aspect-ratio-img-row-009.html
- Pass => Fail css/css-flexbox/flex-aspect-ratio-img-row-010.html
- Pass => Fail css/css-flexbox/flex-aspect-ratio-img-row-011.html
- Pass => Fail css/css-sizing/aspect-ratio/replaced-element-039.html
- Pass => Fail css/css-sizing/aspect-ratio/replaced-element-040.html

Generated by the WPT workflow.

Compute SVG intrinsic dimensions in blitz-dom by re-parsing the root
<svg> attributes with roxmltree/svgtypes, instead of relying on the
forked usvg's Tree::intrinsic_dimensions.
@nicoburns nicoburns self-assigned this Aug 12, 2026
@staging-devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@nicoburns nicoburns changed the title Use crates.io usvg 0.46 + anyrender_svg 0.13; drop git patches Revert to stable/crates.io usvg v0.46 and anyrender_svg v0.13 Aug 12, 2026
@nicoburns nicoburns changed the title Revert to stable/crates.io usvg v0.46 and anyrender_svg v0.13 Revert to crates.io usvg v0.46 and anyrender_svg v0.13 Aug 12, 2026
@nicoburns
nicoburns merged commit 085b875 into main Aug 12, 2026
15 checks passed
dotmonkey added a commit to tti-inspirata/ebook_blitz that referenced this pull request Aug 13, 2026
…G intrinsic sizing 回归(usvg 0.46 正式版)等 41 个 commit

- 取消此前对 DioxusLabs#606 的 revert:上游 DioxusLabs#697 已改用 crates.io usvg 0.46 + anyrender_svg 0.13,
  util.rs / node/element.rs / svg_background_size.rs 三个文件直接取上游,
  blitz-paint/render/background.rs 的 intrinsic_width/height 跟着改成方法调用。
- node/node.rs 的 set_transform:上游已自行实现与 fork 等价的 S*T*S^-1 缩放,取上游。
- layout/inline.rs:fork 的零尺寸定位容器 baseline-ascent 锚点与上游 DioxusLabs#637 的
  inset_offset 取并集。
- parley 0.11 / skrifa 0.43 保持不变(上游本次未 bump)。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant