OLD | NEW |
1 /** | 1 /** |
2 * This file is part of the theme implementation for form controls in WebCore. | 2 * This file is part of the theme implementation for form controls in WebCore. |
3 * | 3 * |
4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. | 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 | 982 |
983 void RenderTheme::adjustSearchFieldResultsDecorationStyle(RenderStyle*, Element*
) const | 983 void RenderTheme::adjustSearchFieldResultsDecorationStyle(RenderStyle*, Element*
) const |
984 { | 984 { |
985 } | 985 } |
986 | 986 |
987 void RenderTheme::platformColorsDidChange() | 987 void RenderTheme::platformColorsDidChange() |
988 { | 988 { |
989 Page::scheduleForcedStyleRecalcForAllPages(); | 989 Page::scheduleForcedStyleRecalcForAllPages(); |
990 } | 990 } |
991 | 991 |
| 992 void RenderTheme::systemFont(CSSValueID systemFontID, FontDescription& fontDescr
iption) |
| 993 { |
| 994 FontStyle fontStyle = FontStyleNormal; |
| 995 FontWeight fontWeight = FontWeightNormal; |
| 996 float fontSize = 0; |
| 997 AtomicString fontFamily; |
| 998 systemFont(systemFontID, fontStyle, fontWeight, fontSize, fontFamily); |
| 999 fontDescription.setStyle(fontStyle); |
| 1000 fontDescription.setWeight(fontWeight); |
| 1001 fontDescription.setSpecifiedSize(fontSize); |
| 1002 fontDescription.setIsAbsoluteSize(true); |
| 1003 fontDescription.firstFamily().setFamily(fontFamily); |
| 1004 fontDescription.setGenericFamily(FontDescription::NoFamily); |
| 1005 } |
| 1006 |
992 Color RenderTheme::systemColor(CSSValueID cssValueId) const | 1007 Color RenderTheme::systemColor(CSSValueID cssValueId) const |
993 { | 1008 { |
994 switch (cssValueId) { | 1009 switch (cssValueId) { |
995 case CSSValueActiveborder: | 1010 case CSSValueActiveborder: |
996 return 0xFFFFFFFF; | 1011 return 0xFFFFFFFF; |
997 case CSSValueActivecaption: | 1012 case CSSValueActivecaption: |
998 return 0xFFCCCCCC; | 1013 return 0xFFCCCCCC; |
999 case CSSValueAppworkspace: | 1014 case CSSValueAppworkspace: |
1000 return 0xFFFFFFFF; | 1015 return 0xFFFFFFFF; |
1001 case CSSValueBackground: | 1016 case CSSValueBackground: |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1248 | 1263 |
1249 // padding - not honored by WinIE, needs to be removed. | 1264 // padding - not honored by WinIE, needs to be removed. |
1250 style->resetPadding(); | 1265 style->resetPadding(); |
1251 | 1266 |
1252 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) | 1267 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) |
1253 // for now, we will not honor it. | 1268 // for now, we will not honor it. |
1254 style->resetBorder(); | 1269 style->resetBorder(); |
1255 } | 1270 } |
1256 | 1271 |
1257 } // namespace WebCore | 1272 } // namespace WebCore |
OLD | NEW |