Bug 256654 - Remove unused html namespace from svg.css
Summary: Remove unused html namespace from svg.css
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ahmad Saleem
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-11 11:12 PDT by Ahmad Saleem
Modified: 2023-05-12 15:44 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-05-11 11:12:12 PDT
Hi Team,

After checking Tim's commit:

https://github.com/WebKit/WebKit/commit/31c95fe588a14d215f4b395c018a9c2bdd6124c0

I thought to check 'svg.css' across browsers, I noticed that we have following namespace:

WebKit:

@namespace "http://www.w3.org/2000/svg";
@namespace html "http://www.w3.org/1999/xhtml";

_______

Firefox Nightly:


@namespace url(http://www.w3.org/2000/svg);
@namespace xml url(http://www.w3.org/XML/1998/namespace);

________

Chrome Canary:

@namespace "http://www.w3.org/2000/svg";

__________________

I think all browsers are bit different from each other.

___________________

Just wanted to raise to get input on which we should follow and whether anything needs to be done or not.

Thanks!
Comment 1 Tim Nguyen (:ntim) 2023-05-12 10:26:24 PDT
It appears `@namespace html "http://www.w3.org/1999/xhtml";` is unused in `svg.css`, so it can just be removed.

Usually CSS rules refer to namespaces like this: `html|foreignobject {` for instance.

`@namespace "http://www.w3.org/2000/svg";` already restricts everything to only apply to SVG.
Comment 2 Ahmad Saleem 2023-05-12 10:46:09 PDT
(In reply to Tim Nguyen (:ntim) from comment #1)
> It appears `@namespace html "http://www.w3.org/1999/xhtml";` is unused in
> `svg.css`, so it can just be removed.
> 
> Usually CSS rules refer to namespaces like this: `html|foreignobject {` for
> instance.
> 
> `@namespace "http://www.w3.org/2000/svg";` already restricts everything to
> only apply to SVG.

Should I remove it via PR?
Comment 3 Ahmad Saleem 2023-05-12 10:51:36 PDT
https://github.com/WebKit/WebKit/pull/13818
Comment 4 EWS 2023-05-12 15:43:25 PDT
Committed 264032@main (c64ff2859e1c): <https://commits.webkit.org/264032@main>

Reviewed commits have been landed. Closing PR #13818 and removing active labels.
Comment 5 Radar WebKit Bug Importer 2023-05-12 15:44:19 PDT
<rdar://problem/109283794>