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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutThemeMac.mm

Issue 2560733002: SELECT element: Fix a bug that intrinsic width is too narrow in less-than-100% zoom level. (Closed)
Patch Set: PartScrollbarVerticalTrack -> PartScrollbarDownArrow to fix Android crash Created 4 years 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) 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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 int LayoutThemeMac::popupInternalPaddingStart( 747 int LayoutThemeMac::popupInternalPaddingStart(
748 const ComputedStyle& style) const { 748 const ComputedStyle& style) const {
749 if (style.appearance() == MenulistPart) 749 if (style.appearance() == MenulistPart)
750 return popupButtonPadding(controlSizeForFont(style))[ThemeMac::LeftMargin] * 750 return popupButtonPadding(controlSizeForFont(style))[ThemeMac::LeftMargin] *
751 style.effectiveZoom(); 751 style.effectiveZoom();
752 if (style.appearance() == MenulistButtonPart) 752 if (style.appearance() == MenulistButtonPart)
753 return styledPopupPaddingStart * style.effectiveZoom(); 753 return styledPopupPaddingStart * style.effectiveZoom();
754 return 0; 754 return 0;
755 } 755 }
756 756
757 int LayoutThemeMac::popupInternalPaddingEnd(const ComputedStyle& style) const { 757 int LayoutThemeMac::popupInternalPaddingEnd(const HostWindow*,
758 const ComputedStyle& style) const {
758 if (style.appearance() == MenulistPart) 759 if (style.appearance() == MenulistPart)
759 return popupButtonPadding( 760 return popupButtonPadding(
760 controlSizeForFont(style))[ThemeMac::RightMargin] * 761 controlSizeForFont(style))[ThemeMac::RightMargin] *
761 style.effectiveZoom(); 762 style.effectiveZoom();
762 if (style.appearance() != MenulistButtonPart) 763 if (style.appearance() != MenulistButtonPart)
763 return 0; 764 return 0;
764 float fontScale = style.fontSize() / baseFontSize; 765 float fontScale = style.fontSize() / baseFontSize;
765 float arrowWidth = menuListBaseArrowWidth * fontScale; 766 float arrowWidth = menuListBaseArrowWidth * fontScale;
766 return static_cast<int>( 767 return static_cast<int>(
767 ceilf(arrowWidth + 768 ceilf(arrowWidth +
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 } 1103 }
1103 1104
1104 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const { 1105 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const {
1105 ControlPart part = style.appearance(); 1106 ControlPart part = style.appearance();
1106 if (part == CheckboxPart || part == RadioPart) 1107 if (part == CheckboxPart || part == RadioPart)
1107 return style.effectiveZoom() != 1; 1108 return style.effectiveZoom() != 1;
1108 return false; 1109 return false;
1109 } 1110 }
1110 1111
1111 } // namespace blink 1112 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeMac.h ('k') | third_party/WebKit/Source/core/paint/ThemePainterDefault.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698