From e2f4a18dcb69deea073363ed0a7dc0aaf765edd3 Mon Sep 17 00:00:00 2001 From: "tor%cs.brown.edu" Date: Wed, 6 Apr 2005 19:02:13 +0000 Subject: [PATCH] Bug 289289 - using clipPath on a markable shape causes all subsequent drawing to be clipped. r=jwatt, a=mkaply. --- .../svg/base/src/nsSVGPathGeometryFrame.cpp | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/layout/svg/base/src/nsSVGPathGeometryFrame.cpp b/layout/svg/base/src/nsSVGPathGeometryFrame.cpp index 11967abeefc6..ccb66fe6553a 100644 --- a/layout/svg/base/src/nsSVGPathGeometryFrame.cpp +++ b/layout/svg/base/src/nsSVGPathGeometryFrame.cpp @@ -246,26 +246,25 @@ nsSVGPathGeometryFrame::Paint(nsISVGRendererCanvas* canvas, const nsRect& dirtyR nsSVGMarkerFrame *markerEnd, *markerMid, *markerStart; GetMarkerFrames(&markerStart, &markerMid, &markerEnd); - if (!markerEnd && !markerMid && !markerStart) - return NS_OK; + if (markerEnd || markerMid || markerStart) { + float strokeWidth; + GetStrokeWidth(&strokeWidth); + + nsVoidArray marks; + markable->GetMarkPoints(&marks); + + PRUint32 num = marks.Count(); + + if (markerStart) + markerStart->PaintMark(canvas, this, (nsSVGMark *)marks[0], strokeWidth); + + if (markerMid) + for (PRUint32 i = 1; i < num - 1; i++) + markerMid->PaintMark(canvas, this, (nsSVGMark *)marks[i], strokeWidth); - float strokeWidth; - GetStrokeWidth(&strokeWidth); - - nsVoidArray marks; - markable->GetMarkPoints(&marks); - - PRUint32 num = marks.Count(); - - if (markerStart) - markerStart->PaintMark(canvas, this, (nsSVGMark *)marks[0], strokeWidth); - - if (markerMid) - for (PRUint32 i = 1; i < num - 1; i++) - markerMid->PaintMark(canvas, this, (nsSVGMark *)marks[i], strokeWidth); - - if (markerEnd) - markerEnd->PaintMark(canvas, this, (nsSVGMark *)marks[num-1], strokeWidth); + if (markerEnd) + markerEnd->PaintMark(canvas, this, (nsSVGMark *)marks[num-1], strokeWidth); + } } if (clip)