Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutThemeMac.mm

Issue 2388623002: Replace internal uses of BlinkMacSystemFont on Mac with system-ui (Closed)
Patch Set: Rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutThemeMac.mm
diff --git a/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm b/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm
index 66960690144d8c7a1695a89a3312e1a3b7af820e..715ea2de5c693063914629522d2a0db4bdda14c4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm
+++ b/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm
@@ -250,14 +250,14 @@ void LayoutThemeMac::systemFont(CSSValueID systemFontID,
: FontStyleNormal;
fontWeight = toFontWeight([fontManager weightOfFont:font]);
fontSize = [font pointSize];
- fontFamily = @"BlinkMacSystemFont";
+ fontFamily = FontFamilyNames::system_ui;
}
bool LayoutThemeMac::needsHackForTextControlWithFontFamily(
const AtomicString& family) const {
// This hack is only applied on OSX 10.9.
// https://code.google.com/p/chromium/issues/detail?id=515989#c8
- return IsOS10_9() && family == "BlinkMacSystemFont";
+ return IsOS10_9() && family == FontFamilyNames::system_ui;
}
static RGBA32 convertNSColorToColor(NSColor* color) {
@@ -478,7 +478,8 @@ bool LayoutThemeMac::isControlStyled(const ComputedStyle& style) const {
return true;
if (!fontSizeMatchesToControlSize(style))
return true;
- if (style.getFontDescription().family().family() != "BlinkMacSystemFont")
+ if (style.getFontDescription().family().family() !=
+ FontFamilyNames::system_ui)
return true;
if (!style.height().isIntrinsicOrAuto())
return true;
@@ -644,7 +645,7 @@ void LayoutThemeMac::setFontFromControlSize(ComputedStyle& style,
NSFont* font = [NSFont
systemFontOfSize:[NSFont systemFontSizeForControlSize:controlSize]];
- fontDescription.firstFamily().setFamily(@"BlinkMacSystemFont");
+ fontDescription.firstFamily().setFamily(FontFamilyNames::system_ui);
fontDescription.setComputedSize([font pointSize] * style.effectiveZoom());
fontDescription.setSpecifiedSize([font pointSize] * style.effectiveZoom());
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/platform/fonts/FontCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698