DOM4 simplified this to include any element with a class attribute that matches.
Created attachment 286210 [details] Patch
Comment on attachment 286210 [details] Patch Clearing flags on attachment: 286210 Committed r204528: <http://trac.webkit.org/changeset/204528>
All reviewed patches have been landed. Closing bug.