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

Side by Side Diff: Source/platform/mac/ThemeMac.mm

Issue 139243002: StringImpl should not be referred from StringImplCF. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 568
569 FontDescription ThemeMac::controlFont(ControlPart part, const FontDescription& f ontDescription, float zoomFactor) const 569 FontDescription ThemeMac::controlFont(ControlPart part, const FontDescription& f ontDescription, float zoomFactor) const
570 { 570 {
571 switch (part) { 571 switch (part) {
572 case PushButtonPart: { 572 case PushButtonPart: {
573 FontDescription result; 573 FontDescription result;
574 result.setIsAbsoluteSize(true); 574 result.setIsAbsoluteSize(true);
575 result.setGenericFamily(FontDescription::SerifFamily); 575 result.setGenericFamily(FontDescription::SerifFamily);
576 576
577 NSFont* nsFont = [NSFont systemFontOfSize:[NSFont systemFontSizeForC ontrolSize:controlSizeForFont(fontDescription)]]; 577 NSFont* nsFont = [NSFont systemFontOfSize:[NSFont systemFontSizeForC ontrolSize:controlSizeForFont(fontDescription)]];
578 result.firstFamily().setFamily([nsFont webCoreFamilyName]); 578 NSString* nsFamilyName = [nsFont webCoreFamilyName];
579 result.firstFamily().setFamily(AtomicString([nsFamilyName UTF8String ]));
579 result.setComputedSize([nsFont pointSize] * zoomFactor); 580 result.setComputedSize([nsFont pointSize] * zoomFactor);
580 result.setSpecifiedSize([nsFont pointSize] * zoomFactor); 581 result.setSpecifiedSize([nsFont pointSize] * zoomFactor);
581 return result; 582 return result;
582 } 583 }
583 default: 584 default:
584 return Theme::controlFont(part, fontDescription, zoomFactor); 585 return Theme::controlFont(part, fontDescription, zoomFactor);
585 } 586 }
586 } 587 }
587 588
588 LengthSize ThemeMac::controlSize(ControlPart part, const FontDescription& fontDe scription, const LengthSize& zoomedSize, float zoomFactor) const 589 LengthSize ThemeMac::controlSize(ControlPart part, const FontDescription& fontDe scription, const LengthSize& zoomedSize, float zoomFactor) const
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 break; 720 break;
720 case InnerSpinButtonPart: 721 case InnerSpinButtonPart:
721 paintStepper(states, context, zoomedRect, zoomFactor, scrollView); 722 paintStepper(states, context, zoomedRect, zoomFactor, scrollView);
722 break; 723 break;
723 default: 724 default:
724 break; 725 break;
725 } 726 }
726 } 727 }
727 728
728 } 729 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698