New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Universal selector is described incorrectly #8911
Comments
I tend to think they should be the same. For |
https://bugs.webkit.org/show_bug.cgi?id=184604 rdar://97092572 Reviewed by Antti Koivisto and Tim Nguyen. We did not use serializeIdentifier for qualified name prefixes and local names. E.g., x:x was not serialized as x\:x. This was previously attempted, but it would do the wrong thing for * and thus backed out. So now we do not escape when prefix or local name is *. The only edge case remaining is whether the * and \* inputs should mean the same thing. w3c/csswg-drafts#8911 will eventually address this. Meanwhile this seems like a solid improvement. Also synchronize web-platform-tests/css/cssom up to upstream commit 57c5006 for real this time. 264934@main missed a couple changes. * LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssimportrule-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssimportrule.html: * LayoutTests/imported/w3c/web-platform-tests/css/cssom/selectorSerialize-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/cssom/selectorSerialize.html: * LayoutTests/imported/w3c/web-platform-tests/css/cssom/xml-stylesheet-pi-in-doctype.xhtml: * Source/WebCore/css/CSSSelector.cpp: (WebCore::serializeIdentifierOrStar): (WebCore::CSSSelector::selectorText const): Canonical link: https://commits.webkit.org/264980@main
web-platform-tests/wpt#40451 adds a test with a |
https://bugs.webkit.org/show_bug.cgi?id=184604 rdar://97092572 Reviewed by Antti Koivisto and Tim Nguyen. We did not use serializeIdentifier for qualified name prefixes and local names. E.g., x:x was not serialized as x\:x. This was previously attempted, but it would do the wrong thing for * and thus backed out. So now we do not escape when prefix or local name is *. The only edge case remaining is whether the * and \* inputs should mean the same thing. w3c/csswg-drafts#8911 will eventually address this. Meanwhile this seems like a solid improvement. Also synchronize web-platform-tests/css/cssom up to upstream commit 57c5006103146974adb3af50d325c3b6ce7153d0 for real this time. 264934@main missed a couple changes. * LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssimportrule-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssimportrule.html: * LayoutTests/imported/w3c/web-platform-tests/css/cssom/selectorSerialize-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/cssom/selectorSerialize.html: * LayoutTests/imported/w3c/web-platform-tests/css/cssom/xml-stylesheet-pi-in-doctype.xhtml: * Source/WebCore/css/CSSSelector.cpp: (WebCore::serializeIdentifierOrStar): (WebCore::CSSSelector::selectorText const): Canonical link: https://commits.webkit.org/264980@main
https://drafts.csswg.org/selectors/#the-universal-selector says it's written like a CSS qualified name but that is wrong, as
*
is not a valid CSS qualified name.\*
is, but is not the same as the universal selector.Gecko appears to do this correctly for both the prefix and local name. Chromium does it correctly for the local name, but not the prefix. WebKit currently treats
*
and\*
as equivalent, for both local name and prefix.There's no test coverage for this currently.
This relates to #8909.
(https://drafts.csswg.org/css-namespaces/ seems correct in how it describes this, though there might be room for improvement.)
(I discovered this mismatch in https://bugs.webkit.org/show_bug.cgi?id=184604.)
The text was updated successfully, but these errors were encountered: