| 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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 const ComputedStyle& style) const { | 752 const ComputedStyle& style) const { |
| 753 if (style.Appearance() == kMenulistPart) | 753 if (style.Appearance() == kMenulistPart) |
| 754 return PopupButtonPadding( | 754 return PopupButtonPadding( |
| 755 ControlSizeForFont(style))[ThemeMac::kLeftMargin] * | 755 ControlSizeForFont(style))[ThemeMac::kLeftMargin] * |
| 756 style.EffectiveZoom(); | 756 style.EffectiveZoom(); |
| 757 if (style.Appearance() == kMenulistButtonPart) | 757 if (style.Appearance() == kMenulistButtonPart) |
| 758 return kStyledPopupPaddingStart * style.EffectiveZoom(); | 758 return kStyledPopupPaddingStart * style.EffectiveZoom(); |
| 759 return 0; | 759 return 0; |
| 760 } | 760 } |
| 761 | 761 |
| 762 int LayoutThemeMac::PopupInternalPaddingEnd(const HostWindow*, | 762 int LayoutThemeMac::PopupInternalPaddingEnd(const PlatformChromeClient*, |
| 763 const ComputedStyle& style) const { | 763 const ComputedStyle& style) const { |
| 764 if (style.Appearance() == kMenulistPart) | 764 if (style.Appearance() == kMenulistPart) |
| 765 return PopupButtonPadding( | 765 return PopupButtonPadding( |
| 766 ControlSizeForFont(style))[ThemeMac::kRightMargin] * | 766 ControlSizeForFont(style))[ThemeMac::kRightMargin] * |
| 767 style.EffectiveZoom(); | 767 style.EffectiveZoom(); |
| 768 if (style.Appearance() != kMenulistButtonPart) | 768 if (style.Appearance() != kMenulistButtonPart) |
| 769 return 0; | 769 return 0; |
| 770 float font_scale = style.FontSize() / kBaseFontSize; | 770 float font_scale = style.FontSize() / kBaseFontSize; |
| 771 float arrow_width = kMenuListBaseArrowWidth * font_scale; | 771 float arrow_width = kMenuListBaseArrowWidth * font_scale; |
| 772 return static_cast<int>(ceilf( | 772 return static_cast<int>(ceilf( |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 bool LayoutThemeMac::ShouldUseFallbackTheme(const ComputedStyle& style) const { | 1110 bool LayoutThemeMac::ShouldUseFallbackTheme(const ComputedStyle& style) const { |
| 1111 ControlPart part = style.Appearance(); | 1111 ControlPart part = style.Appearance(); |
| 1112 if (part == kCheckboxPart || part == kRadioPart) | 1112 if (part == kCheckboxPart || part == kRadioPart) |
| 1113 return style.EffectiveZoom() != 1; | 1113 return style.EffectiveZoom() != 1; |
| 1114 return false; | 1114 return false; |
| 1115 } | 1115 } |
| 1116 | 1116 |
| 1117 } // namespace blink | 1117 } // namespace blink |
| OLD | NEW |