Closed
Bug 892372
Opened 11 years ago
Closed 9 years ago
nsSVGMarkerElement::orientAngle does not always return 0 when orient="auto"
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: heycam, Assigned: twointofive)
Details
Attachments
(1 file, 2 obsolete files)
6.52 KB,
patch
|
Details | Diff | Splinter Review |
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.
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 2•9 years ago
|
||
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); > } >
Thanks Robert.
Attachment #8632211 -
Attachment is obsolete: true
Attachment #8632211 -
Flags: review?(cam)
Attachment #8632510 -
Flags: review?(cam)
Reporter | ||
Comment 4•9 years ago
|
||
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+
Thanks Cameron.
Attachment #8632510 -
Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/82b47cd30f3d
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•