Conversation
No functional changes.
Previously it was being done manually, but now it is done in the reflection layer. This should have no functional changes. Also adds support for [ReflectDeprecated] being used with namespaced attributes, which will be important for xlink:href. Co-authored-by: Timothy Gu <timothygu99@gmail.com>
|
Implementation notes for part 1 (AI allowed): AI was only slightly helpful here. I tried pointing Cursor (default agent mode) at the original PR and asking it to port over changes, but it pretended to do so while instead fabricating new implementations from scratch. (It admitted to doing so after I called it out.) I had more success letting Cursor do some more minor refactoring, like the first commit that moves reflection into its own file. I briefly used Claude Sonnet 3.7 (non-thinking) to remind myself of how to port changes from one Git branch to another. |
New elements: <defs> (SVGDefsElement), <desc> (SVGDescElement), <g> (SVGGElement), <metadata> (SVGMetadataElement), <switch> (SVGSwitchElement), <symbol> (SVGSymbolElement), <use> (SVGUseElement). Add SVGAnimatedPreserveAspectRatio and SVGAnimatedRect, including support in the reflection layer. Update the SVGElement viewportElement() method to correctly establish the viewport based on ancestor elements. Add the SVGSVGElement createSVGRect() method, and the SVGRect type (which is distinct from DOMRect.) Includes tests for most (but not all) of the new functionality. Co-authored-by: Timothy Gu <timothygu99@gmail.com>
* Add tests for <metadata> and <switch> * Improve test coverage for <g>, and<symbol> * Remove redundant SVGAnimatedString, SVGNumber, and SVGStringList tests that already existed in the repository, but are less complete than the tests we included in the previous commit. * Remove <use> support. The previous commit included a stub of <use>, but <use>'s main behavior is very complicated (involving shadow roots and such), and we should not pretend to support it if we don't support that part.
|
Implementation notes part 2 (AI not allowed): AI would definitely have been helpful here, but this ended up being less volume of work than I thought, so the loss wasn't so bad. (Honestly, I was kind of dreading this work for the last week because I thought I'd have to grind out tons of repetitive test code without AI.) After realizing that |
This is a rebase and partial split-up of #2926, with the goal of landing it.