| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 369 |
| 370 int LayoutTheme::baselinePosition(const LayoutObject* o) const | 370 int LayoutTheme::baselinePosition(const LayoutObject* o) const |
| 371 { | 371 { |
| 372 if (!o->isBox()) | 372 if (!o->isBox()) |
| 373 return 0; | 373 return 0; |
| 374 | 374 |
| 375 const LayoutBox* box = toLayoutBox(o); | 375 const LayoutBox* box = toLayoutBox(o); |
| 376 | 376 |
| 377 if (m_platformTheme) | 377 if (m_platformTheme) |
| 378 return box->size().height() + box->marginTop() + m_platformTheme->baseli
nePositionAdjustment(o->style()->appearance()) * o->style()->effectiveZoom(); | 378 return box->size().height() + box->marginTop() + m_platformTheme->baseli
nePositionAdjustment(o->style()->appearance()) * o->style()->effectiveZoom(); |
| 379 return box->size().height() + box->marginTop(); | 379 return (box->size().height() + box->marginTop()).toInt(); |
| 380 } | 380 } |
| 381 | 381 |
| 382 bool LayoutTheme::isControlContainer(ControlPart appearance) const | 382 bool LayoutTheme::isControlContainer(ControlPart appearance) const |
| 383 { | 383 { |
| 384 // There are more leaves than this, but we'll patch this function as we add
support for | 384 // There are more leaves than this, but we'll patch this function as we add
support for |
| 385 // more controls. | 385 // more controls. |
| 386 return appearance != CheckboxPart && appearance != RadioPart; | 386 return appearance != CheckboxPart && appearance != RadioPart; |
| 387 } | 387 } |
| 388 | 388 |
| 389 bool LayoutTheme::isControlStyled(const ComputedStyle& style) const | 389 bool LayoutTheme::isControlStyled(const ComputedStyle& style) const |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 | 914 |
| 915 // padding - not honored by WinIE, needs to be removed. | 915 // padding - not honored by WinIE, needs to be removed. |
| 916 style.resetPadding(); | 916 style.resetPadding(); |
| 917 | 917 |
| 918 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) | 918 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) |
| 919 // for now, we will not honor it. | 919 // for now, we will not honor it. |
| 920 style.resetBorder(); | 920 style.resetBorder(); |
| 921 } | 921 } |
| 922 | 922 |
| 923 } // namespace blink | 923 } // namespace blink |
| OLD | NEW |