Closed
Bug 803106
Opened 12 years ago
Closed 11 years ago
Convert DOMStringList to WebIDL
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: bzbarsky, Assigned: peterv)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 4 obsolete files)
(deleted),
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
No description provided.
Comment 1•12 years ago
|
||
As per Bug 802157 Comment 12, I believe this requires WebIDL deleter support. Is there a bug for WebIDL delter support?
Reporter | ||
Comment 2•12 years ago
|
||
DOMStringList doesn't have a deleter.
That said, a bigger problem here is lack of sane parenting options, and the need to refactor our nsIDOMDOMStringList impls to have a useful common base class.
Assignee: bzbarsky → nobody
Comment 3•12 years ago
|
||
Ah, that was DOMStringMap, right?
Alright, I'm un-CCing this bug as I don't understand anything of this ;-)
Comment 4•11 years ago
|
||
Peter, I think you had patches for this, Bent will start looking at sync IDB implementation soon and we need to do something with DOMStringList before landing. I'll attach a patch here that we use at the moment for sync IDB.
Flags: needinfo?(peterv)
Comment 5•11 years ago
|
||
Reporter | ||
Comment 6•11 years ago
|
||
Why do we need a separate worker implementation here? Why can't we just use the normal DOMStringList on workers now that we have CC there?
Comment 7•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #6)
> Why do we need a separate worker implementation here? Why can't we just use
> the normal DOMStringList on workers now that we have CC there?
Yes, we can. I just attached what we have now for sync IDB implementation and peterv mentioned to me some time ago that he had patches for converting DOMStringList to WebIDL on main thread.
IDBKeyRange has a separate worker implementation too, but I'm working on using just one, but we need to convert main thread implementation to WebIDL first, bug 832883.
Assignee | ||
Comment 8•11 years ago
|
||
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Flags: needinfo?(peterv)
Assignee | ||
Comment 9•11 years ago
|
||
Assignee | ||
Comment 10•11 years ago
|
||
Attachment #8365072 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 11•11 years ago
|
||
Attachment #808763 -
Attachment is obsolete: true
Attachment #808764 -
Attachment is obsolete: true
Attachment #8365074 -
Flags: review?(bzbarsky)
Reporter | ||
Comment 12•11 years ago
|
||
Comment on attachment 8365072 [details] [diff] [review]
Move files and rename class v2
r=me
Attachment #8365072 -
Flags: review?(bzbarsky) → review+
Reporter | ||
Comment 13•11 years ago
|
||
Comment on attachment 8365074 [details] [diff] [review]
Switch DOMStringList to WebIDL v2
>+ const nsTArray<nsString>& Names() const
Is this used? I don't see any users...
>+ virtual void EnsureFresh()
Please document.
>+++ b/content/base/src/nsDocument.cpp
>+nsDOMStyleSheetSetList::EnsureFresh()
>+ return; // Spec says "no exceptions", and we have no style sets if we have
>+ // no document, for sure
Should we clear mNames? That would preserve the old behavior...
>+ if (!title.IsEmpty() && !mNames.Contains(title) && !Add(title)) {
Or maybe we should be clearing mNames up front in this function? Otherwise we need code here to _remove_ things from mNames, which sounds complicated.
>+++ b/content/html/content/src/HTMLPropertiesCollection.cpp
>- // ContainsInternal must not call EnsureFresh
Why remove the comment?
>+++ b/content/html/content/src/HTMLPropertiesCollection.h
>+ virtual void EnsureFresh();
Can be protected, right?
>+++ b/dom/base/nsDOMClassInfo.cpp
I believe nsStringArraySH is now dead code. Nuke it too?
DOMStringList::mNames is an infallible array. Should it be fallible instead, so the return value of Add() will actually mean something?
r=me with those fixed.
Attachment #8365074 -
Flags: review?(bzbarsky) → review+
Updated•11 years ago
|
Attachment #808275 -
Attachment is obsolete: true
Reporter | ||
Comment 14•11 years ago
|
||
Peter, can we get this landed? This is blocking bug 952890...
Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(peterv)
Reporter | ||
Comment 15•11 years ago
|
||
> Why remove the comment?
To answer my own question: because the callee has a comment too, and that's the right place to comment it.
Flags: needinfo?(peterv)
Reporter | ||
Comment 16•11 years ago
|
||
> Should it be fallible instead,
Makes the IDB code a pain. Will leave it for now, pending bug 968520 being fixed.
Reporter | ||
Comment 17•11 years ago
|
||
Reporter | ||
Comment 18•11 years ago
|
||
Reporter | ||
Updated•11 years ago
|
Attachment #8365074 -
Attachment is obsolete: true
Reporter | ||
Updated•11 years ago
|
Assignee: peterv → bzbarsky
Reporter | ||
Updated•11 years ago
|
Assignee: bzbarsky → peterv
Reporter | ||
Comment 19•11 years ago
|
||
I'm getting unified build failures with this patch because wingdi.h is redefining a macro that nsStyleLinkElement also defines... presumably because the different position of our cpp in the list moves things around.
Going to see if I can find a fix for that.
Reporter | ||
Comment 20•11 years ago
|
||
Filed bug 977553 on that.
Reporter | ||
Comment 21•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d4040ae9a5ed
https://hg.mozilla.org/integration/mozilla-inbound/rev/95fd86027306
Flags: in-testsuite+
Target Milestone: --- → mozilla30
Comment 22•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d4040ae9a5ed
https://hg.mozilla.org/mozilla-central/rev/95fd86027306
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•