In fact the bug was totally different, with a side-effect on @import and @namespaces : the tokenizer of WebKit did not accept at-rule identifiers nor "url(" with escaped characters... Test syntax-006.xml of the CSS 3 Namespaces Test Suite was then failing because the @namespace rule in the first line was thrown away (escaped char inside the url ident) and the @import rule on the second line was then valid instead of being invalid... So here's my first WebKit patch. It misses the bug URL in the Changelog and an automated test, but I did not have more time to give to WebKit today. If someone else wants to fix my patch for review, no problem.

With that fix in, WebKit fails only one last test in the CSS 3 Namespaces Test Suite while Safari 4.0.5 fails 6 tests...