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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 return paintMediaFullScreenVolumeSliderThumb(o, paintInfo, r); | 314 return paintMediaFullScreenVolumeSliderThumb(o, paintInfo, r); |
315 case MediaTimeRemainingPart: | 315 case MediaTimeRemainingPart: |
316 return paintMediaTimeRemaining(o, paintInfo, r); | 316 return paintMediaTimeRemaining(o, paintInfo, r); |
317 case MediaCurrentTimePart: | 317 case MediaCurrentTimePart: |
318 return paintMediaCurrentTime(o, paintInfo, r); | 318 return paintMediaCurrentTime(o, paintInfo, r); |
319 case MediaControlsBackgroundPart: | 319 case MediaControlsBackgroundPart: |
320 return paintMediaControlsBackground(o, paintInfo, r); | 320 return paintMediaControlsBackground(o, paintInfo, r); |
321 case MenulistButtonPart: | 321 case MenulistButtonPart: |
322 case TextFieldPart: | 322 case TextFieldPart: |
323 case TextAreaPart: | 323 case TextAreaPart: |
324 case ListboxPart: | |
325 return true; | 324 return true; |
326 case SearchFieldPart: | 325 case SearchFieldPart: |
327 return paintSearchField(o, paintInfo, r); | 326 return paintSearchField(o, paintInfo, r); |
328 case SearchFieldCancelButtonPart: | 327 case SearchFieldCancelButtonPart: |
329 return paintSearchFieldCancelButton(o, paintInfo, r); | 328 return paintSearchFieldCancelButton(o, paintInfo, r); |
330 case SearchFieldDecorationPart: | 329 case SearchFieldDecorationPart: |
331 return paintSearchFieldDecoration(o, paintInfo, r); | 330 return paintSearchFieldDecoration(o, paintInfo, r); |
332 case SearchFieldResultsDecorationPart: | 331 case SearchFieldResultsDecorationPart: |
333 return paintSearchFieldResultsDecoration(o, paintInfo, r); | 332 return paintSearchFieldResultsDecoration(o, paintInfo, r); |
334 default: | 333 default: |
335 break; | 334 break; |
336 } | 335 } |
337 | 336 |
338 return true; // We don't support the appearance, so let the normal backgroun
d/border paint. | 337 return true; // We don't support the appearance, so let the normal backgroun
d/border paint. |
339 } | 338 } |
340 | 339 |
341 bool RenderTheme::paintBorderOnly(RenderObject* o, const PaintInfo& paintInfo, c
onst IntRect& r) | 340 bool RenderTheme::paintBorderOnly(RenderObject* o, const PaintInfo& paintInfo, c
onst IntRect& r) |
342 { | 341 { |
343 // Call the appropriate paint method based off the appearance value. | 342 // Call the appropriate paint method based off the appearance value. |
344 switch (o->style()->appearance()) { | 343 switch (o->style()->appearance()) { |
345 case TextFieldPart: | 344 case TextFieldPart: |
346 return paintTextField(o, paintInfo, r); | 345 return paintTextField(o, paintInfo, r); |
347 case ListboxPart: | |
348 case TextAreaPart: | 346 case TextAreaPart: |
349 return paintTextArea(o, paintInfo, r); | 347 return paintTextArea(o, paintInfo, r); |
350 case MenulistButtonPart: | 348 case MenulistButtonPart: |
351 case SearchFieldPart: | 349 case SearchFieldPart: |
| 350 case ListboxPart: |
352 return true; | 351 return true; |
353 case CheckboxPart: | 352 case CheckboxPart: |
354 case RadioPart: | 353 case RadioPart: |
355 case PushButtonPart: | 354 case PushButtonPart: |
356 case SquareButtonPart: | 355 case SquareButtonPart: |
357 case ButtonPart: | 356 case ButtonPart: |
358 case MenulistPart: | 357 case MenulistPart: |
359 case MeterPart: | 358 case MeterPart: |
360 case RelevancyLevelIndicatorPart: | 359 case RelevancyLevelIndicatorPart: |
361 case ContinuousCapacityLevelIndicatorPart: | 360 case ContinuousCapacityLevelIndicatorPart: |
(...skipping 15 matching lines...) Expand all Loading... |
377 } | 376 } |
378 | 377 |
379 bool RenderTheme::paintDecorations(RenderObject* o, const PaintInfo& paintInfo,
const IntRect& r) | 378 bool RenderTheme::paintDecorations(RenderObject* o, const PaintInfo& paintInfo,
const IntRect& r) |
380 { | 379 { |
381 // Call the appropriate paint method based off the appearance value. | 380 // Call the appropriate paint method based off the appearance value. |
382 switch (o->style()->appearance()) { | 381 switch (o->style()->appearance()) { |
383 case MenulistButtonPart: | 382 case MenulistButtonPart: |
384 return paintMenuListButton(o, paintInfo, r); | 383 return paintMenuListButton(o, paintInfo, r); |
385 case TextFieldPart: | 384 case TextFieldPart: |
386 case TextAreaPart: | 385 case TextAreaPart: |
387 case ListboxPart: | |
388 case CheckboxPart: | 386 case CheckboxPart: |
389 case RadioPart: | 387 case RadioPart: |
390 case PushButtonPart: | 388 case PushButtonPart: |
391 case SquareButtonPart: | 389 case SquareButtonPart: |
392 case ButtonPart: | 390 case ButtonPart: |
393 case MenulistPart: | 391 case MenulistPart: |
394 case MeterPart: | 392 case MeterPart: |
395 case RelevancyLevelIndicatorPart: | 393 case RelevancyLevelIndicatorPart: |
396 case ContinuousCapacityLevelIndicatorPart: | 394 case ContinuousCapacityLevelIndicatorPart: |
397 case DiscreteCapacityLevelIndicatorPart: | 395 case DiscreteCapacityLevelIndicatorPart: |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 case SquareButtonPart: | 575 case SquareButtonPart: |
578 case ButtonPart: | 576 case ButtonPart: |
579 case ProgressBarPart: | 577 case ProgressBarPart: |
580 case MeterPart: | 578 case MeterPart: |
581 case RelevancyLevelIndicatorPart: | 579 case RelevancyLevelIndicatorPart: |
582 case ContinuousCapacityLevelIndicatorPart: | 580 case ContinuousCapacityLevelIndicatorPart: |
583 case DiscreteCapacityLevelIndicatorPart: | 581 case DiscreteCapacityLevelIndicatorPart: |
584 case RatingLevelIndicatorPart: | 582 case RatingLevelIndicatorPart: |
585 return isBackgroundOrBorderStyled(*style, *uaStyle); | 583 return isBackgroundOrBorderStyled(*style, *uaStyle); |
586 | 584 |
587 case ListboxPart: | |
588 case MenulistPart: | 585 case MenulistPart: |
589 case SearchFieldPart: | 586 case SearchFieldPart: |
590 case TextAreaPart: | 587 case TextAreaPart: |
591 case TextFieldPart: | 588 case TextFieldPart: |
592 return isBackgroundOrBorderStyled(*style, *uaStyle) || style->boxShadow(
); | 589 return isBackgroundOrBorderStyled(*style, *uaStyle) || style->boxShadow(
); |
593 | 590 |
594 case SliderHorizontalPart: | 591 case SliderHorizontalPart: |
595 case SliderVerticalPart: | 592 case SliderVerticalPart: |
596 return style->boxShadow(); | 593 return style->boxShadow(); |
597 | 594 |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1218 | 1215 |
1219 // padding - not honored by WinIE, needs to be removed. | 1216 // padding - not honored by WinIE, needs to be removed. |
1220 style->resetPadding(); | 1217 style->resetPadding(); |
1221 | 1218 |
1222 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) | 1219 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) |
1223 // for now, we will not honor it. | 1220 // for now, we will not honor it. |
1224 style->resetBorder(); | 1221 style->resetBorder(); |
1225 } | 1222 } |
1226 | 1223 |
1227 } // namespace WebCore | 1224 } // namespace WebCore |
OLD | NEW |