Closed Bug 377015 Opened 18 years ago Closed 18 years ago

Simplify nsSVGClipPathFrame API and make clip reference loop detection more robust

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: longsonr, Assigned: longsonr)

References

Details

Attachments

(2 files, 3 obsolete files)

Attached patch patch (obsolete) — Splinter Review
Could do with an AutoxxxReferencer as per marker frames. Also the API could be simplified now that we are no longer using interfaces.
Attachment #261132 - Flags: review?(jwatt)
Comment on attachment 261132 [details] [diff] [review] patch >+nsSVGClipPathFrame::AutoClipPathReferencer::AutoClipPathReferencer( >+ nsSVGClipPathFrame *aFrame) >+ : mFrame(aFrame) >+{ Can you add: NS_ASSERTION(mFrame->mInUse == PR_FALSE, "reference loop!"); >+ mFrame->mInUse = PR_TRUE; >+} >+ >+nsSVGClipPathFrame::AutoClipPathReferencer::~AutoClipPathReferencer() >+{ >+ mFrame->mInUse = PR_FALSE; >+} Also please just move the definition of the class to the header so it gets inlined and is easier to understand when first encountered.
Attachment #261132 - Flags: review?(jwatt) → review+
Comment on attachment 261132 [details] [diff] [review] patch >+ // VC6 does not allow the inner class to access protected members >+ // of the outer class >+ class AutoClipPathReferencer; >+ friend class AutoClipPathReferencer; Oh, and VC6 is no longer supported for building trunk, so you can probably remove this clutter.
Attached patch address review comments (obsolete) — Splinter Review
Attachment #261132 - Attachment is obsolete: true
Attachment #261508 - Flags: superreview?(tor)
Comment on attachment 261508 [details] [diff] [review] address review comments >+ nsresult ClipPaint(nsSVGRenderState* aContext, >+ nsISVGChildFrame* aParent, >+ nsCOMPtr<nsIDOMSVGMatrix> aMatrix); >+ >+ PRBool ClipHitTest(nsISVGChildFrame* aParent, >+ nsCOMPtr<nsIDOMSVGMatrix> aMatrix, >+ float aX, float aY); While you're changing the signature, you could also remove the nsCOMPtrs and replace with pointers. With that, sr=tor.
Attachment #261508 - Flags: superreview?(tor) → superreview+
Attached file version for check in (obsolete) —
Attachment #261508 - Attachment is obsolete: true
Attachment #261690 - Attachment is obsolete: true
checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
This seems more like code cleanup than known bug-fixing, so marking in-testsuite-. If someone can find things that were broken before this, tho, that'd be better than not adding any tests. :-)
Flags: in-testsuite-
Depends on: 377892
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: