| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // Font | 173 // Font |
| 174 FontDescription controlFont = m_platformTheme->controlFont(part, sty
le.font().getFontDescription(), style.effectiveZoom()); | 174 FontDescription controlFont = m_platformTheme->controlFont(part, sty
le.font().getFontDescription(), style.effectiveZoom()); |
| 175 if (controlFont != style.font().getFontDescription()) { | 175 if (controlFont != style.font().getFontDescription()) { |
| 176 // Reset our line-height | 176 // Reset our line-height |
| 177 style.setLineHeight(ComputedStyle::initialLineHeight()); | 177 style.setLineHeight(ComputedStyle::initialLineHeight()); |
| 178 | 178 |
| 179 // Now update our font. | 179 // Now update our font. |
| 180 if (style.setFontDescription(controlFont)) | 180 if (style.setFontDescription(controlFont)) |
| 181 style.font().update(nullptr); | 181 style.font().update(nullptr); |
| 182 } | 182 } |
| 183 break; |
| 183 } | 184 } |
| 185 case ProgressBarPart: |
| 186 adjustProgressBarBounds(style); |
| 187 break; |
| 184 default: | 188 default: |
| 185 break; | 189 break; |
| 186 } | 190 } |
| 187 } | 191 } |
| 188 | 192 |
| 189 if (!m_platformTheme) { | 193 if (!m_platformTheme) { |
| 190 // Call the appropriate style adjustment method based off the appearance
value. | 194 // Call the appropriate style adjustment method based off the appearance
value. |
| 191 switch (style.appearance()) { | 195 switch (style.appearance()) { |
| 192 case CheckboxPart: | 196 case CheckboxPart: |
| 193 return adjustCheckboxStyle(style); | 197 return adjustCheckboxStyle(style); |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 | 937 |
| 934 // padding - not honored by WinIE, needs to be removed. | 938 // padding - not honored by WinIE, needs to be removed. |
| 935 style.resetPadding(); | 939 style.resetPadding(); |
| 936 | 940 |
| 937 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) | 941 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) |
| 938 // for now, we will not honor it. | 942 // for now, we will not honor it. |
| 939 style.resetBorder(); | 943 style.resetBorder(); |
| 940 } | 944 } |
| 941 | 945 |
| 942 } // namespace blink | 946 } // namespace blink |
| OLD | NEW |