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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 , m_platformTheme(platformTheme) | 77 , m_platformTheme(platformTheme) |
78 { | 78 { |
79 } | 79 } |
80 | 80 |
81 void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e) | 81 void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e) |
82 { | 82 { |
83 ASSERT(style.hasAppearance()); | 83 ASSERT(style.hasAppearance()); |
84 | 84 |
85 // Force inline and table display styles to be inline-block (except for tabl
e- which is block) | 85 // Force inline and table display styles to be inline-block (except for tabl
e- which is block) |
86 ControlPart part = style.appearance(); | 86 ControlPart part = style.appearance(); |
87 if (style.display() == INLINE || style.display() == INLINE_TABLE || style.di
splay() == TABLE_ROW_GROUP | 87 if (style.display() == EDisplay::Inline || style.display() == EDisplay::Inli
neTable || style.display() == EDisplay::TableRowGroup |
88 || style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_FOO
TER_GROUP | 88 || style.display() == EDisplay::TableHeaderGroup || style.display() == E
Display::TableFooterGroup |
89 || style.display() == TABLE_ROW || style.display() == TABLE_COLUMN_GROUP
|| style.display() == TABLE_COLUMN | 89 || style.display() == EDisplay::TableRow || style.display() == EDisplay:
:TableColumnGroup || style.display() == EDisplay::TableColumn |
90 || style.display() == TABLE_CELL || style.display() == TABLE_CAPTION) | 90 || style.display() == EDisplay::TableCell || style.display() == EDisplay
::TableCaption) |
91 style.setDisplay(INLINE_BLOCK); | 91 style.setDisplay(EDisplay::InlineBlock); |
92 else if (style.display() == LIST_ITEM || style.display() == TABLE) | 92 else if (style.display() == EDisplay::ListItem || style.display() == EDispla
y::Table) |
93 style.setDisplay(BLOCK); | 93 style.setDisplay(EDisplay::Block); |
94 | 94 |
95 if (isControlStyled(style)) { | 95 if (isControlStyled(style)) { |
96 if (part == MenulistPart) { | 96 if (part == MenulistPart) { |
97 style.setAppearance(MenulistButtonPart); | 97 style.setAppearance(MenulistButtonPart); |
98 part = MenulistButtonPart; | 98 part = MenulistButtonPart; |
99 } else { | 99 } else { |
100 style.setAppearance(NoControlPart); | 100 style.setAppearance(NoControlPart); |
101 return; | 101 return; |
102 } | 102 } |
103 } | 103 } |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 | 937 |
938 // padding - not honored by WinIE, needs to be removed. | 938 // padding - not honored by WinIE, needs to be removed. |
939 style.resetPadding(); | 939 style.resetPadding(); |
940 | 940 |
941 // 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) |
942 // for now, we will not honor it. | 942 // for now, we will not honor it. |
943 style.resetBorder(); | 943 style.resetBorder(); |
944 } | 944 } |
945 | 945 |
946 } // namespace blink | 946 } // namespace blink |
OLD | NEW |