Closed
Bug 285597
Opened 20 years ago
Closed 20 years ago
Implement Get/SetProperty for nsIAttribute
Categories
(Core :: DOM: Core & HTML, enhancement)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: allan, Assigned: allan)
References
Details
Attachments
(1 file, 3 obsolete files)
|
6.55 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
We should let nsIAttribute implement Get/SetProperty(), etc. just as nsIContent.
| Assignee | ||
Comment 1•20 years ago
|
||
Here's a go at it. Doesn't seem to work for me though :(
| Assignee | ||
Comment 2•20 years ago
|
||
(In reply to comment #1) > Created an attachment (id=177015) [edit] > Patch > > Here's a go at it. Doesn't seem to work for me though :( Had a chat with peterv about it: 1. the functions in nsIAttribute should abstract. 2. nsDOMAttributes are not unique.... we need to cache them in nsDOMAttributeMap or: Big monster ate my little bug :)
Status: NEW → ASSIGNED
Depends on: 235512
| Assignee | ||
Comment 3•20 years ago
|
||
Bug 235512 is ready, so it's time to get this one done too.
| Assignee | ||
Updated•20 years ago
|
Attachment #177015 -
Attachment is obsolete: true
Attachment #183822 -
Flags: review?(bugmail)
Comment on attachment 183822 [details] [diff] [review] Updated patch >+ nsISupports *thisSupports = NS_STATIC_CAST(nsIDOMAttr*, this); >+#ifdef DEBUG >+ printf("GetProperty(this=%p, aPropertyName = %p)\n", >+ (void*) thisSupports, >+ (void*) aPropertyName); >+#endif >+ return doc->PropertyTable()->GetProperty(thisSupports, aPropertyName, >+ aStatus); Why all this casting to nsISupports? Just use |this| as first argument everywhere. >+ nsIDocument *GetOwnerDoc() const >+ { >+ return mContent ? mContent->GetOwnerDoc() : mNodeInfo->GetDocument(); >+ } You making this a virtual function once mContent dies? Actually, ideally we should update the mNodeInfo member of all attrnodes when an element is moved between documents. Then this could just use mNodeInfo->GetDocument(). But that could be done in another bug. r=me with the first fixed.
Attachment #183822 -
Flags: review?(bugmail) → review+
| Assignee | ||
Comment 5•20 years ago
|
||
| Assignee | ||
Updated•20 years ago
|
Attachment #183822 -
Attachment is obsolete: true
Attachment #184913 -
Flags: superreview?(peterv)
| Assignee | ||
Comment 6•20 years ago
|
||
(In reply to comment #5) > Created an attachment (id=184913) [edit] > w/sicking's comment And |doc->PropertyTable()->DeleteAllPropertiesFor(this)| in the dtor btw.
Comment 7•20 years ago
|
||
Comment on attachment 184913 [details] [diff] [review] w/sicking's comment >Index: content/base/public/nsIAttribute.h >=================================================================== >+ /* Methods for manipulating content node properties. For documentation on Make that /** * Methods...
Attachment #184913 -
Flags: superreview?(peterv) → superreview+
| Assignee | ||
Updated•20 years ago
|
Attachment #184913 -
Flags: approval1.8b3?
Comment 8•20 years ago
|
||
Comment on attachment 184913 [details] [diff] [review] w/sicking's comment a=mkaply
Attachment #184913 -
Flags: approval1.8b3? → approval1.8b3+
| Assignee | ||
Comment 9•20 years ago
|
||
Updated to incorporate changes that came from bug 235512.
Attachment #184913 -
Attachment is obsolete: true
Attachment #185253 -
Flags: superreview?(peterv)
Attachment #185253 -
Flags: review?(peterv)
Updated•20 years ago
|
Attachment #185253 -
Flags: superreview?(peterv)
Attachment #185253 -
Flags: superreview+
Attachment #185253 -
Flags: review?(peterv)
Attachment #185253 -
Flags: review+
| Assignee | ||
Comment 10•20 years ago
|
||
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•