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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 return adjustSearchFieldResultsDecorationStyle(style, e); | 226 return adjustSearchFieldResultsDecorationStyle(style, e); |
227 default: | 227 default: |
228 break; | 228 break; |
229 } | 229 } |
230 } | 230 } |
231 | 231 |
232 bool LayoutTheme::paint(RenderObject* o, const PaintInfo& paintInfo, const IntRe
ct& r) | 232 bool LayoutTheme::paint(RenderObject* o, const PaintInfo& paintInfo, const IntRe
ct& r) |
233 { | 233 { |
234 ControlPart part = o->style()->appearance(); | 234 ControlPart part = o->style()->appearance(); |
235 | 235 |
236 if (shouldUseFallbackTheme(o->style())) | 236 if (shouldUseFallbackTheme(o->deprecatedMutableStyle())) |
237 return paintUsingFallbackTheme(o, paintInfo, r); | 237 return paintUsingFallbackTheme(o, paintInfo, r); |
238 | 238 |
239 #if USE(NEW_THEME) | 239 #if USE(NEW_THEME) |
240 switch (part) { | 240 switch (part) { |
241 case CheckboxPart: | 241 case CheckboxPart: |
242 case RadioPart: | 242 case RadioPart: |
243 case PushButtonPart: | 243 case PushButtonPart: |
244 case SquareButtonPart: | 244 case SquareButtonPart: |
245 case ButtonPart: | 245 case ButtonPart: |
246 case InnerSpinButtonPart: | 246 case InnerSpinButtonPart: |
(...skipping 585 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 405 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 |