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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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; |
607 if (!renderer->style()->hasAppearance()) | |
608 return true; | |
609 Node* node = renderer->node(); | 607 Node* node = renderer->node(); |
610 if (!node) | 608 if (!node) |
611 return true; | 609 return true; |
| 610 if (!renderer->style()->hasAppearance() && !node->isLink()) |
| 611 return true; |
612 // We can't use RenderTheme::isFocused because outline:auto might be | 612 // We can't use RenderTheme::isFocused because outline:auto might be |
613 // specified to non-:focus rulesets. | 613 // specified to non-:focus rulesets. |
614 if (node->focused() && !node->shouldHaveFocusAppearance()) | 614 if (node->focused() && !node->shouldHaveFocusAppearance()) |
615 return false; | 615 return false; |
616 return true; | 616 return true; |
617 } | 617 } |
618 | 618 |
619 bool RenderTheme::supportsFocusRing(const RenderStyle* style) const | 619 bool RenderTheme::supportsFocusRing(const RenderStyle* style) const |
620 { | 620 { |
621 return (style->hasAppearance() && style->appearance() != TextFieldPart && st
yle->appearance() != TextAreaPart && style->appearance() != MenulistButtonPart &
& style->appearance() != ListboxPart); | 621 return (style->hasAppearance() && style->appearance() != TextFieldPart && st
yle->appearance() != TextAreaPart && style->appearance() != MenulistButtonPart &
& style->appearance() != ListboxPart); |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 | 1206 |
1207 // padding - not honored by WinIE, needs to be removed. | 1207 // padding - not honored by WinIE, needs to be removed. |
1208 style->resetPadding(); | 1208 style->resetPadding(); |
1209 | 1209 |
1210 // 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) |
1211 // for now, we will not honor it. | 1211 // for now, we will not honor it. |
1212 style->resetBorder(); | 1212 style->resetBorder(); |
1213 } | 1213 } |
1214 | 1214 |
1215 } // namespace blink | 1215 } // namespace blink |
OLD | NEW |