OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008, 2009 Google, Inc. | 3 * Copyright (C) 2008, 2009 Google, Inc. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 | 604 |
605 NSFont* font = [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize
:controlSize]]; | 605 NSFont* font = [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize
:controlSize]]; |
606 fontDescription.firstFamily().setFamily(@"BlinkMacSystemFont"); | 606 fontDescription.firstFamily().setFamily(@"BlinkMacSystemFont"); |
607 fontDescription.setComputedSize([font pointSize] * style.effectiveZoom()); | 607 fontDescription.setComputedSize([font pointSize] * style.effectiveZoom()); |
608 fontDescription.setSpecifiedSize([font pointSize] * style.effectiveZoom()); | 608 fontDescription.setSpecifiedSize([font pointSize] * style.effectiveZoom()); |
609 | 609 |
610 // Reset line height. | 610 // Reset line height. |
611 style.setLineHeight(ComputedStyle::initialLineHeight()); | 611 style.setLineHeight(ComputedStyle::initialLineHeight()); |
612 | 612 |
613 // TODO(esprehn): The fontSelector manual management is buggy and error pron
e. | 613 // TODO(esprehn): The fontSelector manual management is buggy and error pron
e. |
614 FontSelector* fontSelector = style.font().fontSelector(); | 614 FontSelector* fontSelector = style.font().getFontSelector(); |
615 if (style.setFontDescription(fontDescription)) | 615 if (style.setFontDescription(fontDescription)) |
616 style.font().update(fontSelector); | 616 style.font().update(fontSelector); |
617 } | 617 } |
618 | 618 |
619 NSControlSize LayoutThemeMac::controlSizeForSystemFont(const ComputedStyle& styl
e) const | 619 NSControlSize LayoutThemeMac::controlSizeForSystemFont(const ComputedStyle& styl
e) const |
620 { | 620 { |
621 float fontSize = style.fontSize(); | 621 float fontSize = style.fontSize(); |
622 float zoomLevel = style.effectiveZoom(); | 622 float zoomLevel = style.effectiveZoom(); |
623 if (zoomLevel != 1) | 623 if (zoomLevel != 1) |
624 fontSize /= zoomLevel; | 624 fontSize /= zoomLevel; |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1082 | 1082 |
1083 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const | 1083 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const |
1084 { | 1084 { |
1085 ControlPart part = style.appearance(); | 1085 ControlPart part = style.appearance(); |
1086 if (part == CheckboxPart || part == RadioPart) | 1086 if (part == CheckboxPart || part == RadioPart) |
1087 return style.effectiveZoom() != 1; | 1087 return style.effectiveZoom() != 1; |
1088 return false; | 1088 return false; |
1089 } | 1089 } |
1090 | 1090 |
1091 } // namespace blink | 1091 } // namespace blink |
OLD | NEW |