Changeset 252034 in webkit


Ignore:
Timestamp:
Nov 4, 2019 7:16:01 PM (4 years ago)
Author:
mmaxfield@apple.com
Message:

Rename ui-monospaced to ui-monospace to match the monospace generic font family
https://bugs.webkit.org/show_bug.cgi?id=203602

Reviewed by Simon Fraser.

Source/WebCore:

As per https://github.com/w3c/csswg-drafts/issues/4469

Updated existing tests.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::platformFontLookupWithFamily):
(WebCore::fontWithFamilySpecialCase):

  • platform/graphics/cocoa/FontDescriptionCocoa.cpp:

(WebCore::matchSystemFontUse):

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:

(WebCore::SystemFontDatabaseCoreText::createDesignSystemUIFont):
(WebCore::SystemFontDatabaseCoreText::cascadeList):
(WebCore::SystemFontDatabaseCoreText::systemFontParameters):

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.h:

LayoutTests:

Updated existing tests.

  • fast/text/design-system-ui-12.html:
  • fast/text/design-system-ui-15.html:
  • fast/text/design-system-ui-2-expected.html:
  • fast/text/design-system-ui-2.html:
  • fast/text/design-system-ui-4-expected-mismatch.html:
  • fast/text/design-system-ui-4.html:
  • fast/text/design-system-ui-7-expected.html:
  • fast/text/design-system-ui-7.html:
  • fast/text/design-system-ui-9-expected-mismatch.html:
  • fast/text/design-system-ui-9.html:
Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r252033 r252034  
     12019-11-04  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Rename ui-monospaced to ui-monospace to match the monospace generic font family
     4        https://bugs.webkit.org/show_bug.cgi?id=203602
     5
     6        Reviewed by Simon Fraser.
     7
     8        Updated existing tests.
     9
     10        * fast/text/design-system-ui-12.html:
     11        * fast/text/design-system-ui-15.html:
     12        * fast/text/design-system-ui-2-expected.html:
     13        * fast/text/design-system-ui-2.html:
     14        * fast/text/design-system-ui-4-expected-mismatch.html:
     15        * fast/text/design-system-ui-4.html:
     16        * fast/text/design-system-ui-7-expected.html:
     17        * fast/text/design-system-ui-7.html:
     18        * fast/text/design-system-ui-9-expected-mismatch.html:
     19        * fast/text/design-system-ui-9.html:
     20
    1212019-11-04  Chris Dumez  <cdumez@apple.com>
    222
  • trunk/LayoutTests/fast/text/design-system-ui-12.html

    r251413 r252034  
    55<body>
    66<div>
    7 <div style="display: inline-block; font: 72px 'ui-monospaced';">HeJllo</div>
     7<div style="display: inline-block; font: 72px 'ui-monospace';">HeJllo</div>
    88</div>
    99</body>
  • trunk/LayoutTests/fast/text/design-system-ui-15.html

    r251413 r252034  
    44<style>
    55@font-face {
    6     font-family: "AppleSystemUIMonospaced";
    7     src: local("ui-monospaced");
     6    font-family: "AppleSystemUIMonospace";
     7    src: local("ui-monospace");
    88}
    99</style>
     
    1111<body>
    1212<div>
    13 <div style="display: inline-block; font: 72px 'AppleSystemUIMonospaced';">HeJllo</div>
     13<div style="display: inline-block; font: 72px 'AppleSystemUIMonospace';">HeJllo</div>
    1414</div>
    1515</body>
  • trunk/LayoutTests/fast/text/design-system-ui-2-expected.html

    r251413 r252034  
    77<div>
    88<div style="display: inline-block; font: bold 72px 'ui-serif';">HeJllo</div>
    9 <div style="display: inline-block; font: bold 72px 'ui-monospaced';">HeJllo</div>
     9<div style="display: inline-block; font: bold 72px 'ui-monospace';">HeJllo</div>
    1010<div style="display: inline-block; font: bold 72px 'ui-rounded';">HeJllo</div>
    1111<div style="display: inline-block; font: bold 72px '.AppleSystemUIFontSerif';">HeJllo</div>
  • trunk/LayoutTests/fast/text/design-system-ui-2.html

    r251413 r252034  
    77<div>
    88<div style="display: inline-block; font: bold 72px 'ui-serif'; font-synthesis: none;">HeJllo</div>
    9 <div style="display: inline-block; font: bold 72px 'ui-monospaced'; font-synthesis: none;">HeJllo</div>
     9<div style="display: inline-block; font: bold 72px 'ui-monospace'; font-synthesis: none;">HeJllo</div>
    1010<div style="display: inline-block; font: bold 72px 'ui-rounded'; font-synthesis: none;">HeJllo</div>
    1111<div style="display: inline-block; font: bold 72px '.AppleSystemUIFontSerif'; font-synthesis: none;">HeJllo</div>
  • trunk/LayoutTests/fast/text/design-system-ui-4-expected-mismatch.html

    r251413 r252034  
    55<body>
    66<div>
    7 <div style="display: inline-block; font: 72px 'ui-monospaced'; font-synthesis: none;">HeJllo</div>
     7<div style="display: inline-block; font: 72px 'ui-monospace'; font-synthesis: none;">HeJllo</div>
    88</div>
    99</body>
  • trunk/LayoutTests/fast/text/design-system-ui-4.html

    r251413 r252034  
    55<body>
    66<div>
    7 <div style="display: inline-block; font: bold 72px 'ui-monospaced'; font-synthesis: none;">HeJllo</div>
     7<div style="display: inline-block; font: bold 72px 'ui-monospace'; font-synthesis: none;">HeJllo</div>
    88</div>
    99</body>
  • trunk/LayoutTests/fast/text/design-system-ui-7-expected.html

    r251413 r252034  
    88}
    99@font-face {
    10     font-family: "AppleSystemUIMonospaced";
    11     src: local("ui-monospaced");
     10    font-family: "AppleSystemUIMonospace";
     11    src: local("ui-monospace");
    1212}
    1313@font-face {
     
    3737<div>
    3838<div style="display: inline-block; font: bold 72px 'AppleSystemUISerif';">HeJllo</div>
    39 <div style="display: inline-block; font: bold 72px 'AppleSystemUIMonospaced';">HeJllo</div>
     39<div style="display: inline-block; font: bold 72px 'AppleSystemUIMonospace';">HeJllo</div>
    4040<div style="display: inline-block; font: bold 72px 'AppleSystemUIRounded';">HeJllo</div>
    4141<div style="display: inline-block; font: bold 72px 'DotAppleSystemUIFontSerif';">HeJllo</div>
  • trunk/LayoutTests/fast/text/design-system-ui-7.html

    r251413 r252034  
    88}
    99@font-face {
    10     font-family: "AppleSystemUIMonospaced";
    11     src: local("ui-monospaced");
     10    font-family: "AppleSystemUIMonospace";
     11    src: local("ui-monospace");
    1212}
    1313@font-face {
     
    3737<div>
    3838<div style="display: inline-block; font: bold 72px 'AppleSystemUISerif'; font-synthesis: none;">HeJllo</div>
    39 <div style="display: inline-block; font: bold 72px 'AppleSystemUIMonospaced'; font-synthesis: none;">HeJllo</div>
     39<div style="display: inline-block; font: bold 72px 'AppleSystemUIMonospace'; font-synthesis: none;">HeJllo</div>
    4040<div style="display: inline-block; font: bold 72px 'AppleSystemUIRounded'; font-synthesis: none;">HeJllo</div>
    4141<div style="display: inline-block; font: bold 72px 'DotAppleSystemUIFontSerif'; font-synthesis: none;">HeJllo</div>
  • trunk/LayoutTests/fast/text/design-system-ui-9-expected-mismatch.html

    r251413 r252034  
    44<style>
    55@font-face {
    6     font-family: "AppleSystemUIMonospaced";
    7     src: local("ui-monospaced");
     6    font-family: "AppleSystemUIMonospace";
     7    src: local("ui-monospace");
    88}
    99</style>
     
    1111<body>
    1212<div>
    13 <div style="display: inline-block; font: 72px 'AppleSystemUIMonospaced'; font-synthesis: none;">HeJllo</div>
     13<div style="display: inline-block; font: 72px 'AppleSystemUIMonospace'; font-synthesis: none;">HeJllo</div>
    1414</div>
    1515</body>
  • trunk/LayoutTests/fast/text/design-system-ui-9.html

    r251413 r252034  
    44<style>
    55@font-face {
    6     font-family: "AppleSystemUIMonospaced";
    7     src: local("ui-monospaced");
     6    font-family: "AppleSystemUIMonospace";
     7    src: local("ui-monospace");
    88}
    99</style>
     
    1111<body>
    1212<div>
    13 <div style="display: inline-block; font: bold 72px 'AppleSystemUIMonospaced'; font-synthesis: none;">HeJllo</div>
     13<div style="display: inline-block; font: bold 72px 'AppleSystemUIMonospace'; font-synthesis: none;">HeJllo</div>
    1414</div>
    1515</body>
  • trunk/Source/WebCore/ChangeLog

    r252033 r252034  
     12019-11-04  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Rename ui-monospaced to ui-monospace to match the monospace generic font family
     4        https://bugs.webkit.org/show_bug.cgi?id=203602
     5
     6        Reviewed by Simon Fraser.
     7
     8        As per https://github.com/w3c/csswg-drafts/issues/4469
     9
     10        Updated existing tests.
     11
     12        * platform/graphics/cocoa/FontCacheCoreText.cpp:
     13        (WebCore::platformFontLookupWithFamily):
     14        (WebCore::fontWithFamilySpecialCase):
     15        * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
     16        (WebCore::matchSystemFontUse):
     17        * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
     18        (WebCore::SystemFontDatabaseCoreText::createDesignSystemUIFont):
     19        (WebCore::SystemFontDatabaseCoreText::cascadeList):
     20        (WebCore::SystemFontDatabaseCoreText::systemFontParameters):
     21        * platform/graphics/cocoa/SystemFontDatabaseCoreText.h:
     22
    1232019-11-04  Chris Dumez  <cdumez@apple.com>
    224
  • trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp

    r251413 r252034  
    12071207        || equalLettersIgnoringASCIICase(family, ".sf ui mono")
    12081208        || equalLettersIgnoringASCIICase(family, ".applesystemuifontrounded")) {
    1209         // If you want to use these fonts, use ui-serif, ui-monospaced, and ui-rounded.
     1209        // If you want to use these fonts, use ui-serif, ui-monospace, and ui-rounded.
    12101210        return { nullptr };
    12111211    }
     
    12741274    if (equalLettersIgnoringASCIICase(family, "ui-serif"))
    12751275        designSystemUI = SystemFontDatabaseCoreText::ClientUse::ForSystemUISerif;
    1276     else if (equalLettersIgnoringASCIICase(family, "ui-monospaced"))
    1277         designSystemUI = SystemFontDatabaseCoreText::ClientUse::ForSystemUIMonospaced;
     1276    else if (equalLettersIgnoringASCIICase(family, "ui-monospace"))
     1277        designSystemUI = SystemFontDatabaseCoreText::ClientUse::ForSystemUIMonospace;
    12781278    else if (equalLettersIgnoringASCIICase(family, "ui-rounded"))
    12791279        designSystemUI = SystemFontDatabaseCoreText::ClientUse::ForSystemUIRounded;
  • trunk/Source/WebCore/platform/graphics/cocoa/FontDescriptionCocoa.cpp

    r251413 r252034  
    5959    if (equalLettersIgnoringASCIICase(string, "ui-serif"))
    6060        return SystemFontDatabaseCoreText::ClientUse::ForSystemUISerif;
    61     if (equalLettersIgnoringASCIICase(string, "ui-monospaced"))
    62         return SystemFontDatabaseCoreText::ClientUse::ForSystemUIMonospaced;
     61    if (equalLettersIgnoringASCIICase(string, "ui-monospace"))
     62        return SystemFontDatabaseCoreText::ClientUse::ForSystemUIMonospace;
    6363    if (equalLettersIgnoringASCIICase(string, "ui-rounded"))
    6464        return SystemFontDatabaseCoreText::ClientUse::ForSystemUIRounded;
  • trunk/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp

    r251413 r252034  
    6969        design = kCTFontUIFontDesignSerif;
    7070        break;
    71     case ClientUse::ForSystemUIMonospaced:
     71    case ClientUse::ForSystemUIMonospace:
    7272        design = kCTFontUIFontDesignMonospaced;
    7373        break;
     
    109109            break;
    110110        case ClientUse::ForSystemUISerif:
    111         case ClientUse::ForSystemUIMonospaced:
     111        case ClientUse::ForSystemUIMonospace:
    112112        case ClientUse::ForSystemUIRounded:
    113113#if HAVE(DESIGN_SYSTEM_UI_FONTS)
     
    222222        break;
    223223    }
    224     case ClientUse::ForSystemUIMonospaced: {
    225         static NeverDestroyed<AtomString> systemUIMonospaced = AtomString("ui-monospaced", AtomString::ConstructFromLiteral);
    226         result.fontName = systemUIMonospaced.get();
     224    case ClientUse::ForSystemUIMonospace: {
     225        static NeverDestroyed<AtomString> systemUIMonospace = AtomString("ui-monospace", AtomString::ConstructFromLiteral);
     226        result.fontName = systemUIMonospace.get();
    227227        break;
    228228    }
  • trunk/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.h

    r247377 r252034  
    100100        ForSystemUI,
    101101        ForSystemUISerif,
    102         ForSystemUIMonospaced,
     102        ForSystemUIMonospace,
    103103        ForSystemUIRounded,
    104104        ForTextStyle
Note: See TracChangeset for help on using the changeset viewer.