:-webkit-any pseudo with escaped '(' should not crash.

Pseudo classes or elements which had an escaped '(' character were
recognized as functions after it had been unescaped. That caused for
instance ":-webkit-any\(" to be correctly tokenized as ':' IDENT, but
incorrectly recognized as the -webkit-any _function_. Since mandatory
arguments were not present in the internal representation, the code crashed.

Fixed by making sure IDENTs are recognized as invalid pseudo classes, before
any token matching is done, if the unescaped IDENT ends with a '('.

Also, removed workaround code for a similar crasher for :not() now that the
parsing issue is fixed for :not() as well.

BUG=294023

Review URL: https://chromiumcodereview.appspot.com/23710067

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