Closed Bug 1582504 Opened 6 years ago Closed 3 years ago

SVGMarkerElement::SetOrientToAngle has an IsFinite check and exception that doesn't seem to be in the spec

Categories

(Core :: SVG, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: edgar)

References

Details

The spec at https://svgwg.org/svg2-draft/painting.html#__svg__SVGMarkerElement__setOrientToAngle is not too helpful in defining a processing model, but nothing in that processing model seems to involve throwing exceptions, and we definitely throw one in our implementation.

I looked at https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/svg/svg_marker_element.cc?l=145-149&rcl=40c35d22b802dc92af717153bc849b30f35c5356 and it doesn't seem to do any throwing, so this behavior isn't matched by Blink.

https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/svg/SVGMarkerElement.cpp?rev=249822#L129 doesn't throw, so no exception in Safari either.

I think this is a remnant of the pre-webidl implementation that passed through infinities. We don't want to allow infinite values as it can get the graphics backends into a broken state but if we can't actually pass them in, this check is redundant.

Hmm.

So the argument here is a DOMSVGAngle, not a Web IDL double or float.

The Value() of a DOMSVGAngle can in fact be infinite, I think: you can SetValueInSpecifiedUnits() with a value which is finite in radians but which goes to Infinity when multiplied by 180/M_PI to get degrees, for example.

Assignee: nobody → echen
Severity: normal → S3
Depends on: 1836132

fixed by check in for bug 1836132

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.