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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 return true; | 815 return true; |
816 } | 816 } |
817 | 817 |
818 void RenderTheme::paintSliderTicks(RenderObject* o, const PaintInfo& paintInfo,
const IntRect& rect) | 818 void RenderTheme::paintSliderTicks(RenderObject* o, const PaintInfo& paintInfo,
const IntRect& rect) |
819 { | 819 { |
820 Node* node = o->node(); | 820 Node* node = o->node(); |
821 if (!isHTMLInputElement(node)) | 821 if (!isHTMLInputElement(node)) |
822 return; | 822 return; |
823 | 823 |
824 HTMLInputElement* input = toHTMLInputElement(node); | 824 HTMLInputElement* input = toHTMLInputElement(node); |
825 if (!input->isRangeControl()) | 825 if (input->type() != InputTypeNames::range) |
826 return; | 826 return; |
827 | 827 |
828 HTMLDataListElement* dataList = input->dataList(); | 828 HTMLDataListElement* dataList = input->dataList(); |
829 if (!dataList) | 829 if (!dataList) |
830 return; | 830 return; |
831 | 831 |
832 double min = input->minimum(); | 832 double min = input->minimum(); |
833 double max = input->maximum(); | 833 double max = input->maximum(); |
834 ControlPart part = o->style()->appearance(); | 834 ControlPart part = o->style()->appearance(); |
835 // We don't support ticks on alternate sliders like MediaVolumeSliders. | 835 // We don't support ticks on alternate sliders like MediaVolumeSliders. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 return 0; | 900 return 0; |
901 } | 901 } |
902 | 902 |
903 double RenderTheme::animationDurationForProgressBar(RenderProgress*) const | 903 double RenderTheme::animationDurationForProgressBar(RenderProgress*) const |
904 { | 904 { |
905 return 0; | 905 return 0; |
906 } | 906 } |
907 | 907 |
908 bool RenderTheme::shouldHaveSpinButton(HTMLInputElement* inputElement) const | 908 bool RenderTheme::shouldHaveSpinButton(HTMLInputElement* inputElement) const |
909 { | 909 { |
910 return inputElement->isSteppable() && !inputElement->isRangeControl(); | 910 return inputElement->isSteppable() && inputElement->type() != InputTypeNames
::range; |
911 } | 911 } |
912 | 912 |
913 void RenderTheme::adjustMenuListButtonStyle(RenderStyle*, Element*) const | 913 void RenderTheme::adjustMenuListButtonStyle(RenderStyle*, Element*) const |
914 { | 914 { |
915 } | 915 } |
916 | 916 |
917 void RenderTheme::adjustSliderThumbStyle(RenderStyle* style, Element* element) c
onst | 917 void RenderTheme::adjustSliderThumbStyle(RenderStyle* style, Element* element) c
onst |
918 { | 918 { |
919 adjustSliderThumbSize(style, element); | 919 adjustSliderThumbSize(style, element); |
920 } | 920 } |
(...skipping 282 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 |