OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 void SliderThumbElement::setPositionFromValue() | 214 void SliderThumbElement::setPositionFromValue() |
215 { | 215 { |
216 // Since the code to calculate position is in the RenderSliderThumb layout | 216 // Since the code to calculate position is in the RenderSliderThumb layout |
217 // path, we don't actually update the value here. Instead, we poke at the | 217 // path, we don't actually update the value here. Instead, we poke at the |
218 // renderer directly to trigger layout. | 218 // renderer directly to trigger layout. |
219 if (renderer()) | 219 if (renderer()) |
220 renderer()->setNeedsLayout(true); | 220 renderer()->setNeedsLayout(true); |
221 } | 221 } |
222 | 222 |
223 RenderObject* SliderThumbElement::createRenderer(RenderArena* arena, RenderStyle
*) | 223 RenderObject* SliderThumbElement::createRenderer(RenderStyle*) |
224 { | 224 { |
225 return new (arena) RenderSliderThumb(this); | 225 return new RenderSliderThumb(this); |
226 } | 226 } |
227 | 227 |
228 bool SliderThumbElement::isDisabledFormControl() const | 228 bool SliderThumbElement::isDisabledFormControl() const |
229 { | 229 { |
230 return hostInput() && hostInput()->isDisabledFormControl(); | 230 return hostInput() && hostInput()->isDisabledFormControl(); |
231 } | 231 } |
232 | 232 |
233 bool SliderThumbElement::matchesReadOnlyPseudoClass() const | 233 bool SliderThumbElement::matchesReadOnlyPseudoClass() const |
234 { | 234 { |
235 return hostInput()->matchesReadOnlyPseudoClass(); | 235 return hostInput()->matchesReadOnlyPseudoClass(); |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 inline SliderContainerElement::SliderContainerElement(Document* document) | 441 inline SliderContainerElement::SliderContainerElement(Document* document) |
442 : HTMLDivElement(HTMLNames::divTag, document) | 442 : HTMLDivElement(HTMLNames::divTag, document) |
443 { | 443 { |
444 } | 444 } |
445 | 445 |
446 PassRefPtr<SliderContainerElement> SliderContainerElement::create(Document* docu
ment) | 446 PassRefPtr<SliderContainerElement> SliderContainerElement::create(Document* docu
ment) |
447 { | 447 { |
448 return adoptRef(new SliderContainerElement(document)); | 448 return adoptRef(new SliderContainerElement(document)); |
449 } | 449 } |
450 | 450 |
451 RenderObject* SliderContainerElement::createRenderer(RenderArena* arena, RenderS
tyle*) | 451 RenderObject* SliderContainerElement::createRenderer(RenderStyle*) |
452 { | 452 { |
453 return new (arena) RenderSliderContainer(this); | 453 return new RenderSliderContainer(this); |
454 } | 454 } |
455 | 455 |
456 const AtomicString& SliderContainerElement::shadowPseudoId() const | 456 const AtomicString& SliderContainerElement::shadowPseudoId() const |
457 { | 457 { |
458 DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-medi
a-slider-container", AtomicString::ConstructFromLiteral)); | 458 DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-medi
a-slider-container", AtomicString::ConstructFromLiteral)); |
459 DEFINE_STATIC_LOCAL(const AtomicString, sliderContainer, ("-webkit-slider-co
ntainer", AtomicString::ConstructFromLiteral)); | 459 DEFINE_STATIC_LOCAL(const AtomicString, sliderContainer, ("-webkit-slider-co
ntainer", AtomicString::ConstructFromLiteral)); |
460 | 460 |
461 if (!shadowHost()->hasTagName(inputTag)) | 461 if (!shadowHost()->hasTagName(inputTag)) |
462 return sliderContainer; | 462 return sliderContainer; |
463 | 463 |
464 RenderStyle* sliderStyle = toHTMLInputElement(shadowHost())->renderer()->sty
le(); | 464 RenderStyle* sliderStyle = toHTMLInputElement(shadowHost())->renderer()->sty
le(); |
465 switch (sliderStyle->appearance()) { | 465 switch (sliderStyle->appearance()) { |
466 case MediaSliderPart: | 466 case MediaSliderPart: |
467 case MediaSliderThumbPart: | 467 case MediaSliderThumbPart: |
468 case MediaVolumeSliderPart: | 468 case MediaVolumeSliderPart: |
469 case MediaVolumeSliderThumbPart: | 469 case MediaVolumeSliderThumbPart: |
470 case MediaFullScreenVolumeSliderPart: | 470 case MediaFullScreenVolumeSliderPart: |
471 case MediaFullScreenVolumeSliderThumbPart: | 471 case MediaFullScreenVolumeSliderThumbPart: |
472 return mediaSliderContainer; | 472 return mediaSliderContainer; |
473 default: | 473 default: |
474 return sliderContainer; | 474 return sliderContainer; |
475 } | 475 } |
476 } | 476 } |
477 | 477 |
478 } | 478 } |
OLD | NEW |