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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 | 586 |
587 case SliderHorizontalPart: | 587 case SliderHorizontalPart: |
588 case SliderVerticalPart: | 588 case SliderVerticalPart: |
589 return style->boxShadow(); | 589 return style->boxShadow(); |
590 | 590 |
591 default: | 591 default: |
592 return false; | 592 return false; |
593 } | 593 } |
594 } | 594 } |
595 | 595 |
596 void RenderTheme::adjustRepaintRect(const RenderObject* o, IntRect& r) | 596 void RenderTheme::adjustPaintInvalidationRect(const RenderObject* o, IntRect& r) |
597 { | 597 { |
598 #if USE(NEW_THEME) | 598 #if USE(NEW_THEME) |
599 m_platformTheme->inflateControlPaintRect(o->style()->appearance(), controlSt
atesForRenderer(o), r, o->style()->effectiveZoom()); | 599 m_platformTheme->inflateControlPaintRect(o->style()->appearance(), controlSt
atesForRenderer(o), r, o->style()->effectiveZoom()); |
600 #endif | 600 #endif |
601 } | 601 } |
602 | 602 |
603 bool RenderTheme::shouldDrawDefaultFocusRing(RenderObject* renderer) const | 603 bool RenderTheme::shouldDrawDefaultFocusRing(RenderObject* renderer) const |
604 { | 604 { |
605 if (supportsFocusRing(renderer->style())) | 605 if (supportsFocusRing(renderer->style())) |
606 return false; | 606 return false; |
(...skipping 17 matching lines...) Expand all Loading... |
624 bool RenderTheme::stateChanged(RenderObject* o, ControlState state) const | 624 bool RenderTheme::stateChanged(RenderObject* o, ControlState state) const |
625 { | 625 { |
626 // Default implementation assumes the controls don't respond to changes in :
hover state | 626 // Default implementation assumes the controls don't respond to changes in :
hover state |
627 if (state == HoverControlState && !supportsHover(o->style())) | 627 if (state == HoverControlState && !supportsHover(o->style())) |
628 return false; | 628 return false; |
629 | 629 |
630 // Assume pressed state is only responded to if the control is enabled. | 630 // Assume pressed state is only responded to if the control is enabled. |
631 if (state == PressedControlState && !isEnabled(o)) | 631 if (state == PressedControlState && !isEnabled(o)) |
632 return false; | 632 return false; |
633 | 633 |
634 // Repaint the control. | |
635 o->paintInvalidationForWholeRenderer(); | 634 o->paintInvalidationForWholeRenderer(); |
636 return true; | 635 return true; |
637 } | 636 } |
638 | 637 |
639 ControlStates RenderTheme::controlStatesForRenderer(const RenderObject* o) const | 638 ControlStates RenderTheme::controlStatesForRenderer(const RenderObject* o) const |
640 { | 639 { |
641 ControlStates result = 0; | 640 ControlStates result = 0; |
642 if (isHovered(o)) { | 641 if (isHovered(o)) { |
643 result |= HoverControlState; | 642 result |= HoverControlState; |
644 if (isSpinUpButtonPartHovered(o)) | 643 if (isSpinUpButtonPartHovered(o)) |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 | 1206 |
1208 // padding - not honored by WinIE, needs to be removed. | 1207 // padding - not honored by WinIE, needs to be removed. |
1209 style->resetPadding(); | 1208 style->resetPadding(); |
1210 | 1209 |
1211 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) | 1210 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) |
1212 // for now, we will not honor it. | 1211 // for now, we will not honor it. |
1213 style->resetBorder(); | 1212 style->resetBorder(); |
1214 } | 1213 } |
1215 | 1214 |
1216 } // namespace blink | 1215 } // namespace blink |
OLD | NEW |