Bug 123962

Summary: DOMTokenList::add can add duplicated values if arguments had duplicated values
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, arv, commit-queue, darin, esprehn+autocc, gyuyoung.kim, kling, sam
Priority: P2 Keywords: BlinkMergeCandidate, WebExposed
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fixes the bug none

Ryosuke Niwa
Reported 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'.
Attachments
Fixes the bug (4.25 KB, patch)
2013-11-06 23:47 PST, Ryosuke Niwa
no flags
Ryosuke Niwa
Comment 2 2013-11-06 23:47:35 PST
Created attachment 216264 [details] Fixes the bug
WebKit Commit Bot
Comment 3 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>
WebKit Commit Bot
Comment 4 2013-11-07 15:14:30 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.