| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 LayoutTheme::LayoutTheme(Theme* platformTheme) | 76 LayoutTheme::LayoutTheme(Theme* platformTheme) |
| 77 : m_hasCustomFocusRingColor(false), m_platformTheme(platformTheme) {} | 77 : m_hasCustomFocusRingColor(false), m_platformTheme(platformTheme) {} |
| 78 | 78 |
| 79 void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e) { | 79 void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e) { |
| 80 ASSERT(style.hasAppearance()); | 80 ASSERT(style.hasAppearance()); |
| 81 | 81 |
| 82 // Force inline and table display styles to be inline-block (except for table- | 82 // Force inline and table display styles to be inline-block (except for table- |
| 83 // which is block) | 83 // which is block) |
| 84 ControlPart part = style.appearance(); | 84 ControlPart part = style.appearance(); |
| 85 if (style.display() == EDisplay::Inline || | 85 if (style.display() == EDisplay::kInline || |
| 86 style.display() == EDisplay::InlineTable || | 86 style.display() == EDisplay::kInlineTable || |
| 87 style.display() == EDisplay::TableRowGroup || | 87 style.display() == EDisplay::kTableRowGroup || |
| 88 style.display() == EDisplay::TableHeaderGroup || | 88 style.display() == EDisplay::kTableHeaderGroup || |
| 89 style.display() == EDisplay::TableFooterGroup || | 89 style.display() == EDisplay::kTableFooterGroup || |
| 90 style.display() == EDisplay::TableRow || | 90 style.display() == EDisplay::kTableRow || |
| 91 style.display() == EDisplay::TableColumnGroup || | 91 style.display() == EDisplay::kTableColumnGroup || |
| 92 style.display() == EDisplay::TableColumn || | 92 style.display() == EDisplay::kTableColumn || |
| 93 style.display() == EDisplay::TableCell || | 93 style.display() == EDisplay::kTableCell || |
| 94 style.display() == EDisplay::TableCaption) | 94 style.display() == EDisplay::kTableCaption) |
| 95 style.setDisplay(EDisplay::InlineBlock); | 95 style.setDisplay(EDisplay::kInlineBlock); |
| 96 else if (style.display() == EDisplay::ListItem || | 96 else if (style.display() == EDisplay::kListItem || |
| 97 style.display() == EDisplay::Table) | 97 style.display() == EDisplay::kTable) |
| 98 style.setDisplay(EDisplay::Block); | 98 style.setDisplay(EDisplay::kBlock); |
| 99 | 99 |
| 100 if (isControlStyled(style)) { | 100 if (isControlStyled(style)) { |
| 101 if (part == MenulistPart) { | 101 if (part == MenulistPart) { |
| 102 style.setAppearance(MenulistButtonPart); | 102 style.setAppearance(MenulistButtonPart); |
| 103 part = MenulistButtonPart; | 103 part = MenulistButtonPart; |
| 104 } else { | 104 } else { |
| 105 style.setAppearance(NoControlPart); | 105 style.setAppearance(NoControlPart); |
| 106 return; | 106 return; |
| 107 } | 107 } |
| 108 } | 108 } |
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 // padding - not honored by WinIE, needs to be removed. | 912 // padding - not honored by WinIE, needs to be removed. |
| 913 style.resetPadding(); | 913 style.resetPadding(); |
| 914 | 914 |
| 915 // border - honored by WinIE, but looks terrible (just paints in the control | 915 // border - honored by WinIE, but looks terrible (just paints in the control |
| 916 // box and turns off the Windows XP theme) | 916 // box and turns off the Windows XP theme) |
| 917 // for now, we will not honor it. | 917 // for now, we will not honor it. |
| 918 style.resetBorder(); | 918 style.resetBorder(); |
| 919 } | 919 } |
| 920 | 920 |
| 921 } // namespace blink | 921 } // namespace blink |
| OLD | NEW |