Bug 267180
| Summary: | [SVG2] Add support for the 'turn' unit in <angle> | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | SVG | Assignee: | Karl Dubost <karlcow> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | annevk, heycam, karlcow, sabouhallawa, webkit-bug-importer, zimmermann |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=269429 | ||
Ahmad Saleem
Hi Team,
I couldn't manage to find any existing bug, so I thought to create so we can track it.
Blink commit: https://src.chromium.org/viewvc/blink?view=revision&revision=176014
Test Case (failing in Safari): https://jsfiddle.net/kp73dsao/show
^ Firefox Nightly 123 and Chrome Canary 123 support this and match.
Just wanted to raise and track it.
I manage to do local patch with above Blink and it compiles but does not progress test, so I think 'marker' supporting 'turn' might be missing.
Thanks!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Karl Dubost
SVG2 Draft
https://svgwg.org/svg2-draft/types.html#InterfaceSVGAngle
There is a sentence about
https://svgwg.org/svg2-draft/types.html#__svg__SVGAngle__SVG_ANGLETYPE_UNKNOWN
> For example, for an <angle> with a turn unit, SVG_ANGLETYPE_UNKNOWN would be returned.
At the same time, there is link to https://www.w3.org/TR/css-values/#angles
which defines turn as a possible value.
It creates something bizarre where
Source/WebCore/svg/SVGAngleValue.h would be
class SVGAngleValue {
WTF_MAKE_FAST_ALLOCATED;
public:
enum Type {
SVG_ANGLETYPE_UNKNOWN = 0,
SVG_ANGLETYPE_UNSPECIFIED = 1,
SVG_ANGLETYPE_DEG = 2,
SVG_ANGLETYPE_RAD = 3,
SVG_ANGLETYPE_GRAD = 4,
SVG_ANGLETYPE_TURN = 5
};
and Source/WebCore/svg/SVGAngle.idl would be
[
ConstantsScope=SVGAngleValue,
Exposed=Window
] interface SVGAngle {
// Angle Unit Types
const unsigned short SVG_ANGLETYPE_UNKNOWN = 0;
const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1;
const unsigned short SVG_ANGLETYPE_DEG = 2;
const unsigned short SVG_ANGLETYPE_RAD = 3;
const unsigned short SVG_ANGLETYPE_GRAD = 4;
Let's ask Cameron or Anne
It doesn't really address the question directly
https://github.com/w3c/svgwg/issues/478
but there was this in 2018
https://github.com/w3c/svgwg/issues/424#issuecomment-408998878
Anyway, I have a patch, but still suspicious if it's the right thing to do.
Radar WebKit Bug Importer
<rdar://problem/120840743>
Karl Dubost
Pull request: https://github.com/WebKit/WebKit/pull/22653
EWS
Committed 274778@main (82c987e62f88): <https://commits.webkit.org/274778@main>
Reviewed commits have been landed. Closing PR #22653 and removing active labels.