Closed
Bug 217159
Opened 21 years ago
Closed 21 years ago
[FIX]Implement DOM L3 DOMStringList
Categories
(Core :: DOM: Core & HTML, enhancement, P1)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.6alpha
People
(Reporter: glazou, Assigned: bzbarsky)
References
()
Details
Attachments
(1 file, 3 obsolete files)
29.64 KB,
patch
|
caillon
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
I would like to see DOM Level 3 DOMStringList implemented since I need it for
Composer++.
Comment 1•21 years ago
|
||
Why do you need it? I don't know of anything that takes a DOMStringList off the
top of my head, and it's just a fancified Array.
Comment 2•21 years ago
|
||
IIRC there's only one use for DOMStringList and it's in DOM Level 3 Validation
(for enumeratedValues I think). I have an implementation in my DOM Level 3
Validation implementation, but that resides in webservices. Like caillon I
wonder why you'd need it.
Reporter | ||
Comment 3•21 years ago
|
||
Hey Peter!!!
Because of this: http://daniel.glazman.free.fr/csswg/csseom/csseom.html
![]() |
Assignee | |
Comment 4•21 years ago
|
||
I'm going to need this for some alternate stylesheet work I'm doing, so I'll
likely do this in the near future (like tonight).
I don't see an idl definition for this interface; where exactly in webservices
does this live?
Comment 5•21 years ago
|
||
It's not checked in yet. I'll see if I can dig it up.
Comment 6•21 years ago
|
||
Comment 7•21 years ago
|
||
Comment 8•21 years ago
|
||
Note that you'll want to use NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO instead of
NS_INTERFACE_MAP_ENTRY_EXTERNAL_DOM_CLASSINFO. Also, this isn't useable
cross-module, since we'd need an interface for adding the strings. You may not
want to solve that now, but if you're putting this in content I'll probably have
to figure it out in the future when I want to use it in webservices :-). You'll
also need to add it to DOMCI here:
http://lxr.mozilla.org/seamonkey/source/dom/src/base/nsDOMClassInfo.cpp#467
http://lxr.mozilla.org/seamonkey/source/dom/src/base/nsDOMClassInfo.cpp#1455
and we'll probably need a new scriptable helper too for operator [] access from
JS (I have a patch to provide a generic array SH but it's not ready yet).
![]() |
Assignee | |
Comment 9•21 years ago
|
||
peterv, thanks! I'll try to get that trunk-ready tonight, then.
![]() |
Assignee | |
Comment 10•21 years ago
|
||
Comment on attachment 132814 [details] [diff] [review]
IDL
r+sr=bzbarsky; the idl can be landed as-is, I would say. Perhaps we also want
to add the interfaces to domstubs.idl?
Attachment #132814 -
Flags: superreview+
Attachment #132814 -
Flags: review+
![]() |
Assignee | |
Comment 11•21 years ago
|
||
This includes both patches peterv attached, plus the classinfo changes. I
shamelessly stole Enumerate() from the content list implementation... we really
do need a generic array baseclass.
sr=bzbarsky on the actual implementation of both classes; looks good.
![]() |
Assignee | |
Updated•21 years ago
|
Attachment #132813 -
Attachment is obsolete: true
Attachment #132814 -
Attachment is obsolete: true
![]() |
Assignee | |
Comment 12•21 years ago
|
||
Comment on attachment 132908 [details] [diff] [review]
Complete patch
caillon, would you review? peterv, would you check over the classinfo changes?
Attachment #132908 -
Flags: superreview?(peterv)
Attachment #132908 -
Flags: review?(caillon)
![]() |
Assignee | |
Comment 13•21 years ago
|
||
Taking.
Assignee: dom_bugs → bzbarsky
Blocks: 200930
Priority: -- → P1
Summary: Implement DOM L3 DOMStringList → [FIX]Implement DOM L3 DOMStringList
Target Milestone: --- → mozilla1.6alpha
Comment 14•21 years ago
|
||
Comment on attachment 132908 [details] [diff] [review]
Complete patch
Looks good to me, though I think we want put Enumerate on nsStringArraySH.
Could you check with jst if he's ok with that?
Attachment #132908 -
Flags: superreview?(peterv) → superreview+
Comment 15•21 years ago
|
||
Comment on attachment 132908 [details] [diff] [review]
Complete patch
r=caillon if you fix the nsDOMLists files to use c-basic-offset: 2.
I also wonder whether nsStringArraySH should inherit from nsArraySH so you
don't even need to provide your own Enumerate() method, but I think there would
have to be some method over-riding, regardless so it may not gain anything.
But if that doesn't fall through, how about a |static nsresult
DOMArrayEnumerator()| or something that gets called by both so as to save the
extra codesize?
Attachment #132908 -
Flags: review?(caillon) → review+
![]() |
Assignee | |
Comment 16•21 years ago
|
||
The only difference is that I renamed nsArraySH to nsSupportsArraySH, added a
generic nsArraySH that just handles Enumerate, and made both nsSupportsArraySH
and nsStringArraySH inherit from it.
Thoughts?
Attachment #132908 -
Attachment is obsolete: true
![]() |
Assignee | |
Comment 17•21 years ago
|
||
Comment on attachment 133307 [details] [diff] [review]
Move Enumerate() into a shared superclass
Give it a once-over?
Attachment #133307 -
Flags: superreview?(peterv)
Attachment #133307 -
Flags: review?(caillon)
Comment 18•21 years ago
|
||
Comment on attachment 133307 [details] [diff] [review]
Move Enumerate() into a shared superclass
sr=jst
Attachment #133307 -
Flags: superreview?(peterv) → superreview+
Comment 19•21 years ago
|
||
Comment on attachment 133307 [details] [diff] [review]
Move Enumerate() into a shared superclass
Excellent, although I'm not sure I like the name nsSupportsArraySH since
nsISupportsArray is supposedly deprecated, and this sounds dastardly
similar.... How about leaving nsArraySH alone, and calling the superclass
nsGenericArraySH?
Oh, and when I said change the c-basic-offset, I meant not just for the
modelines, but for the actual file contents as well. ;-)
r=caillon
Attachment #133307 -
Flags: review?(caillon) → review+
![]() |
Assignee | |
Comment 20•21 years ago
|
||
Made the changes caillon asked for, and checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•