Closed Bug 243536 Opened 21 years ago Closed 21 years ago

Complete, improve error checking, and reduce footprint of nsSVGTransformList.cpp

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jwatt, Assigned: jwatt)

References

()

Details

Attachments

(3 files, 14 obsolete files)

21.53 KB, patch
Details | Diff | Splinter Review
1.09 KB, image/svg+xml
Details
1.55 KB, patch
Details | Diff | Splinter Review
Opening to give myself a logical place to locate files relating to the implementation of the Consolidate, CreateSVGTransformFromMatrix, InsertItemBefore and ReplaceItem methods of the nsSVGTransformList class.
Status: NEW → ASSIGNED
Attached file Draft Patch for Consolidate (obsolete) —
Attached file Draft Patch for InsertItemBefore (obsolete) —
Attached file Draft Patch for ReplaceItem (obsolete) —
Alex, I thought I'd put this stuff into bugzilla rather than keep on filling up your mailbox with code. I'll try and read up on XPCOM to better understand when I should be adding references to objects. Meanwhile any comments would be welcome.
after assigning to out params, you need NS_ADDREF(*_retval) or something like this could you attach patches as real patches, not as a text file containing the new fucntion? (e.g. as produced by cvs diff -pu6 > patchfilename.diff)
For the moment I'm using text files to make it easy to quickly see what I'm doing. The code is very rough and certainly isn't ready to be used as a patch yet. Once it is I'll get round to the creating a patch side of things. See the existing file at http://lxr.mozilla.org/seamonkey/source/content/svg/content/src/nsSVGTransformList.cpp#410
Attached file Draft Patch for Consolidate (obsolete) —
Attachment #148436 - Attachment is obsolete: true
Attachment #148672 - Flags: review?(alex)
Attachment #148672 - Attachment is obsolete: true
Sorry, stupid mistake in last file.
Attachment #148679 - Attachment is obsolete: true
Attachment #148680 - Flags: review?(alex)
Attachment #148437 - Attachment is obsolete: true
Attachment #148499 - Attachment is obsolete: true
Attachment #148682 - Flags: review?(alex)
Attachment #148680 - Attachment is obsolete: true
Attachment #148685 - Flags: review?(alex)
Attachment #148682 - Attachment is obsolete: true
Attachment #148688 - Flags: review?(alex)
Comment on attachment 148685 [details] [diff] [review] Patch for nsSVGSVGElement::CreateSVGTransformFromMatrix() moved to bug 244292
Attachment #148685 - Attachment is obsolete: true
Attachment #148685 - Flags: review?(alex)
Comment on attachment 148688 [details] [diff] [review] Patch for CreateSVGTransformFromMatrix and Consolidate Needs more work, although the code for Consolidate() will still give a rough idea of the proposed implementation.
Attachment #148688 - Attachment is obsolete: true
Attachment #148688 - Flags: review?(alex)
Attached patch rough patch (obsolete) — Splinter Review
This patch hasn't been properly debugged, but I'm looking for an informal review of my basic approach.
Attachment #148438 - Attachment is obsolete: true
Attachment #148439 - Attachment is obsolete: true
Attachment #148672 - Flags: review?(alex)
Attachment #148680 - Flags: review?(alex)
Attachment #148682 - Flags: review?(alex)
Attached patch patch (obsolete) — Splinter Review
Attachment #155063 - Attachment is obsolete: true
Attachment #155410 - Flags: review?(alex)
Attachment #155410 - Attachment is obsolete: true
Attachment #155420 - Flags: review?(alex)
Attachment #155410 - Flags: review?(alex)
Comment on attachment 155420 [details] [diff] [review] patch addressing points brought up on irc r=afri with the following changes: >Index: mozilla/dom/public/idl/svg/nsIDOMSVGTransformList.idl [...] > [scriptable, uuid(df41474c-a4f8-4ec3-ae79-4342e6f56d8e)] > interface nsIDOMSVGTransformList : nsISupports >-{ >+{ stray whitespace change >Index: mozilla/content/svg/content/src/nsSVGTransformList.cpp >=================================================================== [...] >+// Should check in params for our implementation? >+// nsCOMPtr<nsSVGTransform> transform = do_QueryInterface(newItem); >+// if (!transform) >+// return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR; >+// will this allow the removal of: if (!newItem) return NS_ERROR_DOM_SVG_WRONG_TYPE_ERR; >+ I'd prefer not to have this comment here, as this is a much wider issue and doesn't only affect this file. At some point we will probably introduce more decomed types (like e.g. nsSVGContextProvider) and this issue will automatically be addessed as a side-effect. [...] >+nsSVGTransformList::Create(const nsAString& aValue, nsISVGValue** aResult) > { [...] > } This function is unused, so you can remove it.
Attachment #155420 - Flags: review?(alex) → review+
Attached patch final patchSplinter Review
Patch addressing above requests.
Attachment #155420 - Attachment is obsolete: true
Attached image TESTCASE
Here's a testcase to show everything works fine.
Attachment #155487 - Attachment is patch: false
Attachment #155487 - Attachment mime type: text/plain → image/xml+svg
Attachment #155487 - Attachment mime type: image/xml+svg → image/svg+xml
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Summary: Remove NS_NOTYETIMPLEMENTED from nsSVGTransformList.cpp → Complete, improve error checking, and reduce footprint of nsSVGTransformList.cpp
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: