| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 #if USE(NEW_THEME) | 73 #if USE(NEW_THEME) |
| 74 , m_platformTheme(platformTheme()) | 74 , m_platformTheme(platformTheme()) |
| 75 #endif | 75 #endif |
| 76 { | 76 { |
| 77 } | 77 } |
| 78 | 78 |
| 79 void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e, const AuthorStyl
eInfo& authorStyle) | 79 void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e, const AuthorStyl
eInfo& authorStyle) |
| 80 { | 80 { |
| 81 ASSERT(style.hasAppearance()); | 81 ASSERT(style.hasAppearance()); |
| 82 | 82 |
| 83 // Force inline and table display styles to be inline-block (except for tabl
e- which is block) | 83 // Force inline and table display styles to be inline-block (except for tabl
e- which is block, and table-cell which we handle correctly). |
| 84 // TODO(rhogan) crbug.com/515771: Allow all table part display types on form
controls and create the appropriate anonymous table parts to contain them. |
| 84 ControlPart part = style.appearance(); | 85 ControlPart part = style.appearance(); |
| 85 if (style.display() == INLINE || style.display() == INLINE_TABLE || style.di
splay() == TABLE_ROW_GROUP | 86 if (style.display() == INLINE || style.display() == INLINE_TABLE || style.di
splay() == TABLE_ROW_GROUP |
| 86 || style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_FOO
TER_GROUP | 87 || style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_FOO
TER_GROUP |
| 87 || style.display() == TABLE_ROW || style.display() == TABLE_COLUMN_GROUP
|| style.display() == TABLE_COLUMN | 88 || style.display() == TABLE_ROW || style.display() == TABLE_COLUMN_GROUP
|| style.display() == TABLE_COLUMN |
| 88 || style.display() == TABLE_CELL || style.display() == TABLE_CAPTION) | 89 || style.display() == TABLE_CAPTION) |
| 89 style.setDisplay(INLINE_BLOCK); | 90 style.setDisplay(INLINE_BLOCK); |
| 90 else if (style.display() == LIST_ITEM || style.display() == TABLE) | 91 else if (style.display() == LIST_ITEM || style.display() == TABLE) |
| 91 style.setDisplay(BLOCK); | 92 style.setDisplay(BLOCK); |
| 92 | 93 |
| 93 if (isControlStyled(style, authorStyle)) { | 94 if (isControlStyled(style, authorStyle)) { |
| 94 if (part == MenulistPart) { | 95 if (part == MenulistPart) { |
| 95 style.setAppearance(MenulistButtonPart); | 96 style.setAppearance(MenulistButtonPart); |
| 96 part = MenulistButtonPart; | 97 part = MenulistButtonPart; |
| 97 } else { | 98 } else { |
| 98 style.setAppearance(NoControlPart); | 99 style.setAppearance(NoControlPart); |
| (...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 | 942 |
| 942 // padding - not honored by WinIE, needs to be removed. | 943 // padding - not honored by WinIE, needs to be removed. |
| 943 style.resetPadding(); | 944 style.resetPadding(); |
| 944 | 945 |
| 945 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) | 946 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) |
| 946 // for now, we will not honor it. | 947 // for now, we will not honor it. |
| 947 style.resetBorder(); | 948 style.resetBorder(); |
| 948 } | 949 } |
| 949 | 950 |
| 950 } // namespace blink | 951 } // namespace blink |
| OLD | NEW |