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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 // correctly repaint media controls (volume and timeline sliders) - | 188 // correctly repaint media controls (volume and timeline sliders) - |
189 // they have special painting code in RenderMediaControls.cpp:paintMedia
VolumeSlider | 189 // they have special painting code in RenderMediaControls.cpp:paintMedia
VolumeSlider |
190 // and paintMediaSlider that gets called via -webkit-appearance and Rend
erTheme, | 190 // and paintMediaSlider that gets called via -webkit-appearance and Rend
erTheme, |
191 // so nothing else would otherwise invalidate the slider. | 191 // so nothing else would otherwise invalidate the slider. |
192 repaint(); | 192 repaint(); |
193 } | 193 } |
194 } | 194 } |
195 | 195 |
196 // -------------------------------- | 196 // -------------------------------- |
197 | 197 |
198 inline SliderThumbElement::SliderThumbElement(Document* document) | 198 inline SliderThumbElement::SliderThumbElement(Document& document) |
199 : HTMLDivElement(HTMLNames::divTag, document) | 199 : HTMLDivElement(HTMLNames::divTag, document) |
200 , m_inDragMode(false) | 200 , m_inDragMode(false) |
201 { | 201 { |
202 } | 202 } |
203 | 203 |
204 PassRefPtr<SliderThumbElement> SliderThumbElement::create(Document* document) | 204 PassRefPtr<SliderThumbElement> SliderThumbElement::create(Document& document) |
205 { | 205 { |
206 RefPtr<SliderThumbElement> element = adoptRef(new SliderThumbElement(documen
t)); | 206 RefPtr<SliderThumbElement> element = adoptRef(new SliderThumbElement(documen
t)); |
207 element->setAttribute(idAttr, ShadowElementNames::sliderThumb()); | 207 element->setAttribute(idAttr, ShadowElementNames::sliderThumb()); |
208 return element.release(); | 208 return element.release(); |
209 } | 209 } |
210 | 210 |
211 void SliderThumbElement::setPositionFromValue() | 211 void SliderThumbElement::setPositionFromValue() |
212 { | 212 { |
213 // Since the code to calculate position is in the RenderSliderThumb layout | 213 // Since the code to calculate position is in the RenderSliderThumb layout |
214 // path, we don't actually update the value here. Instead, we poke at the | 214 // path, we don't actually update the value here. Instead, we poke at the |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 case MediaFullScreenVolumeSliderPart: | 428 case MediaFullScreenVolumeSliderPart: |
429 case MediaFullScreenVolumeSliderThumbPart: | 429 case MediaFullScreenVolumeSliderThumbPart: |
430 return mediaSliderThumbShadowPartId(); | 430 return mediaSliderThumbShadowPartId(); |
431 default: | 431 default: |
432 return sliderThumbShadowPartId(); | 432 return sliderThumbShadowPartId(); |
433 } | 433 } |
434 } | 434 } |
435 | 435 |
436 // -------------------------------- | 436 // -------------------------------- |
437 | 437 |
438 inline SliderContainerElement::SliderContainerElement(Document* document) | 438 inline SliderContainerElement::SliderContainerElement(Document& document) |
439 : HTMLDivElement(HTMLNames::divTag, document) | 439 : HTMLDivElement(HTMLNames::divTag, document) |
440 { | 440 { |
441 } | 441 } |
442 | 442 |
443 PassRefPtr<SliderContainerElement> SliderContainerElement::create(Document* docu
ment) | 443 PassRefPtr<SliderContainerElement> SliderContainerElement::create(Document& docu
ment) |
444 { | 444 { |
445 return adoptRef(new SliderContainerElement(document)); | 445 return adoptRef(new SliderContainerElement(document)); |
446 } | 446 } |
447 | 447 |
448 RenderObject* SliderContainerElement::createRenderer(RenderStyle*) | 448 RenderObject* SliderContainerElement::createRenderer(RenderStyle*) |
449 { | 449 { |
450 return new RenderSliderContainer(this); | 450 return new RenderSliderContainer(this); |
451 } | 451 } |
452 | 452 |
453 const AtomicString& SliderContainerElement::part() const | 453 const AtomicString& SliderContainerElement::part() const |
(...skipping 12 matching lines...) Expand all Loading... |
466 case MediaVolumeSliderThumbPart: | 466 case MediaVolumeSliderThumbPart: |
467 case MediaFullScreenVolumeSliderPart: | 467 case MediaFullScreenVolumeSliderPart: |
468 case MediaFullScreenVolumeSliderThumbPart: | 468 case MediaFullScreenVolumeSliderThumbPart: |
469 return mediaSliderContainer; | 469 return mediaSliderContainer; |
470 default: | 470 default: |
471 return sliderContainer; | 471 return sliderContainer; |
472 } | 472 } |
473 } | 473 } |
474 | 474 |
475 } | 475 } |
OLD | NEW |