Closed Bug 617634 Opened 9 years ago Closed 9 years ago

SVGPathData::GetMarkerPositioningData checks for PATHSEG_CURVETO_QUADRATIC_ABS instead of PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS

Categories

(Core :: SVG, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- final+

People

(Reporter: timeless, Assigned: jwatt)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, regression)

Attachments

(1 file)

452 SVGPathData::GetMarkerPositioningData(nsTArray<nsSVGMark> *aMarks) const
453 {
...
462   PRUint16 segType, prevSegType = nsIDOMSVGPathSeg::PATHSEG_UNKNOWN;
...
471   while (i < mData.Length()) {
472     segType = SVGPathSegUtils::DecodeType(mData[i++]); // advances i to args
474     switch (segType) // to find segStartAngle, segEnd and segEndAngle
475     {
...
666     case nsIDOMSVGPathSeg::PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
667     case nsIDOMSVGPathSeg::PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
668       cp1 = SVGPathSegUtils::IsCubicType(prevSegType) ? segStart * 2 - prevCP : segStart;
669       if (segType == nsIDOMSVGPathSeg::PATHSEG_CURVETO_CUBIC_SMOOTH_ABS) {
...
686       break;
687 
688     case nsIDOMSVGPathSeg::PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:
689     case nsIDOMSVGPathSeg::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:
690       cp1 = SVGPathSegUtils::IsQuadraticType(prevSegType) ? segStart * 2 - prevCP : segStart;
this if statement can't be reached, it looks like a copy and paste error from the 
691       if (segType == nsIDOMSVGPathSeg::PATHSEG_CURVETO_QUADRATIC_ABS) {
Assignee: nobody → jwatt
Blocks: 522306
Status: NEW → ASSIGNED
Attached patch patchSplinter Review
Attachment #496196 - Flags: review?(longsonr)
blocking2.0: --- → final+
Attachment #496196 - Flags: review?(longsonr) → review+
Attachment #496196 - Flags: approval2.0?
Attachment #496196 - Flags: approval2.0?
Keywords: regression
OS: Mac OS X → All
Hardware: x86 → All
http://hg.mozilla.org/mozilla-central/rev/9b7157931d79
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.