Bug 156468

Summary: Merge AttributedDOMTokenList into DOMTokenList
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2016-04-11 10:48:12 PDT
Merge AttributedDOMTokenList into AttributeTokenList to simplify the code. DOMTokenList is not constructible and AttributedDOMTokenList is its only constructible subclass.
Comment 1 Chris Dumez 2016-04-11 10:51:02 PDT
Created attachment 276157 [details]
Patch
Comment 2 Ryosuke Niwa 2016-04-11 10:57:36 PDT
Comment on attachment 276157 [details]
Patch

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

> Source/WebCore/html/DOMTokenList.cpp:203
> +    // Do not reset the DOMTokenList value if the attribute value was changed by us.

Why don't we assert that m_element is non-null.

> Source/WebCore/html/DOMTokenList.cpp:212
> +    m_cachedValue = nullAtom;

Ditto.
Comment 3 Chris Dumez 2016-04-11 10:58:55 PDT
Comment on attachment 276157 [details]
Patch

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

>> Source/WebCore/html/DOMTokenList.cpp:203
>> +    // Do not reset the DOMTokenList value if the attribute value was changed by us.
> 
> Why don't we assert that m_element is non-null.

because m_element is a reference?
Comment 4 Ryosuke Niwa 2016-04-11 11:12:05 PDT
Sorry, I meant to say attributeName.
Comment 5 Chris Dumez 2016-04-11 11:19:28 PDT
(In reply to comment #4)
> Sorry, I meant to say attributeName.

attributeName is passed to the constructor and is a QualifiedName, stored as m_attributeName.
Comment 6 Ryosuke Niwa 2016-04-11 11:47:43 PDT
Oh sorry, I misread your patch. I thought we had two constructors but we don't.
Comment 7 Chris Dumez 2016-04-11 11:49:06 PDT
Comment on attachment 276157 [details]
Patch

Clearing flags on attachment: 276157

Committed r199298: <http://trac.webkit.org/changeset/199298>
Comment 8 Chris Dumez 2016-04-11 11:49:09 PDT
All reviewed patches have been landed.  Closing bug.