| 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 11 matching lines...) Expand all Loading... |
| 22 #include "core/paint/ThemePainter.h" | 22 #include "core/paint/ThemePainter.h" |
| 23 | 23 |
| 24 #include "core/InputTypeNames.h" | 24 #include "core/InputTypeNames.h" |
| 25 #include "core/frame/FrameView.h" | 25 #include "core/frame/FrameView.h" |
| 26 #include "core/html/HTMLDataListElement.h" | 26 #include "core/html/HTMLDataListElement.h" |
| 27 #include "core/html/HTMLDataListOptionsCollection.h" | 27 #include "core/html/HTMLDataListOptionsCollection.h" |
| 28 #include "core/html/HTMLInputElement.h" | 28 #include "core/html/HTMLInputElement.h" |
| 29 #include "core/html/HTMLOptionElement.h" | 29 #include "core/html/HTMLOptionElement.h" |
| 30 #include "core/html/parser/HTMLParserIdioms.h" | 30 #include "core/html/parser/HTMLParserIdioms.h" |
| 31 #include "core/html/shadow/ShadowElementNames.h" | 31 #include "core/html/shadow/ShadowElementNames.h" |
| 32 #include "core/layout/LayoutMeter.h" | |
| 33 #include "core/layout/LayoutTheme.h" | 32 #include "core/layout/LayoutTheme.h" |
| 34 #include "core/layout/LayoutView.h" | 33 #include "core/layout/LayoutView.h" |
| 35 #include "core/paint/MediaControlsPainter.h" | 34 #include "core/paint/MediaControlsPainter.h" |
| 36 #include "core/paint/PaintInfo.h" | 35 #include "core/paint/PaintInfo.h" |
| 37 #include "core/style/ComputedStyle.h" | 36 #include "core/style/ComputedStyle.h" |
| 38 #include "platform/Theme.h" | 37 #include "platform/Theme.h" |
| 39 #include "platform/graphics/GraphicsContextStateSaver.h" | 38 #include "platform/graphics/GraphicsContextStateSaver.h" |
| 40 #include "public/platform/Platform.h" | 39 #include "public/platform/Platform.h" |
| 41 #include "public/platform/WebFallbackThemeEngine.h" | 40 #include "public/platform/WebFallbackThemeEngine.h" |
| 42 #include "public/platform/WebRect.h" | 41 #include "public/platform/WebRect.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 return paintRadio(o, paintInfo, r); | 91 return paintRadio(o, paintInfo, r); |
| 93 case PushButtonPart: | 92 case PushButtonPart: |
| 94 case SquareButtonPart: | 93 case SquareButtonPart: |
| 95 case ButtonPart: | 94 case ButtonPart: |
| 96 return paintButton(o, paintInfo, r); | 95 return paintButton(o, paintInfo, r); |
| 97 case InnerSpinButtonPart: | 96 case InnerSpinButtonPart: |
| 98 return paintInnerSpinButton(o, paintInfo, r); | 97 return paintInnerSpinButton(o, paintInfo, r); |
| 99 case MenulistPart: | 98 case MenulistPart: |
| 100 return paintMenuList(o, paintInfo, r); | 99 return paintMenuList(o, paintInfo, r); |
| 101 case MeterPart: | 100 case MeterPart: |
| 102 case RelevancyLevelIndicatorPart: | 101 return true; |
| 103 case ContinuousCapacityLevelIndicatorPart: | |
| 104 case DiscreteCapacityLevelIndicatorPart: | |
| 105 case RatingLevelIndicatorPart: | |
| 106 return paintMeter(o, paintInfo, r); | |
| 107 case ProgressBarPart: | 102 case ProgressBarPart: |
| 108 return paintProgressBar(o, paintInfo, r); | 103 return paintProgressBar(o, paintInfo, r); |
| 109 case SliderHorizontalPart: | 104 case SliderHorizontalPart: |
| 110 case SliderVerticalPart: | 105 case SliderVerticalPart: |
| 111 return paintSliderTrack(o, paintInfo, r); | 106 return paintSliderTrack(o, paintInfo, r); |
| 112 case SliderThumbHorizontalPart: | 107 case SliderThumbHorizontalPart: |
| 113 case SliderThumbVerticalPart: | 108 case SliderThumbVerticalPart: |
| 114 return paintSliderThumb(o, paintInfo, r); | 109 return paintSliderThumb(o, paintInfo, r); |
| 115 case MediaEnterFullscreenButtonPart: | 110 case MediaEnterFullscreenButtonPart: |
| 116 case MediaExitFullscreenButtonPart: | 111 case MediaExitFullscreenButtonPart: |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 case SearchFieldPart: | 168 case SearchFieldPart: |
| 174 case ListboxPart: | 169 case ListboxPart: |
| 175 return true; | 170 return true; |
| 176 case CheckboxPart: | 171 case CheckboxPart: |
| 177 case RadioPart: | 172 case RadioPart: |
| 178 case PushButtonPart: | 173 case PushButtonPart: |
| 179 case SquareButtonPart: | 174 case SquareButtonPart: |
| 180 case ButtonPart: | 175 case ButtonPart: |
| 181 case MenulistPart: | 176 case MenulistPart: |
| 182 case MeterPart: | 177 case MeterPart: |
| 183 case RelevancyLevelIndicatorPart: | |
| 184 case ContinuousCapacityLevelIndicatorPart: | |
| 185 case DiscreteCapacityLevelIndicatorPart: | |
| 186 case RatingLevelIndicatorPart: | |
| 187 case ProgressBarPart: | 178 case ProgressBarPart: |
| 188 case SliderHorizontalPart: | 179 case SliderHorizontalPart: |
| 189 case SliderVerticalPart: | 180 case SliderVerticalPart: |
| 190 case SliderThumbHorizontalPart: | 181 case SliderThumbHorizontalPart: |
| 191 case SliderThumbVerticalPart: | 182 case SliderThumbVerticalPart: |
| 192 case SearchFieldCancelButtonPart: | 183 case SearchFieldCancelButtonPart: |
| 193 case SearchFieldDecorationPart: | 184 case SearchFieldDecorationPart: |
| 194 case SearchFieldResultsDecorationPart: | 185 case SearchFieldResultsDecorationPart: |
| 195 default: | 186 default: |
| 196 break; | 187 break; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 207 return paintMenuListButton(o, paintInfo, r); | 198 return paintMenuListButton(o, paintInfo, r); |
| 208 case TextFieldPart: | 199 case TextFieldPart: |
| 209 case TextAreaPart: | 200 case TextAreaPart: |
| 210 case CheckboxPart: | 201 case CheckboxPart: |
| 211 case RadioPart: | 202 case RadioPart: |
| 212 case PushButtonPart: | 203 case PushButtonPart: |
| 213 case SquareButtonPart: | 204 case SquareButtonPart: |
| 214 case ButtonPart: | 205 case ButtonPart: |
| 215 case MenulistPart: | 206 case MenulistPart: |
| 216 case MeterPart: | 207 case MeterPart: |
| 217 case RelevancyLevelIndicatorPart: | |
| 218 case ContinuousCapacityLevelIndicatorPart: | |
| 219 case DiscreteCapacityLevelIndicatorPart: | |
| 220 case RatingLevelIndicatorPart: | |
| 221 case ProgressBarPart: | 208 case ProgressBarPart: |
| 222 case SliderHorizontalPart: | 209 case SliderHorizontalPart: |
| 223 case SliderVerticalPart: | 210 case SliderVerticalPart: |
| 224 case SliderThumbHorizontalPart: | 211 case SliderThumbHorizontalPart: |
| 225 case SliderThumbVerticalPart: | 212 case SliderThumbVerticalPart: |
| 226 case SearchFieldPart: | 213 case SearchFieldPart: |
| 227 case SearchFieldCancelButtonPart: | 214 case SearchFieldCancelButtonPart: |
| 228 case SearchFieldDecorationPart: | 215 case SearchFieldDecorationPart: |
| 229 case SearchFieldResultsDecorationPart: | 216 case SearchFieldResultsDecorationPart: |
| 230 default: | 217 default: |
| 231 break; | 218 break; |
| 232 } | 219 } |
| 233 | 220 |
| 234 return false; | 221 return false; |
| 235 } | 222 } |
| 236 | 223 |
| 237 bool ThemePainter::paintMeter(const LayoutObject&, const PaintInfo&, const IntRe
ct&) | |
| 238 { | |
| 239 return true; | |
| 240 } | |
| 241 | |
| 242 void ThemePainter::paintSliderTicks(const LayoutObject& o, const PaintInfo& pain
tInfo, const IntRect&rect) | 224 void ThemePainter::paintSliderTicks(const LayoutObject& o, const PaintInfo& pain
tInfo, const IntRect&rect) |
| 243 { | 225 { |
| 244 Node* node = o.node(); | 226 Node* node = o.node(); |
| 245 if (!isHTMLInputElement(node)) | 227 if (!isHTMLInputElement(node)) |
| 246 return; | 228 return; |
| 247 | 229 |
| 248 HTMLInputElement* input = toHTMLInputElement(node); | 230 HTMLInputElement* input = toHTMLInputElement(node); |
| 249 if (input->type() != InputTypeNames::range || !input->userAgentShadowRoot()-
>hasChildren()) | 231 if (input->type() != InputTypeNames::range || !input->userAgentShadowRoot()-
>hasChildren()) |
| 250 return; | 232 return; |
| 251 | 233 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 i.context.translate(unzoomedRect.x(), unzoomedRect.y()); | 351 i.context.translate(unzoomedRect.x(), unzoomedRect.y()); |
| 370 i.context.scale(zoomLevel, zoomLevel); | 352 i.context.scale(zoomLevel, zoomLevel); |
| 371 i.context.translate(-unzoomedRect.x(), -unzoomedRect.y()); | 353 i.context.translate(-unzoomedRect.x(), -unzoomedRect.y()); |
| 372 } | 354 } |
| 373 | 355 |
| 374 Platform::current()->fallbackThemeEngine()->paint(canvas, WebFallbackThemeEn
gine::PartRadio, getWebFallbackThemeState(o), WebRect(unzoomedRect), &extraParam
s); | 356 Platform::current()->fallbackThemeEngine()->paint(canvas, WebFallbackThemeEn
gine::PartRadio, getWebFallbackThemeState(o), WebRect(unzoomedRect), &extraParam
s); |
| 375 return false; | 357 return false; |
| 376 } | 358 } |
| 377 | 359 |
| 378 } // namespace blink | 360 } // namespace blink |
| OLD | NEW |