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

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

Issue 2005093002: Remove non-standard 'results' attribute of INPUT element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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) 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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 } 881 }
882 882
883 void LayoutThemeMac::adjustSearchFieldCancelButtonStyle(ComputedStyle& style) co nst 883 void LayoutThemeMac::adjustSearchFieldCancelButtonStyle(ComputedStyle& style) co nst
884 { 884 {
885 IntSize size = sizeForSystemFont(style, cancelButtonSizes()); 885 IntSize size = sizeForSystemFont(style, cancelButtonSizes());
886 style.setWidth(Length(size.width(), Fixed)); 886 style.setWidth(Length(size.width(), Fixed));
887 style.setHeight(Length(size.height(), Fixed)); 887 style.setHeight(Length(size.height(), Fixed));
888 style.setBoxShadow(nullptr); 888 style.setBoxShadow(nullptr);
889 } 889 }
890 890
891 const IntSize* LayoutThemeMac::resultsButtonSizes() const
892 {
893 static const IntSize sizes[3] = { IntSize(15, 14), IntSize(16, 13), IntSize( 14, 11) };
894 return sizes;
895 }
896
897 void LayoutThemeMac::adjustSearchFieldDecorationStyle(ComputedStyle& style) cons t
898 {
899 NSControlSize controlSize = controlSizeForSystemFont(style);
900 IntSize searchFieldSize = searchFieldSizes()[controlSize];
901 int width = searchFieldSize.height() / 2 - searchFieldBorderWidth - searchFi eldHorizontalPaddings()[controlSize];
902 style.setWidth(Length(width, Fixed));
903 style.setHeight(Length(0, Fixed));
904 style.setBoxShadow(nullptr);
905 }
906
907 void LayoutThemeMac::adjustSearchFieldResultsDecorationStyle(ComputedStyle& styl e) const
908 {
909 IntSize size = sizeForSystemFont(style, resultsButtonSizes());
910 style.setWidth(Length(size.width(), Fixed));
911 style.setHeight(Length(size.height(), Fixed));
912 style.setBoxShadow(nullptr);
913 }
914
915 IntSize LayoutThemeMac::sliderTickSize() const 891 IntSize LayoutThemeMac::sliderTickSize() const
916 { 892 {
917 return IntSize(1, 3); 893 return IntSize(1, 3);
918 } 894 }
919 895
920 int LayoutThemeMac::sliderTickOffsetFromTrackCenter() const 896 int LayoutThemeMac::sliderTickOffsetFromTrackCenter() const
921 { 897 {
922 return -9; 898 return -9;
923 } 899 }
924 900
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 1080
1105 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const 1081 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const
1106 { 1082 {
1107 ControlPart part = style.appearance(); 1083 ControlPart part = style.appearance();
1108 if (part == CheckboxPart || part == RadioPart) 1084 if (part == CheckboxPart || part == RadioPart)
1109 return style.effectiveZoom() != 1; 1085 return style.effectiveZoom() != 1;
1110 return false; 1086 return false;
1111 } 1087 }
1112 1088
1113 } // namespace blink 1089 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeMac.h ('k') | third_party/WebKit/Source/core/paint/ThemePainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698