Closed Bug 892372 Opened 12 years ago Closed 10 years ago

nsSVGMarkerElement::orientAngle does not always return 0 when orient="auto"

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: heycam, Assigned: twointofive)

Details

Attachments

(1 file, 2 obsolete files)

The spec says markerElement.orientAngle should be 0 when orient="auto" or "auto-start-reverse". Currently it looks like we expose the value that it had when the attribute was last a numeric angle value.
Attached patch 892372.diff (obsolete) — Splinter Review
In addition to the issue in comment 1, we were also not changing the orient type to SVG_MARKER_ORIENT_ANGLE when we did a setOrientToAngle, so I fixed that one as well.
Assignee: nobody → twointofive
Attachment #8632211 - Flags: review?(cam)
Comment on attachment 8632211 [details] [diff] [review] 892372.diff > if (aNameSpaceID == kNameSpaceID_None && aName == nsGkAtoms::orient) { > if (aValue.EqualsLiteral("auto")) { > mOrientType.SetBaseValue(SVG_MARKER_ORIENT_AUTO); > aResult.SetTo(aValue); >+ mAngleAttributes[ORIENT].SetBaseValue(0.f, this, true); I think the last attribute should be false. > return true; > } > if (aValue.EqualsLiteral("auto-start-reverse") && > MarkerImprovementsPrefEnabled()) { > mOrientType.SetBaseValue(SVG_MARKER_ORIENT_AUTO_START_REVERSE); > aResult.SetTo(aValue); >+ mAngleAttributes[ORIENT].SetBaseValue(0.f, this, true); here too. > return true; > } > mOrientType.SetBaseValue(SVG_MARKER_ORIENT_ANGLE); > } > return SVGMarkerElementBase::ParseAttribute(aNameSpaceID, aName, > aValue, aResult); > } >
Attached patch Patch v2 (obsolete) — Splinter Review
Thanks Robert.
Attachment #8632211 - Attachment is obsolete: true
Attachment #8632211 - Flags: review?(cam)
Attachment #8632510 - Flags: review?(cam)
Comment on attachment 8632510 [details] [diff] [review] Patch v2 Review of attachment 8632510 [details] [diff] [review]: ----------------------------------------------------------------- Looks great, thanks Tom! ::: dom/svg/test/test_markerOrient.xhtml @@ +78,5 @@ > + m.setAttribute("orient", "auto"); > + testAutoIsSet(m); > + > + m.setAttribute("orient", "270"); > + Trailing white space. @@ +100,5 @@ > +<body> > +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=892372">Mozilla Bug 892372</a> > +<p id="display"></p> > +<div id="content" style="display: none"> > + Here too.
Attachment #8632510 - Flags: review?(cam) → review+
Attached patch Patch v3Splinter Review
Thanks Cameron.
Attachment #8632510 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: