|Summary:||nth-* pseudo-class parsing is incorrect|
|Product:||WebKit||Reporter:||Yuzo Fujishima <yuzo>|
|Component:||CSS||Assignee:||Yuzo Fujishima <yuzo>|
|Version:||528+ (Nightly build)|
|OS:||OS X 10.5|
Description Yuzo Fujishima 2010-04-18 19:38:33 PDT
WebCore::CSSSelector::RareData::parseNth doesn't check whether the search for '-' in the argument was successful. This results in incorrect parsing. For example, '3n' is parsed as if it were '3n-3'. The code has been working OK just accidentally.
Comment 1 Yuzo Fujishima 2010-04-18 19:41:06 PDT
Created attachment 53650 [details] Fix nth-* pseudo-class parsing.
Comment 2 Shinichiro Hamaji 2010-04-20 19:35:46 PDT
Comment on attachment 53650 [details] Fix nth-* pseudo-class parsing. This change looks good. How -n-3 will be parsed, by the way? I'm not sure, but I guess it will be parsed as -n-0, right?
Comment 3 Yuzo Fujishima 2010-04-27 02:13:05 PDT
-n-3 is parsed correctly. In determining m_b, '-' is searched by argument.find('-', 1), which finds the second '-' before '3'.
Comment 4 Yuzo Fujishima 2010-04-27 02:53:44 PDT
Committed r58300: <http://trac.webkit.org/changeset/58300>