| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 void SliderThumbElement::setPositionFromValue() | 75 void SliderThumbElement::setPositionFromValue() |
| 76 { | 76 { |
| 77 // Since the code to calculate position is in the LayoutSliderThumb layout | 77 // Since the code to calculate position is in the LayoutSliderThumb layout |
| 78 // path, we don't actually update the value here. Instead, we poke at the | 78 // path, we don't actually update the value here. Instead, we poke at the |
| 79 // renderer directly to trigger layout. | 79 // renderer directly to trigger layout. |
| 80 if (renderer()) | 80 if (renderer()) |
| 81 renderer()->setNeedsLayoutAndFullPaintInvalidation(); | 81 renderer()->setNeedsLayoutAndFullPaintInvalidation(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 RenderObject* SliderThumbElement::createRenderer(RenderStyle*) | 84 LayoutObject* SliderThumbElement::createRenderer(RenderStyle*) |
| 85 { | 85 { |
| 86 return new LayoutSliderThumb(this); | 86 return new LayoutSliderThumb(this); |
| 87 } | 87 } |
| 88 | 88 |
| 89 bool SliderThumbElement::isDisabledFormControl() const | 89 bool SliderThumbElement::isDisabledFormControl() const |
| 90 { | 90 { |
| 91 return hostInput() && hostInput()->isDisabledFormControl(); | 91 return hostInput() && hostInput()->isDisabledFormControl(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 bool SliderThumbElement::matchesReadOnlyPseudoClass() const | 94 bool SliderThumbElement::matchesReadOnlyPseudoClass() const |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 | 299 |
| 300 // -------------------------------- | 300 // -------------------------------- |
| 301 | 301 |
| 302 inline SliderContainerElement::SliderContainerElement(Document& document) | 302 inline SliderContainerElement::SliderContainerElement(Document& document) |
| 303 : HTMLDivElement(document) | 303 : HTMLDivElement(document) |
| 304 { | 304 { |
| 305 } | 305 } |
| 306 | 306 |
| 307 DEFINE_NODE_FACTORY(SliderContainerElement) | 307 DEFINE_NODE_FACTORY(SliderContainerElement) |
| 308 | 308 |
| 309 RenderObject* SliderContainerElement::createRenderer(RenderStyle*) | 309 LayoutObject* SliderContainerElement::createRenderer(RenderStyle*) |
| 310 { | 310 { |
| 311 return new LayoutSliderContainer(this); | 311 return new LayoutSliderContainer(this); |
| 312 } | 312 } |
| 313 | 313 |
| 314 const AtomicString& SliderContainerElement::shadowPseudoId() const | 314 const AtomicString& SliderContainerElement::shadowPseudoId() const |
| 315 { | 315 { |
| 316 DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-medi
a-slider-container", AtomicString::ConstructFromLiteral)); | 316 DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-medi
a-slider-container", AtomicString::ConstructFromLiteral)); |
| 317 DEFINE_STATIC_LOCAL(const AtomicString, sliderContainer, ("-webkit-slider-co
ntainer", AtomicString::ConstructFromLiteral)); | 317 DEFINE_STATIC_LOCAL(const AtomicString, sliderContainer, ("-webkit-slider-co
ntainer", AtomicString::ConstructFromLiteral)); |
| 318 | 318 |
| 319 if (!shadowHost() || !shadowHost()->renderer()) | 319 if (!shadowHost() || !shadowHost()->renderer()) |
| 320 return sliderContainer; | 320 return sliderContainer; |
| 321 | 321 |
| 322 RenderStyle* sliderStyle = shadowHost()->renderer()->style(); | 322 RenderStyle* sliderStyle = shadowHost()->renderer()->style(); |
| 323 switch (sliderStyle->appearance()) { | 323 switch (sliderStyle->appearance()) { |
| 324 case MediaSliderPart: | 324 case MediaSliderPart: |
| 325 case MediaSliderThumbPart: | 325 case MediaSliderThumbPart: |
| 326 case MediaVolumeSliderPart: | 326 case MediaVolumeSliderPart: |
| 327 case MediaVolumeSliderThumbPart: | 327 case MediaVolumeSliderThumbPart: |
| 328 case MediaFullScreenVolumeSliderPart: | 328 case MediaFullScreenVolumeSliderPart: |
| 329 case MediaFullScreenVolumeSliderThumbPart: | 329 case MediaFullScreenVolumeSliderThumbPart: |
| 330 return mediaSliderContainer; | 330 return mediaSliderContainer; |
| 331 default: | 331 default: |
| 332 return sliderContainer; | 332 return sliderContainer; |
| 333 } | 333 } |
| 334 } | 334 } |
| 335 | 335 |
| 336 } | 336 } |
| OLD | NEW |