Share data structure for SVGPathData::mData and nsStyleSVGRest::mD
Categories
(Core :: SVG, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox129 | --- | fixed |
People
(Reporter: boris, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
We should use the similar data structure for both SVGPathData::mData
and nsStyleSVGReset::mD
(which is added by Bug 1340422). For now we still need a conversion from SVGPathData::mData
to nsStyleSVGReset::mD
when handling SVG d attribute on path element. If we share the same data structue (e.g. use StylePathComand everywhere), we can avoid unwanted conversion, for optimization.
Note: nsStyleSVGReset::mD
uses the same data structure with offset-path
path() function.
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Comment 1•3 years ago
|
||
I update the dependency because this bug is still dependent on the removal of SVGPathSeg code, so we don't have to keep SVGPathData::mData
for the DOM API. However, the shipment of d property is not strongly dependent on this bug (i.e. we just need to do some more conversions). So shipping the d property without this should be fine.
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•8 months ago
|
||
This removes a bunch of special and complex code from the SVG path code,
and simplifies fixing stuff like bug 1903361.
Assignee | ||
Updated•8 months ago
|
Assignee | ||
Comment 3•8 months ago
|
||
Assignee | ||
Comment 4•8 months ago
|
||
Hey Brian / Daniel, just sanity-checking... I don't think there's a good reason why our CSS animation behavior and SMIL behavior for path interpolation is different right? https://phabricator.services.mozilla.com/D214594 in particular shows the behavior difference. I'm aligning on the CSS behavior of always absolutizing paths before interpolation, rather than the SMIL behavior which is relativizing or absolutizing depending on which one is the right side of the interpolation (this code).
I guess https://svgwg.org/svg2-draft/paths.html#DProperty doesn't say how to interpolate one way or the other...
Assignee | ||
Comment 5•8 months ago
|
||
Comment 6•8 months ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)
I'm aligning on the CSS behavior of always absolutizing paths before interpolation, rather than the SMIL behavior which is relativizing or absolutizing depending on which one is the right side of the interpolation
That sounds fine to me. I don't recall there being a particular reason to prefer the behavior that you're replacing here (and it sounds like it doesn't have any impact on the geometry, if I'm understanding correctly)
Comment 9•8 months ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)
Hey Brian / Daniel, just sanity-checking... I don't think there's a good reason why our CSS animation behavior and SMIL behavior for path interpolation is different right?
I'm afraid I don't recall any particular reason for aligning with the value on the RHS. It looks like heycam wrote that code. I think aligning with CSS is fine, particularly because the SVG spec doesn't even seem to require converting between relative/absolute commands ("exactly the same number and types of path data commands", emphasis added)
Comment 10•8 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ff2a3385da3e
https://hg.mozilla.org/mozilla-central/rev/2233e7aef1d7
Description
•