| 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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 result |= IndeterminateState; | 796 result |= IndeterminateState; |
| 797 return result; | 797 return result; |
| 798 } | 798 } |
| 799 | 799 |
| 800 bool RenderTheme::isActive(const RenderObject* o) const | 800 bool RenderTheme::isActive(const RenderObject* o) const |
| 801 { | 801 { |
| 802 Node* node = o->node(); | 802 Node* node = o->node(); |
| 803 if (!node) | 803 if (!node) |
| 804 return false; | 804 return false; |
| 805 | 805 |
| 806 Page* page = node->document()->page(); | 806 Page* page = node->document().page(); |
| 807 if (!page) | 807 if (!page) |
| 808 return false; | 808 return false; |
| 809 | 809 |
| 810 return page->focusController().isActive(); | 810 return page->focusController().isActive(); |
| 811 } | 811 } |
| 812 | 812 |
| 813 bool RenderTheme::isChecked(const RenderObject* o) const | 813 bool RenderTheme::isChecked(const RenderObject* o) const |
| 814 { | 814 { |
| 815 if (!o->node() || !o->node()->hasTagName(inputTag)) | 815 if (!o->node() || !o->node()->hasTagName(inputTag)) |
| 816 return false; | 816 return false; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 832 return !toElement(node)->isDisabledFormControl(); | 832 return !toElement(node)->isDisabledFormControl(); |
| 833 } | 833 } |
| 834 | 834 |
| 835 bool RenderTheme::isFocused(const RenderObject* o) const | 835 bool RenderTheme::isFocused(const RenderObject* o) const |
| 836 { | 836 { |
| 837 Node* node = o->node(); | 837 Node* node = o->node(); |
| 838 if (!node) | 838 if (!node) |
| 839 return false; | 839 return false; |
| 840 | 840 |
| 841 node = node->focusDelegate(); | 841 node = node->focusDelegate(); |
| 842 Document* document = node->document(); | 842 Document& document = node->document(); |
| 843 Frame* frame = document->frame(); | 843 Frame* frame = document.frame(); |
| 844 return node == document->focusedElement() && node->shouldHaveFocusAppearance
() && frame && frame->selection()->isFocusedAndActive(); | 844 return node == document.focusedElement() && node->shouldHaveFocusAppearance(
) && frame && frame->selection()->isFocusedAndActive(); |
| 845 } | 845 } |
| 846 | 846 |
| 847 bool RenderTheme::isPressed(const RenderObject* o) const | 847 bool RenderTheme::isPressed(const RenderObject* o) const |
| 848 { | 848 { |
| 849 if (!o->node()) | 849 if (!o->node()) |
| 850 return false; | 850 return false; |
| 851 return o->node()->active(); | 851 return o->node()->active(); |
| 852 } | 852 } |
| 853 | 853 |
| 854 bool RenderTheme::isSpinUpButtonPartPressed(const RenderObject* o) const | 854 bool RenderTheme::isSpinUpButtonPartPressed(const RenderObject* o) const |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 | 1399 |
| 1400 // padding - not honored by WinIE, needs to be removed. | 1400 // padding - not honored by WinIE, needs to be removed. |
| 1401 style->resetPadding(); | 1401 style->resetPadding(); |
| 1402 | 1402 |
| 1403 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) | 1403 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) |
| 1404 // for now, we will not honor it. | 1404 // for now, we will not honor it. |
| 1405 style->resetBorder(); | 1405 style->resetBorder(); |
| 1406 } | 1406 } |
| 1407 | 1407 |
| 1408 } // namespace WebCore | 1408 } // namespace WebCore |
| OLD | NEW |