OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 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 | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 | 392 |
393 const AtomicString& MediaControlOverlayPlayButtonElement::shadowPseudoId() const | 393 const AtomicString& MediaControlOverlayPlayButtonElement::shadowPseudoId() const |
394 { | 394 { |
395 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-overlay-play-
button", AtomicString::ConstructFromLiteral)); | 395 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-overlay-play-
button", AtomicString::ConstructFromLiteral)); |
396 return id; | 396 return id; |
397 } | 397 } |
398 | 398 |
399 | 399 |
400 // ---------------------------- | 400 // ---------------------------- |
401 | 401 |
402 MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsB
uttonElement(Document& document, MediaControls*) | 402 MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsB
uttonElement(Document& document) |
403 : MediaControlInputElement(document, MediaShowClosedCaptionsButton) | 403 : MediaControlInputElement(document, MediaShowClosedCaptionsButton) |
404 { | 404 { |
405 } | 405 } |
406 | 406 |
407 PassRefPtr<MediaControlToggleClosedCaptionsButtonElement> MediaControlToggleClos
edCaptionsButtonElement::create(Document& document, MediaControls* controls) | 407 PassRefPtr<MediaControlToggleClosedCaptionsButtonElement> MediaControlToggleClos
edCaptionsButtonElement::create(Document& document) |
408 { | 408 { |
409 ASSERT(controls); | 409 RefPtr<MediaControlToggleClosedCaptionsButtonElement> button = adoptRef(new
MediaControlToggleClosedCaptionsButtonElement(document)); |
410 | |
411 RefPtr<MediaControlToggleClosedCaptionsButtonElement> button = adoptRef(new
MediaControlToggleClosedCaptionsButtonElement(document, controls)); | |
412 button->ensureUserAgentShadowRoot(); | 410 button->ensureUserAgentShadowRoot(); |
413 button->setType("button"); | 411 button->setType("button"); |
414 button->hide(); | 412 button->hide(); |
415 return button.release(); | 413 return button.release(); |
416 } | 414 } |
417 | 415 |
418 void MediaControlToggleClosedCaptionsButtonElement::updateDisplayType() | 416 void MediaControlToggleClosedCaptionsButtonElement::updateDisplayType() |
419 { | 417 { |
420 bool captionsVisible = mediaController()->closedCaptionsVisible(); | 418 bool captionsVisible = mediaController()->closedCaptionsVisible(); |
421 setDisplayType(captionsVisible ? MediaHideClosedCaptionsButton : MediaShowCl
osedCaptionsButton); | 419 setDisplayType(captionsVisible ? MediaHideClosedCaptionsButton : MediaShowCl
osedCaptionsButton); |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 float fontSize = smallestDimension * 0.05f; | 788 float fontSize = smallestDimension * 0.05f; |
791 if (fontSize != m_fontSize) { | 789 if (fontSize != m_fontSize) { |
792 m_fontSize = fontSize; | 790 m_fontSize = fontSize; |
793 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); | 791 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue:
:CSS_PX); |
794 } | 792 } |
795 } | 793 } |
796 | 794 |
797 // ---------------------------- | 795 // ---------------------------- |
798 | 796 |
799 } // namespace WebCore | 797 } // namespace WebCore |
OLD | NEW |