| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 } | 198 } |
| 199 | 199 |
| 200 // -------------------------------- | 200 // -------------------------------- |
| 201 | 201 |
| 202 inline SliderThumbElement::SliderThumbElement(Document& document) | 202 inline SliderThumbElement::SliderThumbElement(Document& document) |
| 203 : HTMLDivElement(document) | 203 : HTMLDivElement(document) |
| 204 , m_inDragMode(false) | 204 , m_inDragMode(false) |
| 205 { | 205 { |
| 206 } | 206 } |
| 207 | 207 |
| 208 PassRefPtr<SliderThumbElement> SliderThumbElement::create(Document& document) | 208 PassRefPtrWillBeRawPtr<SliderThumbElement> SliderThumbElement::create(Document&
document) |
| 209 { | 209 { |
| 210 RefPtr<SliderThumbElement> element = adoptRef(new SliderThumbElement(documen
t)); | 210 RefPtrWillBeRawPtr<SliderThumbElement> element = adoptRefWillBeRefCountedGar
bageCollected(new SliderThumbElement(document)); |
| 211 element->setAttribute(idAttr, ShadowElementNames::sliderThumb()); | 211 element->setAttribute(idAttr, ShadowElementNames::sliderThumb()); |
| 212 return element.release(); | 212 return element.release(); |
| 213 } | 213 } |
| 214 | 214 |
| 215 void SliderThumbElement::setPositionFromValue() | 215 void SliderThumbElement::setPositionFromValue() |
| 216 { | 216 { |
| 217 // Since the code to calculate position is in the RenderSliderThumb layout | 217 // Since the code to calculate position is in the RenderSliderThumb layout |
| 218 // path, we don't actually update the value here. Instead, we poke at the | 218 // path, we don't actually update the value here. Instead, we poke at the |
| 219 // renderer directly to trigger layout. | 219 // renderer directly to trigger layout. |
| 220 if (renderer()) | 220 if (renderer()) |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 } | 437 } |
| 438 } | 438 } |
| 439 | 439 |
| 440 // -------------------------------- | 440 // -------------------------------- |
| 441 | 441 |
| 442 inline SliderContainerElement::SliderContainerElement(Document& document) | 442 inline SliderContainerElement::SliderContainerElement(Document& document) |
| 443 : HTMLDivElement(document) | 443 : HTMLDivElement(document) |
| 444 { | 444 { |
| 445 } | 445 } |
| 446 | 446 |
| 447 PassRefPtr<SliderContainerElement> SliderContainerElement::create(Document& docu
ment) | 447 PassRefPtrWillBeRawPtr<SliderContainerElement> SliderContainerElement::create(Do
cument& document) |
| 448 { | 448 { |
| 449 return adoptRef(new SliderContainerElement(document)); | 449 return adoptRefWillBeRefCountedGarbageCollected(new SliderContainerElement(d
ocument)); |
| 450 } | 450 } |
| 451 | 451 |
| 452 RenderObject* SliderContainerElement::createRenderer(RenderStyle*) | 452 RenderObject* SliderContainerElement::createRenderer(RenderStyle*) |
| 453 { | 453 { |
| 454 return new RenderSliderContainer(this); | 454 return new RenderSliderContainer(this); |
| 455 } | 455 } |
| 456 | 456 |
| 457 const AtomicString& SliderContainerElement::shadowPseudoId() const | 457 const AtomicString& SliderContainerElement::shadowPseudoId() const |
| 458 { | 458 { |
| 459 DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-medi
a-slider-container", AtomicString::ConstructFromLiteral)); | 459 DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-medi
a-slider-container", AtomicString::ConstructFromLiteral)); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 470 case MediaVolumeSliderThumbPart: | 470 case MediaVolumeSliderThumbPart: |
| 471 case MediaFullScreenVolumeSliderPart: | 471 case MediaFullScreenVolumeSliderPart: |
| 472 case MediaFullScreenVolumeSliderThumbPart: | 472 case MediaFullScreenVolumeSliderThumbPart: |
| 473 return mediaSliderContainer; | 473 return mediaSliderContainer; |
| 474 default: | 474 default: |
| 475 return sliderContainer; | 475 return sliderContainer; |
| 476 } | 476 } |
| 477 } | 477 } |
| 478 | 478 |
| 479 } | 479 } |
| OLD | NEW |