Closed Bug 1456004 Opened 7 years ago Closed 7 years ago

Set angle unit type in setOrientToAngle and to UNKNOWN when setting orient to auto or auto-start-reverse

Categories

(Core :: SVG, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: longsonr, Assigned: longsonr)

References

Details

Attachments

(2 files, 3 obsolete files)

No description provided.
Attached patch patch (obsolete) — Splinter Review
SetOrientToAngle should not ignore the angle's unit type SetBaseValue should not support SVG_MARKER_ORIENT_AUTO_START_REVERSE ever. auto and auto-start-reverse should set the unitType to UNKNOWN. With this and bug 1455854 we pass https://wpt.fyi/svg/types/scripted/SVGAnimatedEnumeration-SVGMarkerElement.html
Assignee: nobody → longsonr
Attachment #8970056 - Flags: review?(cam)
Attachment #8970056 - Attachment is obsolete: true
Attachment #8970056 - Flags: review?(cam)
Attachment #8971853 - Flags: review?(cam)
Attachment #8971854 - Attachment description: Disallow setting baseVal to 3 (auto-start-reverse) → Part 2 - Disallow setting baseVal to 3 (auto-start-reverse)
Attachment #8971853 - Attachment description: Part 1 - ensureType is set properly → Part 1 - ensure unitType is set properly
Comment on attachment 8971853 [details] [diff] [review] Part 1 - ensure unitType is set properly Review of attachment 8971853 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the correct unit passed in, if I'm not mistaken. ::: dom/svg/SVGAngle.cpp @@ +48,4 @@ > return; > } > bool isBaseVal = mType == BaseValue; > + mVal->SetBaseValue(aValue, mVal->mBaseValUnit, Shouldn't this be passing in SVG_ANGLETYPE_UNSPECIFIED or SVG_ANGLETYPE_DEG?
Attachment #8971853 - Flags: review?(cam) → review+
Both Chrome and Safari leave the units unchanged i.e. we're consistent with/without this patch with them both. I think it would seem odd if markerElement.orientAngle.baseVal.value = 10 changed the angle's units.
Flags: needinfo?(cam)
(In reply to Robert Longson [:longsonr] from comment #7) > Both Chrome and Safari leave the units unchanged i.e. we're consistent > with/without this patch with them both. > > I think it would seem odd if markerElement.orientAngle.baseVal.value = 10 > changed the angle's units. OK, my memory of how this was meant to work is different from what our code does. Do other browsers also leave the unit as is for SVGLength too? Given this I think the spec needs fixing since https://svgwg.org/svg2-draft/types.html#__svg__SVGAngle__value says that assigning to value changes the internal value to a <number>, which means the unit will be SVG_ANGLETYPE_UNSPECIFIED. Similarly for https://svgwg.org/svg2-draft/types.html#__svg__SVGLength__value. (That is all text I wrote so maybe I just got it wrong.)
Flags: needinfo?(cam) → needinfo?(longsonr)
Priority: -- → P3
Attached file testcase (obsolete) —
Flags: needinfo?(longsonr)
Attached file testcase
Safari, Firefox and Chrome all produce identical results with this testcase.
Flags: needinfo?(cam)
Attachment #8975317 - Attachment is obsolete: true
Great. Could you file an issue on the spec then to fix this up? Thank you!
Flags: needinfo?(cam) → needinfo?(longsonr)
Attachment #8971854 - Attachment is obsolete: true
Flags: needinfo?(longsonr)
Summary: Fix some marker DOM issues → Set angle unit type in setOrientToAngle and to UNKNOWN when setting orient to auto or auto-start-reverse
Pushed by longsonr@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/da2d9d2b562e Set angle unit type in setOrientToAngle and to UNKNOWN when setting orient to auto or auto-start-reverse r=heycam
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: