| 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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 double max = input->maximum(); | 832 double max = input->maximum(); |
| 833 ControlPart part = o->style()->appearance(); | 833 ControlPart part = o->style()->appearance(); |
| 834 // We don't support ticks on alternate sliders like MediaVolumeSliders. | 834 // We don't support ticks on alternate sliders like MediaVolumeSliders. |
| 835 if (part != SliderHorizontalPart && part != SliderVerticalPart) | 835 if (part != SliderHorizontalPart && part != SliderVerticalPart) |
| 836 return; | 836 return; |
| 837 bool isHorizontal = part == SliderHorizontalPart; | 837 bool isHorizontal = part == SliderHorizontalPart; |
| 838 | 838 |
| 839 IntSize thumbSize; | 839 IntSize thumbSize; |
| 840 RenderObject* thumbRenderer = input->userAgentShadowRoot()->getElementById(S
hadowElementNames::sliderThumb())->renderer(); | 840 RenderObject* thumbRenderer = input->userAgentShadowRoot()->getElementById(S
hadowElementNames::sliderThumb())->renderer(); |
| 841 if (thumbRenderer) { | 841 if (thumbRenderer) { |
| 842 RenderStyle* thumbStyle = thumbRenderer->style(); | 842 const RenderStyle* thumbStyle = thumbRenderer->style(); |
| 843 int thumbWidth = thumbStyle->width().intValue(); | 843 int thumbWidth = thumbStyle->width().intValue(); |
| 844 int thumbHeight = thumbStyle->height().intValue(); | 844 int thumbHeight = thumbStyle->height().intValue(); |
| 845 thumbSize.setWidth(isHorizontal ? thumbWidth : thumbHeight); | 845 thumbSize.setWidth(isHorizontal ? thumbWidth : thumbHeight); |
| 846 thumbSize.setHeight(isHorizontal ? thumbHeight : thumbWidth); | 846 thumbSize.setHeight(isHorizontal ? thumbHeight : thumbWidth); |
| 847 } | 847 } |
| 848 | 848 |
| 849 IntSize tickSize = sliderTickSize(); | 849 IntSize tickSize = sliderTickSize(); |
| 850 float zoomFactor = o->style()->effectiveZoom(); | 850 float zoomFactor = o->style()->effectiveZoom(); |
| 851 FloatRect tickRect; | 851 FloatRect tickRect; |
| 852 int tickRegionSideMargin = 0; | 852 int tickRegionSideMargin = 0; |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1132 bool LayoutTheme::supportsCalendarPicker(const AtomicString& type) const | 1132 bool LayoutTheme::supportsCalendarPicker(const AtomicString& type) const |
| 1133 { | 1133 { |
| 1134 return type == InputTypeNames::date | 1134 return type == InputTypeNames::date |
| 1135 || type == InputTypeNames::datetime | 1135 || type == InputTypeNames::datetime |
| 1136 || type == InputTypeNames::datetime_local | 1136 || type == InputTypeNames::datetime_local |
| 1137 || type == InputTypeNames::month | 1137 || type == InputTypeNames::month |
| 1138 || type == InputTypeNames::week; | 1138 || type == InputTypeNames::week; |
| 1139 } | 1139 } |
| 1140 #endif | 1140 #endif |
| 1141 | 1141 |
| 1142 bool LayoutTheme::shouldUseFallbackTheme(RenderStyle*) const | 1142 bool LayoutTheme::shouldUseFallbackTheme(const RenderStyle*) const |
| 1143 { | 1143 { |
| 1144 return false; | 1144 return false; |
| 1145 } | 1145 } |
| 1146 | 1146 |
| 1147 void LayoutTheme::adjustStyleUsingFallbackTheme(RenderStyle* style, Element* e) | 1147 void LayoutTheme::adjustStyleUsingFallbackTheme(RenderStyle* style, Element* e) |
| 1148 { | 1148 { |
| 1149 ControlPart part = style->appearance(); | 1149 ControlPart part = style->appearance(); |
| 1150 switch (part) { | 1150 switch (part) { |
| 1151 case CheckboxPart: | 1151 case CheckboxPart: |
| 1152 return adjustCheckboxStyleUsingFallbackTheme(style, e); | 1152 return adjustCheckboxStyleUsingFallbackTheme(style, e); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 | 1258 |
| 1259 // padding - not honored by WinIE, needs to be removed. | 1259 // padding - not honored by WinIE, needs to be removed. |
| 1260 style->resetPadding(); | 1260 style->resetPadding(); |
| 1261 | 1261 |
| 1262 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) | 1262 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) |
| 1263 // for now, we will not honor it. | 1263 // for now, we will not honor it. |
| 1264 style->resetBorder(); | 1264 style->resetBorder(); |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 } // namespace blink | 1267 } // namespace blink |
| OLD | NEW |