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

Side by Side Diff: third_party/WebKit/Source/platform/mac/ThemeMac.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2010, 2011, 2012 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2010, 2011, 2012 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 float zoomFactor) const { 386 float zoomFactor) const {
387 switch (part) { 387 switch (part) {
388 case PushButtonPart: { 388 case PushButtonPart: {
389 FontDescription result; 389 FontDescription result;
390 result.setIsAbsoluteSize(true); 390 result.setIsAbsoluteSize(true);
391 result.setGenericFamily(FontDescription::SerifFamily); 391 result.setGenericFamily(FontDescription::SerifFamily);
392 392
393 NSFont* nsFont = [NSFont 393 NSFont* nsFont = [NSFont
394 systemFontOfSize:[NSFont systemFontSizeForControlSize: 394 systemFontOfSize:[NSFont systemFontSizeForControlSize:
395 controlSizeForFont(fontDescription)]]; 395 controlSizeForFont(fontDescription)]];
396 result.firstFamily().setFamily(@"BlinkMacSystemFont"); 396 result.firstFamily().setFamily(FontFamilyNames::system_ui);
397 result.setComputedSize([nsFont pointSize] * zoomFactor); 397 result.setComputedSize([nsFont pointSize] * zoomFactor);
398 result.setSpecifiedSize([nsFont pointSize] * zoomFactor); 398 result.setSpecifiedSize([nsFont pointSize] * zoomFactor);
399 return result; 399 return result;
400 } 400 }
401 default: 401 default:
402 return Theme::controlFont(part, fontDescription, zoomFactor); 402 return Theme::controlFont(part, fontDescription, zoomFactor);
403 } 403 }
404 } 404 }
405 405
406 LengthSize ThemeMac::controlSize(ControlPart part, 406 LengthSize ThemeMac::controlSize(ControlPart part,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 zoomedRect = 541 zoomedRect =
542 inflateRect(zoomedRect, zoomedSize, stepperMargin, zoomFactor); 542 inflateRect(zoomedRect, zoomedSize, stepperMargin, zoomFactor);
543 break; 543 break;
544 } 544 }
545 default: 545 default:
546 break; 546 break;
547 } 547 }
548 END_BLOCK_OBJC_EXCEPTIONS 548 END_BLOCK_OBJC_EXCEPTIONS
549 } 549 }
550 } 550 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/FontCache.cpp ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698