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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/mac/FontFamilyMatcherMac.mm

Issue 2043883002: mac: Delete some pre-OS X 10.9 code in blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // switch is made, this should be changed to return .LucidaGrandeUI and 139 // switch is made, this should be changed to return .LucidaGrandeUI and
140 // the Layout Expectations should be updated. http://crbug.com/515836. 140 // the Layout Expectations should be updated. http://crbug.com/515836.
141 if (LayoutTestSupport::isRunningLayoutTest() && IsOSMavericks()) { 141 if (LayoutTestSupport::isRunningLayoutTest() && IsOSMavericks()) {
142 if (desiredWeight >= blink::FontWeightBold) 142 if (desiredWeight >= blink::FontWeightBold)
143 return [NSFont fontWithName:@"Lucida Grande Bold" size:size]; 143 return [NSFont fontWithName:@"Lucida Grande Bold" size:size];
144 else 144 else
145 return [NSFont fontWithName:@"Lucida Grande" size:size]; 145 return [NSFont fontWithName:@"Lucida Grande" size:size];
146 } 146 }
147 147
148 NSFont* font = nil; 148 NSFont* font = nil;
149 if (IsOSMavericksOrEarlier()) { 149 if (IsOSMavericks()) {
150 // On older OSX versions, only bold and regular are available. 150 // On older OSX versions, only bold and regular are available.
151 if (desiredWeight >= blink::FontWeightBold) 151 if (desiredWeight >= blink::FontWeightBold)
152 font = [NSFont boldSystemFontOfSize:size]; 152 font = [NSFont boldSystemFontOfSize:size];
153 else 153 else
154 font = [NSFont systemFontOfSize:size]; 154 font = [NSFont systemFontOfSize:size];
155 } 155 }
156 else { 156 else {
157 // On OSX 10.10+, the default system font has more weights. 157 // On OSX 10.10+, the default system font has more weights.
158 font = [NSFont systemFontOfSize:size weight:toYosemiteFontWeight(des iredWeight)]; 158 font = [NSFont systemFontOfSize:size weight:toYosemiteFontWeight(des iredWeight)];
159 } 159 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 6, // FontWeight500 284 6, // FontWeight500
285 8, // FontWeight600 285 8, // FontWeight600
286 9, // FontWeight700 286 9, // FontWeight700
287 10, // FontWeight800 287 10, // FontWeight800
288 12, // FontWeight900 288 12, // FontWeight900
289 }; 289 };
290 return appKitFontWeights[fontWeight]; 290 return appKitFontWeights[fontWeight];
291 } 291 }
292 292
293 } // namespace blink 293 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ThemePainterMac.mm ('k') | third_party/WebKit/Source/platform/mac/ThemeMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698