Closed Bug 98752 Opened 24 years ago Closed 24 years ago

add get_attributesForNames method to ISimpleDOMNode

Categories

(SeaMonkey :: General, defect, P2)

x86
Windows 2000
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla0.9.5

People

(Reporter: aaronlev, Assigned: aaronlev)

Details

(Keywords: access)

Attachments

(3 files)

GW Micro (makers of WindowEyes) has requested we add get_attributesForNames(numAttribs, [in] BSTR *attribNames, [in] short *nameSpaceIDs, [out, retval] BSTR *attribValues) The other method for getting attributes (get_attributes) returns all the attributes, which would be wasteful if you're only looking for one or two specific attribs.
Status: NEW → ASSIGNED
Keywords: access
Priority: -- → P2
Whiteboard: Seeking r=, sr=
Target Milestone: --- → mozilla0.9.5
Attached patch PatchSplinter Review
Comment on attachment 48604 [details] [diff] [review] Patch Looks good, I would just change this: >+ >+ if (!domElement) >+ return E_FAIL; >+ to this: if (!domElement || !content) return E_FAIL; with that change I'll give r=jgaunt
Attachment #48604 - Flags: needs-work+
I see that GetElementAndContentFor() just does a QI of the mDOMnode to get nsIDOMElement and nsIContent. No checks for success are made. The two interfaces are not related and the get_attributes method checks them both. If we really can get by checking one or the other lets do that and clean up get_attribute, but I'd like to know for _sure_ that is the case. Not to be an anal hard-ass, but good code has to start somewhere and I want to make sure no-one looks at the accessibility code and says "Damn, I hope I never have to touch that code" :-)
Whiteboard: Seeking r=, sr= → Seeking sr=
Comment on attachment 48673 [details] [diff] [review] Well, I always like to leave 1 little nit for you to find :P Adding the getter in any position other than the end of the interface makes us binary incompatible with NS6.1. I know that we're not going to follow COM rules and create a new interface for the new method, but we could at least do the "right thing" by: 1) Adding the new method to the end of the existing interface. 2) Creating a new IID for the interface. 3) Letting QI succeed for both the new and the old IID, in both cases returning the same new interface. Aaron, I'll let you make a decision on whether we care enough to do this. In either case, sr=vidur.
Attachment #48673 - Flags: superreview+
Whiteboard: Seeking sr=
-> fix checked in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: