Bug 264071 - Sync 'svg.css' UA stylesheet with SVG2 Web Specification
Summary: Sync 'svg.css' UA stylesheet with SVG2 Web Specification
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-01 18:30 PDT by Ahmad Saleem
Modified: 2024-07-26 08:48 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-11-01 18:30:27 PDT
Hi Team,

While going through random google searches, I came across that we don't have few of SVG UA Stylesheet rules, I think syncing them up would be good idea:

Web-Spec Link: https://svgwg.org/svg2-draft/styling.html#UAStyleSheet

We don't have:

*[xml|space=preserve] {
  text-space-collapse: preserve-spaces;
}

defs,
clipPath, mask, marker,
desc, title, metadata,
pattern, linearGradient, radialGradient,
script, style,
symbol {
  display: none !important;
}
:host(use) > symbol {
  display: inline !important;
}

and also

:link, :visited {
  cursor: pointer;
}

____

From above.


> text-space-collapse is renamed to 'white-space-collapse', so need to update and also :link and :visited, would need 'WebKit' specific bits.

Just raising, so we can fix them up and also would like to get inputs from others.

Thanks!
Comment 1 Ahmad Saleem 2023-11-01 18:51:11 PDT
We don't have to adopt all since they might not be right but we should evaluate, which don't lead to any regression.

On Experimental basis, I copy pasted and tried and it leads to 1200+ test differences (from SVG and WPT 'SVG' directory).
Comment 2 Nikolas Zimmermann 2023-11-06 00:33:06 PST
(In reply to Ahmad Saleem from comment #1)
> We don't have to adopt all since they might not be right but we should
> evaluate, which don't lead to any regression.
> 
> On Experimental basis, I copy pasted and tried and it leads to 1200+ test
> differences (from SVG and WPT 'SVG' directory).

Still makes sense, to adopt that.
Comment 3 Nikolas Zimmermann 2023-11-06 00:33:12 PST
(In reply to Ahmad Saleem from comment #1)
> We don't have to adopt all since they might not be right but we should
> evaluate, which don't lead to any regression.
> 
> On Experimental basis, I copy pasted and tried and it leads to 1200+ test
> differences (from SVG and WPT 'SVG' directory).

Still makes sense, to adopt that.
Comment 4 Radar WebKit Bug Importer 2023-11-08 17:31:31 PST
<rdar://problem/118149143>
Comment 5 Ahmad Saleem 2023-11-08 17:32:23 PST
Nikolas - I will create separate bugs (using this as blocker) to do them one by one to ensure that I don't regress anything. :-)
Comment 6 Tim Nguyen (:ntim) 2023-11-08 17:34:18 PST
WebKit doesn't implement `white-space-collapse: preserve-spaces;` currently.
Comment 7 Ahmad Saleem 2024-07-26 08:48:39 PDT
NOTE - text-xml-space-001.svg will be progressed after:

*[xml|space=preserve] {
  text-space-collapse: preserve-spaces;
}

Currently, Blink and WebKit (post my change yesterday), make it work like 'nowrap'.