Bug 127971 - Improve the JavaScript bindings of DatasetDOMStringMap
Summary: Improve the JavaScript bindings of DatasetDOMStringMap
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-30 17:17 PST by Benjamin Poulain
Modified: 2014-02-01 16:12 PST (History)
7 users (show)

See Also:


Attachments
Patch (8.48 KB, patch)
2014-01-30 17:21 PST, Benjamin Poulain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2014-01-30 17:17:59 PST
Improve the JavaScript bindings of DatasetDOMStringMap
Comment 1 Benjamin Poulain 2014-01-30 17:21:42 PST
Created attachment 222766 [details]
Patch
Comment 2 Benjamin Poulain 2014-02-01 00:05:42 PST
Comment on attachment 222766 [details]
Patch

Clearing flags on attachment: 222766

Committed r163239: <http://trac.webkit.org/changeset/163239>
Comment 3 Benjamin Poulain 2014-02-01 00:05:48 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Darin Adler 2014-02-01 08:06:23 PST
Comment on attachment 222766 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=222766&action=review

> Source/WebCore/dom/DatasetDOMStringMap.cpp:147
> +const AtomicString& DatasetDOMStringMap::item(const String& name, bool& isValid)

Isn’t isValid always the same as !isNull on the result? When can those two be out of sync?

> Source/WebCore/dom/DatasetDOMStringMap.h:32
> +#include <wtf/text/AtomicString.h>

Is this include needed? Why wouldn’t a forward declaration suffice? I think <wtf/Forward.h> should do.

> Source/WebCore/dom/DatasetDOMStringMap.h:33
>  #include <wtf/text/WTFString.h>

If the AtomicString.h include is needed, then this include can be removed.

But I think that we could use a forward declaration for this, too.
Comment 5 Benjamin Poulain 2014-02-01 13:10:22 PST
(In reply to comment #4)
> (From update of attachment 222766 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=222766&action=review
> 
> > Source/WebCore/dom/DatasetDOMStringMap.cpp:147
> > +const AtomicString& DatasetDOMStringMap::item(const String& name, bool& isValid)
> 
> Isn’t isValid always the same as !isNull on the result? When can those two be out of sync?

I assumed when an attribute is defined but has no value, its value string would be null.
Comment 6 Benjamin Poulain 2014-02-01 16:12:38 PST
Committed r163251: <http://trac.webkit.org/changeset/163251>