WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
39429
Add DOMStringList idl, needed for IndexedDB and for HTML5 drag & drop
https://bugs.webkit.org/show_bug.cgi?id=39429
Summary
Add DOMStringList idl, needed for IndexedDB and for HTML5 drag & drop
Jeremy Orlow
Reported
2010-05-20 09:12:50 PDT
Add DOMStringList idl
Attachments
Patch
(21.20 KB, patch)
2010-05-20 09:30 PDT
,
Jeremy Orlow
no flags
Details
Formatted Diff
Diff
Patch
(22.19 KB, patch)
2010-05-21 04:44 PDT
,
Jeremy Orlow
no flags
Details
Formatted Diff
Diff
Patch
(27.34 KB, patch)
2010-05-21 05:39 PDT
,
Jeremy Orlow
no flags
Details
Formatted Diff
Diff
Patch
(31.49 KB, patch)
2010-05-21 11:20 PDT
,
Jeremy Orlow
ap
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Jeremy Orlow
Comment 1
2010-05-20 09:30:14 PDT
Created
attachment 56601
[details]
Patch
Alexey Proskuryakov
Comment 2
2010-05-20 14:23:11 PDT
Comment on
attachment 56601
[details]
Patch There should also be a "constructor" on window. FWIW, I added and removed DOMStringList before, because it was unused. See
r44943
.
Jeremy Orlow
Comment 3
2010-05-21 04:44:27 PDT
Created
attachment 56697
[details]
Patch
Jeremy Orlow
Comment 4
2010-05-21 04:45:10 PDT
Thanks a lot for the pointer, Alexey! Sorry about forgetting the constructor. Fixed now. I noticed a couple differences between our code: 1) Custom bindings: Thankfully, it looks as though these are no longer required for either V8 or JSC. 2) StaticStringList: I could refactor my code to match what was originally there, but I guess I'm not sure I see a point at the moment. My (yet to be uploaded) IndexedDB patch simply builds up the list on demand (as the actual objectStore and index data is stored in objects, not simply as a list of strings) with the add method. I believe the standard procedure in cases like this is to keep it simple for now and let someone refactor later if something more complicated is necessary in the future. 3) DOMStringList.contains(): I double checked, but this is not in the latest version of the spec, so I have not included it. Please take another look? Given that we're in different time zones, if this patch is close, an "r+ with items to address before landing" would be greatly appreciated if nothing's too far off. Thanks!
Jeremy Orlow
Comment 5
2010-05-21 05:39:29 PDT
Created
attachment 56699
[details]
Patch
Alexey Proskuryakov
Comment 6
2010-05-21 09:16:11 PDT
Comment on
attachment 56699
[details]
Patch + void append(String string) { m_strings.append(string); } "const String&"! + return 1 if $type eq "CSSStyleDeclaration" or $type eq "MediaList" or $type eq "CSSVariablesDeclaration" or $type eq "DOMStringList"; This always makes me sad - why do we have IDLs if we encode knowledge about specific classes into code generator. Not something to fix in this patch, of course. + No new tests since nothing uses this. I'm happy to land it at the same time as + an IndexedDB change that uses this and adds a test, but IndexedDB is behind + a flag on all platforms besides chromium. Another option is to put this + behind the INDEXED_DATABASE flag until there's another consumer of it. I think that ChangeLog doesn't need a discussion of options you didn't take. 2) StaticStringList: OK. I'd add a comment in DOMStringList.h explaining that the current implementation only accommodates the case when all the strings are known in advance. It could go right after "Implements the IDL" comment, which conveniently lacks an ending period - so you need to fix that line anyway! 3) DOMStringList.contains(): I see it in <
http://www.w3.org/TR/DOM-Level-3-Core/core.html
>. What's the newer version? The one you reference in ChangeLog is older, not newer. We might actually need a better implementation of contains() than I had. I'd prefer to have a quick look at the fixed code. Just curious - what time zone are you in?
Jeremy Orlow
Comment 7
2010-05-21 09:53:58 PDT
(In reply to
comment #6
)
> (From update of
attachment 56699
[details]
) > + void append(String string) { m_strings.append(string); } > > "const String&"!
Oops. Sorry!
> + No new tests since nothing uses this. I'm happy to land it at the same time as > + an IndexedDB change that uses this and adds a test, but IndexedDB is behind > + a flag on all platforms besides chromium. Another option is to put this > + behind the INDEXED_DATABASE flag until there's another consumer of it. > > I think that ChangeLog doesn't need a discussion of options you didn't take.
This was more for the reviewer. I'm happy to take it out though.
> > 2) StaticStringList: > > OK. I'd add a comment in DOMStringList.h explaining that the current implementation only accommodates the case when all the strings are known in advance. It could go right after "Implements the IDL" comment, which conveniently lacks an ending period - so you need to fix that line anyway!
I don't understand why you want me to add a comment. As far as I can tell, this code is quite straightforward and I can't think of any potential land mines that might trip up a typical WebKit developer.
> 3) DOMStringList.contains(): > > I see it in <
http://www.w3.org/TR/DOM-Level-3-Core/core.html
>. What's the newer version? The one you reference in ChangeLog is older, not newer.
Oops, I was looking at an old copy of the spec apparently! Good catch.
> We might actually need a better implementation of contains() than I had.
What do you mean by this?
> I'd prefer to have a quick look at the fixed code. Just curious - what time zone are you in?
I'm in London these days. Np having another look. I just know that sometimes people r- even for tiny nits (which these aren't) so I added that in there. :-)
Jeremy Orlow
Comment 8
2010-05-21 11:20:25 PDT
Created
attachment 56731
[details]
Patch
Alexey Proskuryakov
Comment 9
2010-05-21 12:32:46 PDT
Comment on
attachment 56731
[details]
Patch +bool DOMStringList::contains(const String& str) const There's no need to abbreviate. +// FIXME: Some consumers of this class may benefit from lazily fetching items rather +// than creating the list statically as is currently the only option. If so, +// you may want to take a look at the original implementation which was removed +// in
r44943
and make this class an interface in a similar way. I don't think there was anything particularly high-tech in
r44943
to quote it, it's just as easy to write from scratch :). The FIXME should be shorter. + ] DOMStringList { + readonly attribute unsigned long length; + DOMString item(in [IsIndex] unsigned long index); + }; Please add contains(). + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of There is no "Apple Computer" any more, and we use a two-clause license - please see <
http://webkit.org/coding/bsd-license.html
>. r=me with these fixes.
Jeremy Orlow
Comment 10
2010-05-24 02:44:56 PDT
(In reply to
comment #9
)
> (From update of
attachment 56731
[details]
) > +bool DOMStringList::contains(const String& str) const > > There's no need to abbreviate. > > +// FIXME: Some consumers of this class may benefit from lazily fetching items rather > +// than creating the list statically as is currently the only option. If so, > +// you may want to take a look at the original implementation which was removed > +// in
r44943
and make this class an interface in a similar way. > > I don't think there was anything particularly high-tech in
r44943
to quote it, it's just as easy to write from scratch :). The FIXME should be shorter.
done
> + ] DOMStringList { > + readonly attribute unsigned long length; > + DOMString item(in [IsIndex] unsigned long index); > + }; > > Please add contains().
Oops!
> + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of > > There is no "Apple Computer" any more, and we use a two-clause license - please see <
http://webkit.org/coding/bsd-license.html
>.
Changed...but is there anything wrong with using a 3 clause license or using the ones with apple computer? Because I just copied this from another file. And it seems as though there's a lot with these mistakes. And, as far as I can tell, every mention (when submitting a patch and what I remember of the contributors agreement) only mentions "BSD License" not a specific one or one with a particular number of clauses.
Jeremy Orlow
Comment 11
2010-05-24 03:17:40 PDT
Committed
r60067
: <
http://trac.webkit.org/changeset/60067
>
WebKit Review Bot
Comment 12
2010-05-24 03:53:17 PDT
http://trac.webkit.org/changeset/60067
might have broken Qt Linux ARMv7 Release
Alexey Proskuryakov
Comment 13
2010-05-24 08:37:47 PDT
I don't think that three-clause is disallowed, it just seemed that you intended to use the most common license form, so I suggested taking the one from webkit.org. We have
bug 37076
and
bug 28072
tracking various aspects of cleaning up the situation.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug