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)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: longsonr, Assigned: longsonr)
References
Details
Attachments
(2 files, 3 obsolete files)
3.85 KB,
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
1.02 KB,
text/html
|
Details |
No description provided.
Assignee | ||
Comment 1•7 years ago
|
||
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)
Updated•7 years ago
|
See Also: → https://github.com/w3c/svgwg/issues/424
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Assignee | ||
Comment 4•7 years ago
|
||
Attachment #8970056 -
Attachment is obsolete: true
Attachment #8970056 -
Flags: review?(cam)
Attachment #8971853 -
Flags: review?(cam)
Assignee | ||
Comment 5•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Attachment #8971854 -
Attachment description: Disallow setting baseVal to 3 (auto-start-reverse) → Part 2 - Disallow setting baseVal to 3 (auto-start-reverse)
Assignee | ||
Updated•7 years ago
|
Attachment #8971853 -
Attachment description: Part 1 - ensureType is set properly → Part 1 - ensure unitType is set properly
Comment 6•7 years ago
|
||
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+
Assignee | ||
Comment 7•7 years ago
|
||
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)
Comment 8•7 years ago
|
||
(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)
Updated•7 years ago
|
Priority: -- → P3
Assignee | ||
Comment 9•7 years ago
|
||
Flags: needinfo?(longsonr)
Assignee | ||
Comment 10•7 years ago
|
||
Safari, Firefox and Chrome all produce identical results with this testcase.
Flags: needinfo?(cam)
Assignee | ||
Updated•7 years ago
|
Attachment #8975317 -
Attachment is obsolete: true
Comment 11•7 years ago
|
||
Great. Could you file an issue on the spec then to fix this up? Thank you!
Flags: needinfo?(cam) → needinfo?(longsonr)
Assignee | ||
Updated•7 years ago
|
Attachment #8971854 -
Attachment is obsolete: true
Flags: needinfo?(longsonr)
Assignee | ||
Comment 12•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Summary: Fix some marker DOM issues → Set angle unit type in setOrientToAngle and to UNKNOWN when setting orient to auto or auto-start-reverse
Assignee | ||
Comment 13•7 years ago
|
||
Comment 14•7 years ago
|
||
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
Comment 15•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•7 years ago
|
status-firefox61:
affected → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•