CSSNthSelector parsing code is illegible and wrong (allows "n3" as a valid selector) Ojan pointed out to me that this code was completely unreadable. When I went to clean it up, I found a bug. Patch forthcoming.
Sam points out that my use of "wrong" might imply that the code itself was completely incorrect. That was certainly not the case. It simply has a few strictness bugs, which I found when trying to understand what it was doing.
Created attachment 24608 [details] Code changes, tests coming soon WebCore/css/CSSNthSelector.cpp | 105 ++++++++++++++++++++++++++-------------- WebCore/css/CSSSelector.h | 1 + 2 files changed, 70 insertions(+), 36 deletions(-)
The patch I just uploaded to https://bugs.webkit.org/show_bug.cgi?id=51231 should also fix this bug. (The ns part of it). Since the class CSSNthSelector no longer exists, should this bug be marked as duplicate of bug 51231 ?
Is this fixed as part of bug 51231?
We've since rewritten CSS parser by adopting Blink's.