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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 // Padding | 159 // Padding |
160 LengthBox paddingBox = m_platformTheme->controlPadding( | 160 LengthBox paddingBox = m_platformTheme->controlPadding( |
161 part, style.font().getFontDescription(), style.paddingBox(), | 161 part, style.font().getFontDescription(), style.paddingBox(), |
162 style.effectiveZoom()); | 162 style.effectiveZoom()); |
163 if (paddingBox != style.paddingBox()) | 163 if (paddingBox != style.paddingBox()) |
164 style.setPaddingBox(paddingBox); | 164 style.setPaddingBox(paddingBox); |
165 | 165 |
166 // Whitespace | 166 // Whitespace |
167 if (m_platformTheme->controlRequiresPreWhiteSpace(part)) | 167 if (m_platformTheme->controlRequiresPreWhiteSpace(part)) |
168 style.setWhiteSpace(PRE); | 168 style.setWhiteSpace(EWhiteSpace::Pre); |
169 | 169 |
170 // Width / Height | 170 // Width / Height |
171 // The width and height here are affected by the zoom. | 171 // The width and height here are affected by the zoom. |
172 // FIXME: Check is flawed, since it doesn't take min-width/max-width | 172 // FIXME: Check is flawed, since it doesn't take min-width/max-width |
173 // into account. | 173 // into account. |
174 LengthSize controlSize = m_platformTheme->controlSize( | 174 LengthSize controlSize = m_platformTheme->controlSize( |
175 part, style.font().getFontDescription(), | 175 part, style.font().getFontDescription(), |
176 LengthSize(style.width(), style.height()), style.effectiveZoom()); | 176 LengthSize(style.width(), style.height()), style.effectiveZoom()); |
177 if (controlSize.width() != style.width()) | 177 if (controlSize.width() != style.width()) |
178 style.setWidth(controlSize.width()); | 178 style.setWidth(controlSize.width()); |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 // padding - not honored by WinIE, needs to be removed. | 909 // padding - not honored by WinIE, needs to be removed. |
910 style.resetPadding(); | 910 style.resetPadding(); |
911 | 911 |
912 // border - honored by WinIE, but looks terrible (just paints in the control | 912 // border - honored by WinIE, but looks terrible (just paints in the control |
913 // box and turns off the Windows XP theme) | 913 // box and turns off the Windows XP theme) |
914 // for now, we will not honor it. | 914 // for now, we will not honor it. |
915 style.resetBorder(); | 915 style.resetBorder(); |
916 } | 916 } |
917 | 917 |
918 } // namespace blink | 918 } // namespace blink |
OLD | NEW |