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

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

Issue 1299653004: Revert "Reland 2: mac: Use a placeholder string for the family name of the system font." (branch 248 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@2485
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/layout/LayoutThemeMac.h ('k') | Source/platform/blink_platform.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutThemeMac.mm
diff --git a/Source/core/layout/LayoutThemeMac.mm b/Source/core/layout/LayoutThemeMac.mm
index 7ada83ecad5247fb21a71254a20e95fa39befc13..507401a54c330e01c516e1c3b519c2e217e4f3e7 100644
--- a/Source/core/layout/LayoutThemeMac.mm
+++ b/Source/core/layout/LayoutThemeMac.mm
@@ -37,7 +37,6 @@
#import "platform/mac/ColorMac.h"
#import "platform/mac/LocalCurrentGraphicsContext.h"
#import "platform/mac/ThemeMac.h"
-#import "platform/mac/VersionUtilMac.h"
#import "platform/mac/WebCoreNSCellExtras.h"
#import "platform/text/PlatformLocale.h"
#import "platform/text/StringTruncator.h"
@@ -239,14 +238,7 @@ void LayoutThemeMac::systemFont(CSSValueID systemFontID, FontStyle& fontStyle, F
fontStyle = ([fontManager traitsOfFont:font] & NSItalicFontMask) ? FontStyleItalic : FontStyleNormal;
fontWeight = toFontWeight([fontManager weightOfFont:font]);
fontSize = [font pointSize];
- fontFamily = @"BlinkMacSystemFont";
-}
-
-bool LayoutThemeMac::needsHackForTextControlWithFontFamily(const AtomicString& family) const
-{
- // This hack is only applied on OSX 10.9 and earlier.
- // https://code.google.com/p/chromium/issues/detail?id=515989#c8
- return IsOSMavericksOrEarlier() && family == "BlinkMacSystemFont";
+ fontFamily = [font webCoreFamilyName];
}
static RGBA32 convertNSColorToColor(NSColor *color)
@@ -600,7 +592,7 @@ void LayoutThemeMac::setFontFromControlSize(ComputedStyle& style, NSControlSize
fontDescription.setGenericFamily(FontDescription::SerifFamily);
NSFont* font = [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:controlSize]];
- fontDescription.firstFamily().setFamily(@"BlinkMacSystemFont");
+ fontDescription.firstFamily().setFamily([font webCoreFamilyName]);
fontDescription.setComputedSize([font pointSize] * style.effectiveZoom());
fontDescription.setSpecifiedSize([font pointSize] * style.effectiveZoom());
« no previous file with comments | « Source/core/layout/LayoutThemeMac.h ('k') | Source/platform/blink_platform.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698