Add first-party inline SVG rendering (svg-native) - #693
Conversation
|
@nicoburns can you review it? |
|
I think you have the wrong issue link... copy-paste error? |
|
@nicoburns fixed the link, didn't notice my mistake. |
|
(nicoburns: note that I did do a pass on the AI-review before posting it here, so the below isn't completely automated): Thanks for taking this on. This is an initial AI review pass; a human review will follow. There are several blocking issues that need to be addressed before this can land. Blocking1.
|
|
I tried testing this briefly. I was not able to get any SVG to load unfortunately (using dioxus-free-icons) in my app. I did get a lot of warnings like so: Cargo.toml |
|
blitz-paint-svg-computed-paint.patch |
|
blitz-hover-propagation.patch |
|
@FireMasterK thanks for patches. I'll try to see where my solutions failed. |
|
@nicoburns @FireMasterK pushed some changes with an example too. |
|
Re-reviewed the latest push — all four blocking items from the previous review are addressed, and I verified locally that 1. New bug:
|
|
Looks like this isn't using servo/stylo#396, so that might explain why it's not making full use of Stylo. Almost all of the SVG attributes should be being pushed into Stylo as presentational attributes and then read back from the Stylo computed style. This will allow for inheritance, and for the SVGs to be styled with CSS. |
|
An implementation plan for first-party inline SVG support, and a detailed comparison of this PR against it, is posted at #701 (comparison: #701 (comment)). |
|
Plan above is the one I had worked out with an AI before you expressed interest in the task. May be useful. |
I was planning to do this in parts, the properties I've implemented don't need that branch. I will use it in followup PR. |
|
@nicoburns point out any issues you see. |
Addresses #448
svg-nativefeature that parses inline<svg>elements directly into Blitz's DOM/Stylo pipeline.:hover, and author stylesheets all apply.WPT results
1 newly passing, 1 newly failing (net 0).
Full diff (2 changed tests)
Generated by the WPT workflow.