[Webkit-unassigned] [Bug 83885] CSS3 Selectors failures on css3test.com

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 16 04:30:33 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=83885





--- Comment #6 from Zoltan Herczeg <zherczeg at webkit.org>  2012-04-16 04:30:33 PST ---
(From update of attachment 137311)
View in context: https://bugs.webkit.org/attachment.cgi?id=137311&action=review

> Source/WebCore/ChangeLog:14
> +        In parseIdentifier function, loop doesn't break for numbers as isCSSLetter(digit) is true,
> +        CharacterDash is greater than CharacterNumber.
> +        Set m_currentCharacter to '-' and resume parsing of number.

Ok this is somewhat better, but I don't think anyone will understand this except me.

Basically the issue is that n-100 is a valid CSS identifier, since it is built from letters, numbers and dashes. However, in NthChildMode we need to check whether this identifier is a valid nth child descriptor. The original code only checked this if the string was n- but this is not enough. We need to check everything which starts with an n- prefix.

> LayoutTests/css3/parsing-css3-nthchild-expected.txt:8
> +#a:nth-child(n-1) { color: green; }
> +#b:nth-child(n- 10) { color: green; }
> +#c:nth-child(-n-1) { color: green; }
> +#d:nth-child(-n- 10) { color: green; }

I think we should add some invalid forms as well, which enters the new condition, but fails later like: n-a n-1a1 and such.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list