| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 } | 227 } |
| 228 } | 228 } |
| 229 | 229 |
| 230 bool RenderTheme::paint(RenderObject* o, const PaintInfo& paintInfo, const IntRe
ct& r) | 230 bool RenderTheme::paint(RenderObject* o, const PaintInfo& paintInfo, const IntRe
ct& r) |
| 231 { | 231 { |
| 232 // If painting is disabled, but we aren't updating control tints, then just
bail. | 232 // If painting is disabled, but we aren't updating control tints, then just
bail. |
| 233 // If we are updating control tints, just schedule a repaint if the theme su
pports tinting | 233 // If we are updating control tints, just schedule a repaint if the theme su
pports tinting |
| 234 // for that control. | 234 // for that control. |
| 235 if (paintInfo.context->updatingControlTints()) { | 235 if (paintInfo.context->updatingControlTints()) { |
| 236 if (controlSupportsTints(o)) | 236 if (controlSupportsTints(o)) |
| 237 o->repaint(); | 237 o->paintInvalidationForWholeRenderer(); |
| 238 return false; | 238 return false; |
| 239 } | 239 } |
| 240 ControlPart part = o->style()->appearance(); | 240 ControlPart part = o->style()->appearance(); |
| 241 | 241 |
| 242 if (shouldUseFallbackTheme(o->style())) | 242 if (shouldUseFallbackTheme(o->style())) |
| 243 return paintUsingFallbackTheme(o, paintInfo, r); | 243 return paintUsingFallbackTheme(o, paintInfo, r); |
| 244 | 244 |
| 245 #if USE(NEW_THEME) | 245 #if USE(NEW_THEME) |
| 246 switch (part) { | 246 switch (part) { |
| 247 case CheckboxPart: | 247 case CheckboxPart: |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 { | 630 { |
| 631 // Default implementation assumes the controls don't respond to changes in :
hover state | 631 // Default implementation assumes the controls don't respond to changes in :
hover state |
| 632 if (state == HoverControlState && !supportsHover(o->style())) | 632 if (state == HoverControlState && !supportsHover(o->style())) |
| 633 return false; | 633 return false; |
| 634 | 634 |
| 635 // Assume pressed state is only responded to if the control is enabled. | 635 // Assume pressed state is only responded to if the control is enabled. |
| 636 if (state == PressedControlState && !isEnabled(o)) | 636 if (state == PressedControlState && !isEnabled(o)) |
| 637 return false; | 637 return false; |
| 638 | 638 |
| 639 // Repaint the control. | 639 // Repaint the control. |
| 640 o->repaint(); | 640 o->paintInvalidationForWholeRenderer(); |
| 641 return true; | 641 return true; |
| 642 } | 642 } |
| 643 | 643 |
| 644 ControlStates RenderTheme::controlStatesForRenderer(const RenderObject* o) const | 644 ControlStates RenderTheme::controlStatesForRenderer(const RenderObject* o) const |
| 645 { | 645 { |
| 646 ControlStates result = 0; | 646 ControlStates result = 0; |
| 647 if (isHovered(o)) { | 647 if (isHovered(o)) { |
| 648 result |= HoverControlState; | 648 result |= HoverControlState; |
| 649 if (isSpinUpButtonPartHovered(o)) | 649 if (isSpinUpButtonPartHovered(o)) |
| 650 result |= SpinUpControlState; | 650 result |= SpinUpControlState; |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 | 1216 |
| 1217 // padding - not honored by WinIE, needs to be removed. | 1217 // padding - not honored by WinIE, needs to be removed. |
| 1218 style->resetPadding(); | 1218 style->resetPadding(); |
| 1219 | 1219 |
| 1220 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) | 1220 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) |
| 1221 // for now, we will not honor it. | 1221 // for now, we will not honor it. |
| 1222 style->resetBorder(); | 1222 style->resetBorder(); |
| 1223 } | 1223 } |
| 1224 | 1224 |
| 1225 } // namespace WebCore | 1225 } // namespace WebCore |
| OLD | NEW |