| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 3534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3545 | 3545 |
| 3546 bool HTMLMediaElement::closedCaptionsVisible() const | 3546 bool HTMLMediaElement::closedCaptionsVisible() const |
| 3547 { | 3547 { |
| 3548 return m_closedCaptionsVisible; | 3548 return m_closedCaptionsVisible; |
| 3549 } | 3549 } |
| 3550 | 3550 |
| 3551 void HTMLMediaElement::updateTextTrackDisplay() | 3551 void HTMLMediaElement::updateTextTrackDisplay() |
| 3552 { | 3552 { |
| 3553 WTF_LOG(Media, "HTMLMediaElement::updateTextTrackDisplay"); | 3553 WTF_LOG(Media, "HTMLMediaElement::updateTextTrackDisplay"); |
| 3554 | 3554 |
| 3555 if (!hasMediaControls() && !createMediaControls()) | 3555 if (!createMediaControls()) |
| 3556 return; | 3556 return; |
| 3557 | 3557 |
| 3558 mediaControls()->updateTextTrackDisplay(); | 3558 mediaControls()->updateTextTrackDisplay(); |
| 3559 } | 3559 } |
| 3560 | 3560 |
| 3561 void HTMLMediaElement::setClosedCaptionsVisible(bool closedCaptionVisible) | 3561 void HTMLMediaElement::setClosedCaptionsVisible(bool closedCaptionVisible) |
| 3562 { | 3562 { |
| 3563 WTF_LOG(Media, "HTMLMediaElement::setClosedCaptionsVisible(%s)", boolString(
closedCaptionVisible)); | 3563 WTF_LOG(Media, "HTMLMediaElement::setClosedCaptionsVisible(%s)", boolString(
closedCaptionVisible)); |
| 3564 | 3564 |
| 3565 if (!m_player || !hasClosedCaptions()) | 3565 if (!m_player || !hasClosedCaptions()) |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3646 } | 3646 } |
| 3647 | 3647 |
| 3648 void HTMLMediaElement::configureMediaControls() | 3648 void HTMLMediaElement::configureMediaControls() |
| 3649 { | 3649 { |
| 3650 if (!shouldShowControls() || !inDocument()) { | 3650 if (!shouldShowControls() || !inDocument()) { |
| 3651 if (hasMediaControls()) | 3651 if (hasMediaControls()) |
| 3652 mediaControls()->hide(); | 3652 mediaControls()->hide(); |
| 3653 return; | 3653 return; |
| 3654 } | 3654 } |
| 3655 | 3655 |
| 3656 if (!hasMediaControls() && !createMediaControls()) | 3656 if (!createMediaControls()) |
| 3657 return; | 3657 return; |
| 3658 | 3658 |
| 3659 mediaControls()->reset(); | 3659 mediaControls()->reset(); |
| 3660 mediaControls()->show(); | 3660 mediaControls()->show(); |
| 3661 } | 3661 } |
| 3662 | 3662 |
| 3663 void HTMLMediaElement::configureTextTrackDisplay(VisibilityChangeAssumption assu
mption) | 3663 void HTMLMediaElement::configureTextTrackDisplay(VisibilityChangeAssumption assu
mption) |
| 3664 { | 3664 { |
| 3665 ASSERT(m_textTracks); | 3665 ASSERT(m_textTracks); |
| 3666 WTF_LOG(Media, "HTMLMediaElement::configureTextTrackDisplay"); | 3666 WTF_LOG(Media, "HTMLMediaElement::configureTextTrackDisplay"); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 3679 if (assumption == AssumeNoVisibleChange | 3679 if (assumption == AssumeNoVisibleChange |
| 3680 && m_haveVisibleTextTrack == haveVisibleTextTrack) { | 3680 && m_haveVisibleTextTrack == haveVisibleTextTrack) { |
| 3681 updateActiveTextTrackCues(currentTime()); | 3681 updateActiveTextTrackCues(currentTime()); |
| 3682 return; | 3682 return; |
| 3683 } | 3683 } |
| 3684 m_haveVisibleTextTrack = haveVisibleTextTrack; | 3684 m_haveVisibleTextTrack = haveVisibleTextTrack; |
| 3685 m_closedCaptionsVisible = m_haveVisibleTextTrack; | 3685 m_closedCaptionsVisible = m_haveVisibleTextTrack; |
| 3686 | 3686 |
| 3687 if (!m_haveVisibleTextTrack && !hasMediaControls()) | 3687 if (!m_haveVisibleTextTrack && !hasMediaControls()) |
| 3688 return; | 3688 return; |
| 3689 if (!hasMediaControls() && !createMediaControls()) | 3689 if (!createMediaControls()) |
| 3690 return; | 3690 return; |
| 3691 | 3691 |
| 3692 mediaControls()->changedClosedCaptionsVisibility(); | 3692 mediaControls()->changedClosedCaptionsVisibility(); |
| 3693 | 3693 |
| 3694 updateActiveTextTrackCues(currentTime()); | 3694 updateActiveTextTrackCues(currentTime()); |
| 3695 updateTextTrackDisplay(); | 3695 updateTextTrackDisplay(); |
| 3696 } | 3696 } |
| 3697 | 3697 |
| 3698 void HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured() | 3698 void HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured() |
| 3699 { | 3699 { |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3989 | 3989 |
| 3990 #if ENABLE(WEB_AUDIO) | 3990 #if ENABLE(WEB_AUDIO) |
| 3991 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) | 3991 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) |
| 3992 { | 3992 { |
| 3993 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) | 3993 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) |
| 3994 audioSourceProvider()->setClient(0); | 3994 audioSourceProvider()->setClient(0); |
| 3995 } | 3995 } |
| 3996 #endif | 3996 #endif |
| 3997 | 3997 |
| 3998 } | 3998 } |
| OLD | NEW |