Bug 269429

Summary: Use enum class for SVG Angle Types as suggested in 274778@main
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: SVGAssignee: Karl Dubost <karlcow>
Status: NEW    
Severity: Normal CC: karlcow, sabouhallawa, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=267180

Ahmad Saleem
Reported 2024-02-14 20:07:01 PST
Hi Team, We will rename this bug once the PR lands to commit number but this is about FIXME added by Karl: PR Link - https://github.com/WebKit/WebKit/pull/22653 // FIXME: change the casing style of the enum type or naming of the Angle Value // see https://github.com/WebKit/WebKit/pull/22653#discussion_r1448856015 Where it should be changed to this as per Tim: enum class Type : uint8_t { Unknown, Deg, Rad, Grad, Turn, } WebKit Source (pre PR): https://github.com/WebKit/WebKit/blob/49fef559975eadeb4609dfe423aed84f43dcacb9/Source/WebCore/svg/SVGAngleValue.h#L32 Just wanted to raise before we forget. Thanks!
Attachments
Radar WebKit Bug Importer
Comment 2 2024-02-21 20:07:14 PST
Ahmad Saleem
Comment 3 2024-09-15 09:39:19 PDT
I tried it today but got stuck here: /Users/ahmadsaleem/OpenSource/Source/WebCore/svg/SVGMarkerElement.cpp:163:62: error: cannot initialize a parameter of type 'unsigned short' with an rvalue of type 'SVGAngleValue::Type' 163 | Ref { m_orientAngle }->baseVal()->newValueSpecifiedUnits(angle.unitType(), a... |
Karl Dubost
Comment 4 2024-09-16 05:49:24 PDT
ExceptionOr<void> newValueSpecifiedUnits(unsigned short unitType, float valueInSpecifiedUnits); https://github.com/WebKit/WebKit/blob/84cc6561cbc81c2b2cb3bc36e8d704b78ffe635a/Source/WebCore/svg/SVGAngleValue.h#L54-L55 newValueSpecifiedUnits is expecting a "unsigned short unitType" but not the enum declaration. so probably the types need to be aligned everywhere in the code, whichever is chosen.
Karl Dubost
Comment 5 2026-02-26 02:02:28 PST
Note You need to log in before you can comment on or make changes to this bug.