Commit 837b74fe authored by Zhuoyu Qian's avatar Zhuoyu Qian Committed by Commit Bot

Rename toYosemiteFontWeight to toFontWeight.

Bug: 834860
Change-Id: I292c4c7fde0c17c0ba59aa468f78e56f7fe98e13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1982511
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: default avatarDominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#727733}
parent add326ba
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
namespace { namespace {
static CGFloat toYosemiteFontWeight(blink::FontSelectionValue font_weight) { static CGFloat toFontWeight(blink::FontSelectionValue font_weight) {
static uint64_t ns_font_weights[] = { static uint64_t ns_font_weights[] = {
0xbfe99999a0000000, // NSFontWeightUltraLight 0xbfe99999a0000000, // NSFontWeightUltraLight
0xbfe3333340000000, // NSFontWeightThin 0xbfe3333340000000, // NSFontWeightThin
...@@ -181,8 +181,7 @@ NSFont* MatchNSFontFamily(const AtomicString& desired_family_string, ...@@ -181,8 +181,7 @@ NSFont* MatchNSFontFamily(const AtomicString& desired_family_string,
// On OSX 10.10+, the default system font has more weights. // On OSX 10.10+, the default system font has more weights.
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability" #pragma clang diagnostic ignored "-Wunguarded-availability"
font = [NSFont systemFontOfSize:size font = [NSFont systemFontOfSize:size weight:toFontWeight(desired_weight)];
weight:toYosemiteFontWeight(desired_weight)];
#pragma clang diagnostic pop #pragma clang diagnostic pop
if (desired_traits & IMPORTANT_FONT_TRAITS) if (desired_traits & IMPORTANT_FONT_TRAITS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment