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)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: longsonr, Assigned: longsonr)
References
Details
Attachments
(2 files, 3 obsolete files)
10.08 KB,
patch
|
Details | Diff | Splinter Review | |
1.11 KB,
patch
|
Details | Diff | 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 1•18 years ago
|
||
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 2•18 years ago
|
||
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.
Assignee | ||
Comment 3•18 years ago
|
||
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+
Assignee | ||
Comment 5•18 years ago
|
||
Attachment #261508 -
Attachment is obsolete: true
Assignee | ||
Updated•18 years ago
|
Attachment #261690 -
Attachment is obsolete: true
Assignee | ||
Comment 6•18 years ago
|
||
Assignee | ||
Comment 7•18 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•18 years ago
|
||
Comment 9•18 years ago
|
||
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-
You need to log in
before you can comment on or make changes to this bug.
Description
•