Bug 267180 - [SVG2] Add support for the 'turn' unit in <angle>
Summary: [SVG2] Add support for the 'turn' unit in <angle>
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Karl Dubost
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2024-01-06 09:57 PST by Ahmad Saleem
Modified: 2024-02-15 16:40 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2024-01-06 09:57:56 PST
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!
Comment 1 Karl Dubost 2024-01-11 05:06:06 PST
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.
Comment 2 Radar WebKit Bug Importer 2024-01-11 05:06:16 PST
<rdar://problem/120840743>
Comment 3 Karl Dubost 2024-01-11 05:09:41 PST
Pull request: https://github.com/WebKit/WebKit/pull/22653
Comment 4 EWS 2024-02-15 16:40:55 PST
Committed 274778@main (82c987e62f88): <https://commits.webkit.org/274778@main>

Reviewed commits have been landed. Closing PR #22653 and removing active labels.