WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 37787
nth-* pseudo-class parsing is incorrect
https://bugs.webkit.org/show_bug.cgi?id=37787
Summary
nth-* pseudo-class parsing is incorrect
Yuzo Fujishima
Reported
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.
Attachments
Fix nth-* pseudo-class parsing.
(1.44 KB, patch)
2010-04-18 19:41 PDT
,
Yuzo Fujishima
hamaji
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yuzo Fujishima
Comment 1
2010-04-18 19:41:06 PDT
Created
attachment 53650
[details]
Fix nth-* pseudo-class parsing.
Shinichiro Hamaji
Comment 2
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?
Yuzo Fujishima
Comment 3
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'.
Yuzo Fujishima
Comment 4
2010-04-27 02:53:44 PDT
Committed
r58300
: <
http://trac.webkit.org/changeset/58300
>
Yuzo Fujishima
Comment 5
2010-05-17 21:53:04 PDT
The original behavior was actually incorrect and the patch did fix it. Please see:
https://bugs.webkit.org/show_bug.cgi?id=31267
. I added tests there.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug