| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 case MediaSubtitlesIconPart: | 143 case MediaSubtitlesIconPart: |
| 144 return MediaControlsPainter::paintMediaSubtitlesIcon(o, paintInfo, r); | 144 return MediaControlsPainter::paintMediaSubtitlesIcon(o, paintInfo, r); |
| 145 case MenulistButtonPart: | 145 case MenulistButtonPart: |
| 146 case TextFieldPart: | 146 case TextFieldPart: |
| 147 case TextAreaPart: | 147 case TextAreaPart: |
| 148 return true; | 148 return true; |
| 149 case SearchFieldPart: | 149 case SearchFieldPart: |
| 150 return paintSearchField(o, paintInfo, r); | 150 return paintSearchField(o, paintInfo, r); |
| 151 case SearchFieldCancelButtonPart: | 151 case SearchFieldCancelButtonPart: |
| 152 return paintSearchFieldCancelButton(o, paintInfo, r); | 152 return paintSearchFieldCancelButton(o, paintInfo, r); |
| 153 case SearchFieldDecorationPart: | |
| 154 return paintSearchFieldDecoration(o, paintInfo, r); | |
| 155 case SearchFieldResultsDecorationPart: | |
| 156 return paintSearchFieldResultsDecoration(o, paintInfo, r); | |
| 157 default: | 153 default: |
| 158 break; | 154 break; |
| 159 } | 155 } |
| 160 | 156 |
| 161 return true; // We don't support the appearance, so let the normal backgroun
d/border paint. | 157 return true; // We don't support the appearance, so let the normal backgroun
d/border paint. |
| 162 } | 158 } |
| 163 | 159 |
| 164 bool ThemePainter::paintBorderOnly(const LayoutObject& o, const PaintInfo& paint
Info, const IntRect&r) | 160 bool ThemePainter::paintBorderOnly(const LayoutObject& o, const PaintInfo& paint
Info, const IntRect&r) |
| 165 { | 161 { |
| 166 // Call the appropriate paint method based off the appearance value. | 162 // Call the appropriate paint method based off the appearance value. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 179 case SquareButtonPart: | 175 case SquareButtonPart: |
| 180 case ButtonPart: | 176 case ButtonPart: |
| 181 case MenulistPart: | 177 case MenulistPart: |
| 182 case MeterPart: | 178 case MeterPart: |
| 183 case ProgressBarPart: | 179 case ProgressBarPart: |
| 184 case SliderHorizontalPart: | 180 case SliderHorizontalPart: |
| 185 case SliderVerticalPart: | 181 case SliderVerticalPart: |
| 186 case SliderThumbHorizontalPart: | 182 case SliderThumbHorizontalPart: |
| 187 case SliderThumbVerticalPart: | 183 case SliderThumbVerticalPart: |
| 188 case SearchFieldCancelButtonPart: | 184 case SearchFieldCancelButtonPart: |
| 189 case SearchFieldDecorationPart: | |
| 190 case SearchFieldResultsDecorationPart: | |
| 191 default: | 185 default: |
| 192 break; | 186 break; |
| 193 } | 187 } |
| 194 | 188 |
| 195 return false; | 189 return false; |
| 196 } | 190 } |
| 197 | 191 |
| 198 bool ThemePainter::paintDecorations(const LayoutObject& o, const PaintInfo& pain
tInfo, const IntRect&r) | 192 bool ThemePainter::paintDecorations(const LayoutObject& o, const PaintInfo& pain
tInfo, const IntRect&r) |
| 199 { | 193 { |
| 200 // Call the appropriate paint method based off the appearance value. | 194 // Call the appropriate paint method based off the appearance value. |
| 201 switch (o.styleRef().appearance()) { | 195 switch (o.styleRef().appearance()) { |
| 202 case MenulistButtonPart: | 196 case MenulistButtonPart: |
| 203 return paintMenuListButton(o, paintInfo, r); | 197 return paintMenuListButton(o, paintInfo, r); |
| 204 case TextFieldPart: | 198 case TextFieldPart: |
| 205 case TextAreaPart: | 199 case TextAreaPart: |
| 206 case CheckboxPart: | 200 case CheckboxPart: |
| 207 case RadioPart: | 201 case RadioPart: |
| 208 case PushButtonPart: | 202 case PushButtonPart: |
| 209 case SquareButtonPart: | 203 case SquareButtonPart: |
| 210 case ButtonPart: | 204 case ButtonPart: |
| 211 case MenulistPart: | 205 case MenulistPart: |
| 212 case MeterPart: | 206 case MeterPart: |
| 213 case ProgressBarPart: | 207 case ProgressBarPart: |
| 214 case SliderHorizontalPart: | 208 case SliderHorizontalPart: |
| 215 case SliderVerticalPart: | 209 case SliderVerticalPart: |
| 216 case SliderThumbHorizontalPart: | 210 case SliderThumbHorizontalPart: |
| 217 case SliderThumbVerticalPart: | 211 case SliderThumbVerticalPart: |
| 218 case SearchFieldPart: | 212 case SearchFieldPart: |
| 219 case SearchFieldCancelButtonPart: | 213 case SearchFieldCancelButtonPart: |
| 220 case SearchFieldDecorationPart: | |
| 221 case SearchFieldResultsDecorationPart: | |
| 222 default: | 214 default: |
| 223 break; | 215 break; |
| 224 } | 216 } |
| 225 | 217 |
| 226 return false; | 218 return false; |
| 227 } | 219 } |
| 228 | 220 |
| 229 void ThemePainter::paintSliderTicks(const LayoutObject& o, const PaintInfo& pain
tInfo, const IntRect&rect) | 221 void ThemePainter::paintSliderTicks(const LayoutObject& o, const PaintInfo& pain
tInfo, const IntRect&rect) |
| 230 { | 222 { |
| 231 Node* node = o.node(); | 223 Node* node = o.node(); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 i.context.translate(unzoomedRect.x(), unzoomedRect.y()); | 348 i.context.translate(unzoomedRect.x(), unzoomedRect.y()); |
| 357 i.context.scale(zoomLevel, zoomLevel); | 349 i.context.scale(zoomLevel, zoomLevel); |
| 358 i.context.translate(-unzoomedRect.x(), -unzoomedRect.y()); | 350 i.context.translate(-unzoomedRect.x(), -unzoomedRect.y()); |
| 359 } | 351 } |
| 360 | 352 |
| 361 Platform::current()->fallbackThemeEngine()->paint(canvas, WebFallbackThemeEn
gine::PartRadio, getWebFallbackThemeState(o), WebRect(unzoomedRect), &extraParam
s); | 353 Platform::current()->fallbackThemeEngine()->paint(canvas, WebFallbackThemeEn
gine::PartRadio, getWebFallbackThemeState(o), WebRect(unzoomedRect), &extraParam
s); |
| 362 return false; | 354 return false; |
| 363 } | 355 } |
| 364 | 356 |
| 365 } // namespace blink | 357 } // namespace blink |
| OLD | NEW |