Implement Element.matches(selectors)

http://dom.spec.whatwg.org/#dom-element-matches

No tested browser (Firefox Nightly, IE11 Release Preview, Opera 12.16)
has implemented the unprefixed API yet.

Having verified that the other browsers throw an exception for
*MatchesSelector(), make the argument to webkitMatchesSelector()
non-optional to align with them and the unprefixed API.

The spec requires throwing a TypeError when parsing the selectors
fails, but we currently throw a SyntaxError. So do the other browsers
for *MatchesSelector(), so file a spec bug instead of changing it:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24028

BUG=326652

Review URL: https://codereview.chromium.org/106983004

git-svn-id: svn://svn.chromium.org/blink/trunk@163442 bbb929c8-8fbe-4397-9dbb-9b2b20218538
6 files changed
tree: 4143de0ebf378f42bda64cb77d33e2c0b525b38b
  1. third_party/