Bug 127971

Summary: Improve the JavaScript bindings of DatasetDOMStringMap
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, esprehn+autocc, ggaren, kangil.han, kondapallykalyan, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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>