Bug 123962 - DOMTokenList::add can add duplicated values if arguments had duplicated values
Summary: DOMTokenList::add can add duplicated values if arguments had duplicated values
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: BlinkMergeCandidate, WebExposed
Depends on:
Blocks:
 
Reported: 2013-11-06 23:44 PST by Ryosuke Niwa
Modified: 2013-11-07 15:14 PST (History)
8 users (show)

See Also:


Attachments
Fixes the bug (4.25 KB, patch)
2013-11-06 23:47 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-11-06 23:44:15 PST
DOMTokenList::add(const Vector<String>& tokens, ExceptionCode& ec) ensures that newly added tokens are unique existing the existing tokens but don't ensure that newly added tokens are themselves unique.

e.g. element.classList.add('a b a') results in element.className being 'a b a' instead of 'a b'.
Comment 2 Ryosuke Niwa 2013-11-06 23:47:35 PST
Created attachment 216264 [details]
Fixes the bug
Comment 3 WebKit Commit Bot 2013-11-07 15:14:27 PST
Comment on attachment 216264 [details]
Fixes the bug

Clearing flags on attachment: 216264

Committed r158877: <http://trac.webkit.org/changeset/158877>
Comment 4 WebKit Commit Bot 2013-11-07 15:14:30 PST
All reviewed patches have been landed.  Closing bug.