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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 { | 593 { |
594 #if USE(NEW_THEME) | 594 #if USE(NEW_THEME) |
595 m_platformTheme->inflateControlPaintRect(o->style()->appearance(), controlSt
atesForRenderer(o), r, o->style()->effectiveZoom()); | 595 m_platformTheme->inflateControlPaintRect(o->style()->appearance(), controlSt
atesForRenderer(o), r, o->style()->effectiveZoom()); |
596 #endif | 596 #endif |
597 } | 597 } |
598 | 598 |
599 bool RenderTheme::shouldDrawDefaultFocusRing(RenderObject* renderer) const | 599 bool RenderTheme::shouldDrawDefaultFocusRing(RenderObject* renderer) const |
600 { | 600 { |
601 if (supportsFocusRing(renderer->style())) | 601 if (supportsFocusRing(renderer->style())) |
602 return false; | 602 return false; |
603 if (!renderer->style()->hasAppearance()) | |
604 return true; | |
605 Node* node = renderer->node(); | 603 Node* node = renderer->node(); |
606 if (!node) | 604 if (!node) |
607 return true; | 605 return true; |
| 606 if (!renderer->style()->hasAppearance() && !node->isLink()) |
| 607 return true; |
608 // We can't use RenderTheme::isFocused because outline:auto might be | 608 // We can't use RenderTheme::isFocused because outline:auto might be |
609 // specified to non-:focus rulesets. | 609 // specified to non-:focus rulesets. |
610 if (node->focused() && !node->shouldHaveFocusAppearance()) | 610 if (node->focused() && !node->shouldHaveFocusAppearance()) |
611 return false; | 611 return false; |
612 return true; | 612 return true; |
613 } | 613 } |
614 | 614 |
615 bool RenderTheme::supportsFocusRing(const RenderStyle* style) const | 615 bool RenderTheme::supportsFocusRing(const RenderStyle* style) const |
616 { | 616 { |
617 return (style->hasAppearance() && style->appearance() != TextFieldPart && st
yle->appearance() != TextAreaPart && style->appearance() != MenulistButtonPart &
& style->appearance() != ListboxPart); | 617 return (style->hasAppearance() && style->appearance() != TextFieldPart && st
yle->appearance() != TextAreaPart && style->appearance() != MenulistButtonPart &
& style->appearance() != ListboxPart); |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 | 1203 |
1204 // padding - not honored by WinIE, needs to be removed. | 1204 // padding - not honored by WinIE, needs to be removed. |
1205 style->resetPadding(); | 1205 style->resetPadding(); |
1206 | 1206 |
1207 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) | 1207 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) |
1208 // for now, we will not honor it. | 1208 // for now, we will not honor it. |
1209 style->resetBorder(); | 1209 style->resetBorder(); |
1210 } | 1210 } |
1211 | 1211 |
1212 } // namespace blink | 1212 } // namespace blink |
OLD | NEW |