ASSERTION FAILED: name[0] == '@' && length >= 2 in
WebCore::CSSTokenizer::detectAtToken

At-rules have to contain 2 or more characters: one '@' character and at
least one more identifier character. This condition is checked in the
failing assertion.

Currently, the length of an at-rule is determined by doing pointer
arithmetic on the 'result' pointer, which is expected to be set to the
end of the at-rule identifier by the
WebCore::*CSSTokenizer::parseIdentifier method. If the at-rule token
is a sequence of 8-bit-only characters then 'result' will point correctly
at the end of the identifier. However, if the at-rule contains a 16-bit
Unicode escape then 'result' will not be updated correctly anymore, hence
it cannot be used for length calculation. On the other hand,
'resultString' always contains the whole at-rule identifier (without the
'@'' character), so taking its length + 1 will give the correct length
for any at-rule.

R=jchaffraix@chromium.org
BUG=364492

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

git-svn-id: svn://svn.chromium.org/blink/trunk@174853 bbb929c8-8fbe-4397-9dbb-9b2b20218538