Bug 99375

Summary: Add force parameter to DOMTokenList.toggle
Product: WebKit Reporter: Pablo Flouret <pf>
Component: DOMAssignee: Pablo Flouret <pf>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, arv, eric, ojan, webkit.review.bot
Priority: P2 Keywords: WebExposed
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Pablo Flouret 2012-10-15 15:47:40 PDT
https://www.w3.org/Bugs/Public/show_bug.cgi?id=18463

The optional boolean force parameter, if present, basically makes toggle always add or remove a class.
Comment 1 Pablo Flouret 2012-10-15 16:08:21 PDT
Created attachment 168797 [details]
Patch
Comment 2 Darin Adler 2012-10-15 20:39:45 PDT
Comment on attachment 168797 [details]
Patch

Code change looks fine. Test cases are not nearly extensive enough. We should do the toggle version of all the add and remove tests, plus we need to check the behavior when the argument is a non-boolean JavaScript value such as the numbers 0 and 1, null, undefined, or a string.
Comment 3 WebKit Review Bot 2012-10-15 20:57:05 PDT
Comment on attachment 168797 [details]
Patch

Clearing flags on attachment: 168797

Committed r131408: <http://trac.webkit.org/changeset/131408>
Comment 4 WebKit Review Bot 2012-10-15 20:57:09 PDT
All reviewed patches have been landed.  Closing bug.