| 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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 | 733 |
| 734 NSFont* font = [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize
:controlSize]]; | 734 NSFont* font = [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize
:controlSize]]; |
| 735 fontDescription.firstFamily().setFamily([font webCoreFamilyName]); | 735 fontDescription.firstFamily().setFamily([font webCoreFamilyName]); |
| 736 fontDescription.setComputedSize([font pointSize] * style->effectiveZoom()); | 736 fontDescription.setComputedSize([font pointSize] * style->effectiveZoom()); |
| 737 fontDescription.setSpecifiedSize([font pointSize] * style->effectiveZoom()); | 737 fontDescription.setSpecifiedSize([font pointSize] * style->effectiveZoom()); |
| 738 | 738 |
| 739 // Reset line height | 739 // Reset line height |
| 740 style->setLineHeight(RenderStyle::initialLineHeight()); | 740 style->setLineHeight(RenderStyle::initialLineHeight()); |
| 741 | 741 |
| 742 if (style->setFontDescription(fontDescription)) | 742 if (style->setFontDescription(fontDescription)) |
| 743 style->font().update(0); | 743 style->font().update(nullptr); |
| 744 } | 744 } |
| 745 | 745 |
| 746 NSControlSize RenderThemeChromiumMac::controlSizeForSystemFont(RenderStyle* styl
e) const | 746 NSControlSize RenderThemeChromiumMac::controlSizeForSystemFont(RenderStyle* styl
e) const |
| 747 { | 747 { |
| 748 float fontSize = style->fontSize(); | 748 float fontSize = style->fontSize(); |
| 749 float zoomLevel = style->effectiveZoom(); | 749 float zoomLevel = style->effectiveZoom(); |
| 750 if (zoomLevel != 1) | 750 if (zoomLevel != 1) |
| 751 fontSize /= zoomLevel; | 751 fontSize /= zoomLevel; |
| 752 if (fontSize >= [NSFont systemFontSizeForControlSize:NSRegularControlSize]) | 752 if (fontSize >= [NSFont systemFontSizeForControlSize:NSRegularControlSize]) |
| 753 return NSRegularControlSize; | 753 return NSRegularControlSize; |
| (...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2015 | 2015 |
| 2016 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const | 2016 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const |
| 2017 { | 2017 { |
| 2018 ControlPart part = style->appearance(); | 2018 ControlPart part = style->appearance(); |
| 2019 if (part == CheckboxPart || part == RadioPart) | 2019 if (part == CheckboxPart || part == RadioPart) |
| 2020 return style->effectiveZoom() != 1; | 2020 return style->effectiveZoom() != 1; |
| 2021 return false; | 2021 return false; |
| 2022 } | 2022 } |
| 2023 | 2023 |
| 2024 } // namespace WebCore | 2024 } // namespace WebCore |
| OLD | NEW |