Bug 151493 - Alias "system-ui" for the System font name
Summary: Alias "system-ui" for the System font name
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar, WebExposed
Depends on:
Blocks: 229131
  Show dependency treegraph
 
Reported: 2015-11-20 07:58 PST by Timothy Hatcher
Modified: 2021-08-16 02:10 PDT (History)
7 users (show)

See Also:


Attachments
Patch (35.99 KB, patch)
2017-02-12 03:05 PST, Jon Lee
no flags Details | Formatted Diff | Diff
Patch (58.20 KB, patch)
2017-02-12 16:22 PST, Jon Lee
no flags Details | Formatted Diff | Diff
Patch (60.33 KB, patch)
2017-02-24 01:54 PST, Jon Lee
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2015-11-20 07:58:59 PST
Per W3C minutes: "Resolved: Change system to system-ui in Fonts 4"

https://www.w3.org/blog/CSS/2015/11/19/minutes-telecon-267/
Comment 1 Radar WebKit Bug Importer 2015-11-20 07:59:11 PST
<rdar://problem/23629107>
Comment 2 Myles C. Maxfield 2015-11-20 10:43:04 PST
The old name can't stop working.
Comment 3 Jon Lee 2017-02-12 03:05:20 PST
Created attachment 301301 [details]
Patch
Comment 4 Jon Lee 2017-02-12 03:06:06 PST
submitted for EWS.
Comment 5 Jon Lee 2017-02-12 16:18:53 PST
We never supported "system", so removing that from the title.
Comment 6 Jon Lee 2017-02-12 16:22:26 PST
Created attachment 301322 [details]
Patch
Comment 7 Myles C. Maxfield 2017-02-13 15:09:58 PST
Comment on attachment 301322 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=301322&action=review

What about styling list boxes? IIRC those are styled with CSS which means we would need somewhere to specify the system font.

This is the bug I was going to use for the expansion behavior to make "system-ui" expand to many fonts for the CT cascade list. If this one is just for the single font, do we have another but for that larger task?

> Source/WebCore/css/WebKitFontFamilyNames.in:8
> +systemUiFamily="-webkit-system-ui"

Why is this prefixed? We never shipped with -webkit-system-ui and we generally want to avoid unnecessary prefixes.
Comment 8 Jon Lee 2017-02-24 01:10:37 PST
Comment on attachment 301322 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=301322&action=review

>> Source/WebCore/css/WebKitFontFamilyNames.in:8
>> +systemUiFamily="-webkit-system-ui"
> 
> Why is this prefixed? We never shipped with -webkit-system-ui and we generally want to avoid unnecessary prefixes.

This file is used to generate a .cpp file that contains the symbols. I don't think the string is surfaced anywhere.
Comment 9 Jon Lee 2017-02-24 01:50:15 PST
(In reply to comment #7)
> Comment on attachment 301322 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=301322&action=review
> 
> What about styling list boxes? IIRC those are styled with CSS which means we
> would need somewhere to specify the system font.

It uses "-webkit-small-control".
 
> This is the bug I was going to use for the expansion behavior to make
> "system-ui" expand to many fonts for the CT cascade list. If this one is
> just for the single font, do we have another but for that larger task?
> 

Filed 168827.
Comment 10 Jon Lee 2017-02-24 01:54:05 PST
Created attachment 302660 [details]
Patch
Comment 11 Jon Lee 2017-02-24 01:54:42 PST
Removed unneeded changes to FontGenericFamilies, and added Web Inspector support.
Comment 12 Tim Horton 2017-02-24 18:00:59 PST
Comment on attachment 302660 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=302660&action=review

> Source/WebCore/ChangeLog:32
> +2017-02-12  Jon Lee  <jonlee@apple.com>

Double changelog.

> Source/WebInspectorUI/UserInterface/External/CodeMirror/css.js:666
> -    "subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "table",
> +    "subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",

Joe says not to modify this file, but instead file a bug on the upstream project.
Comment 13 Jon Lee 2017-02-24 18:09:32 PST
Committed r212985: <http://trac.webkit.org/changeset/212985>
Comment 14 Frédéric Wang (:fredw) 2021-08-16 01:54:44 PDT
(In reply to Jon Lee from comment #8)
> Comment on attachment 301322 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=301322&action=review
> 
> >> Source/WebCore/css/WebKitFontFamilyNames.in:8
> >> +systemUiFamily="-webkit-system-ui"
> > 
> > Why is this prefixed? We never shipped with -webkit-system-ui and we generally want to avoid unnecessary prefixes.
> 
> This file is used to generate a .cpp file that contains the symbols. I don't
> think the string is surfaced anywhere.

I checked the three places where you actually used the symbol. Two of them seem dead code since the font-family names in font and @font-face parsing don't actually create a CSS ID value for system-ui.

The third one in compute style is web-exposed, see "Serialization of prefixed -webkit-<generic-family>" in https://w3c-test.org/css/cssom/font-family-serialization-001.html (set kGenericFontFamilyKeywords=["system-ui"] to test it).