Bug 267841
| Summary: | Changing 'namespace' in UA Stylesheet leads to failures | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | karlcow, koivisto, m_dubet, ntim, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
Hi Team,
While trying to update namespace from bug 265495 and bug 264071, I noticed that WebKit / Safari start failing a bucket lot of tests while ideally it shouldn't.
e.g., SVG.css , update from:
https://searchfox.org/wubkat/rev/90f2bafbe99f4ab1ec05cd05d975c0bbd9aa3ad4/Source/WebCore/css/svg.css#28
Change:
@namespace "http://www.w3.org/2000/svg";
To (As per web-spec):
https://svgwg.org/svg2-draft/styling.html#UAStyleSheet
@namespace url(http://www.w3.org/2000/svg);
@namespace xml url(http://www.w3.org/XML/1998/namespace);
[Same is in case with mathml.css]
_____
Just try to run 'run-webkit-tests svg/ imported/w3c/web-platform-tests/svg/' and see new failures.
I think it is something we need to fix and worth tracking.
Thanks!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
Something to fix here?
https://searchfox.org/wubkat/rev/90f2bafbe99f4ab1ec05cd05d975c0bbd9aa3ad4/Source/WebCore/css/CSSNamespaceRule.cpp#53
Karl Dubost
I wonder what is returned by this in the two cases:
https://searchfox.org/wubkat/source/Source/WebCore/css/parser/CSSParserImpl.cpp#596-607
RefPtr<StyleRuleNamespace> CSSParserImpl::consumeNamespaceRule(CSSParserTokenRange prelude)
{
AtomString namespacePrefix;
if (prelude.peek().type() == IdentToken)
namespacePrefix = prelude.consumeIncludingWhitespace().value().toAtomString();
AtomString uri(consumeStringOrURI(prelude));
if (uri.isNull() || !prelude.atEnd())
return nullptr; // Parse error, expected string or URI
return StyleRuleNamespace::create(namespacePrefix, uri);
}
Radar WebKit Bug Importer
<rdar://problem/121822502>
Matthieu Dubet
I doubt it's the parsing cf https://wpt.fyi/results/css/css-namespaces/syntax-005.xml?label=master&label=experimental&aligned&q=namespace
However, it might be a bug with having multiple @namespace defined like this
Ahmad Saleem
(In reply to Matthieu Dubet from comment #4)
> I doubt it's the parsing cf
> https://wpt.fyi/results/css/css-namespaces/syntax-005.
> xml?label=master&label=experimental&aligned&q=namespace
>
> However, it might be a bug with having multiple @namespace defined like this
But it happens with MathML [bug 265495] as well, where we only have single @namespace.