[webkit-reviews] review granted: [Bug 178280] DOMTokenList shouldn't add empty attributes : [Attachment 323729] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 13 13:15:01 PDT 2017


Ryosuke Niwa <rniwa at webkit.org> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 178280: DOMTokenList shouldn't add empty attributes
https://bugs.webkit.org/show_bug.cgi?id=178280

Attachment 323729: Patch

https://bugs.webkit.org/attachment.cgi?id=323729&action=review




--- Comment #2 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 323729
  --> https://bugs.webkit.org/attachment.cgi?id=323729
Patch

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

> Source/WebCore/html/DOMTokenList.cpp:252
> +    if (!m_element.hasAttribute(m_attributeName) && tokens().isEmpty())
> +	   return;

It's a bit inefficient to check this and then later call setAttribute since
that would find the attribute twice
but I guess we don't have a mechanism to update the attributes using Attribute
easily.


More information about the webkit-reviews mailing list