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 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1812 if (m_readyState >= HAVE_METADATA && oldState < HAVE_METADATA) { | 1812 if (m_readyState >= HAVE_METADATA && oldState < HAVE_METADATA) { |
1813 createPlaceholderTracksIfNecessary(); | 1813 createPlaceholderTracksIfNecessary(); |
1814 | 1814 |
1815 prepareMediaFragmentURI(); | 1815 prepareMediaFragmentURI(); |
1816 | 1816 |
1817 selectInitialTracksIfNecessary(); | 1817 selectInitialTracksIfNecessary(); |
1818 | 1818 |
1819 m_duration = duration(); | 1819 m_duration = duration(); |
1820 scheduleEvent(EventTypeNames::durationchange); | 1820 scheduleEvent(EventTypeNames::durationchange); |
1821 | 1821 |
1822 if (isHTMLVideoElement(*this)) | 1822 if (isHTMLVideoElement()) |
1823 scheduleEvent(EventTypeNames::resize); | 1823 scheduleEvent(EventTypeNames::resize); |
1824 scheduleEvent(EventTypeNames::loadedmetadata); | 1824 scheduleEvent(EventTypeNames::loadedmetadata); |
1825 if (hasMediaControls()) | 1825 if (hasMediaControls()) |
1826 mediaControls()->reset(); | 1826 mediaControls()->reset(); |
1827 if (renderer()) | 1827 if (renderer()) |
1828 renderer()->updateFromElement(); | 1828 renderer()->updateFromElement(); |
1829 } | 1829 } |
1830 | 1830 |
1831 bool shouldUpdateDisplayState = false; | 1831 bool shouldUpdateDisplayState = false; |
1832 | 1832 |
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3203 updateDisplayState(); | 3203 updateDisplayState(); |
3204 if (renderer()) | 3204 if (renderer()) |
3205 renderer()->setShouldDoFullPaintInvalidation(true); | 3205 renderer()->setShouldDoFullPaintInvalidation(true); |
3206 } | 3206 } |
3207 | 3207 |
3208 void HTMLMediaElement::mediaPlayerSizeChanged() | 3208 void HTMLMediaElement::mediaPlayerSizeChanged() |
3209 { | 3209 { |
3210 WTF_LOG(Media, "HTMLMediaElement::mediaPlayerSizeChanged"); | 3210 WTF_LOG(Media, "HTMLMediaElement::mediaPlayerSizeChanged"); |
3211 | 3211 |
3212 ASSERT(hasVideo()); // "resize" makes no sense absent video. | 3212 ASSERT(hasVideo()); // "resize" makes no sense absent video. |
3213 if (m_readyState > HAVE_NOTHING && isHTMLVideoElement(*this)) | 3213 if (m_readyState > HAVE_NOTHING && isHTMLVideoElement()) |
3214 scheduleEvent(EventTypeNames::resize); | 3214 scheduleEvent(EventTypeNames::resize); |
3215 | 3215 |
3216 if (renderer()) | 3216 if (renderer()) |
3217 renderer()->updateFromElement(); | 3217 renderer()->updateFromElement(); |
3218 } | 3218 } |
3219 | 3219 |
3220 PassRefPtrWillBeRawPtr<TimeRanges> HTMLMediaElement::buffered() const | 3220 PassRefPtrWillBeRawPtr<TimeRanges> HTMLMediaElement::buffered() const |
3221 { | 3221 { |
3222 if (m_mediaSource) | 3222 if (m_mediaSource) |
3223 return m_mediaSource->buffered(); | 3223 return m_mediaSource->buffered(); |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3504 { | 3504 { |
3505 WTF_LOG(Media, "HTMLMediaElement::exitFullscreen"); | 3505 WTF_LOG(Media, "HTMLMediaElement::exitFullscreen"); |
3506 | 3506 |
3507 Fullscreen::from(document()).exitFullscreen(); | 3507 Fullscreen::from(document()).exitFullscreen(); |
3508 } | 3508 } |
3509 | 3509 |
3510 void HTMLMediaElement::didBecomeFullscreenElement() | 3510 void HTMLMediaElement::didBecomeFullscreenElement() |
3511 { | 3511 { |
3512 if (hasMediaControls()) | 3512 if (hasMediaControls()) |
3513 mediaControls()->enteredFullscreen(); | 3513 mediaControls()->enteredFullscreen(); |
3514 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isHTMLVideoEl
ement(*this)) | 3514 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isHTMLVideoEl
ement()) |
3515 document().renderView()->compositor()->setNeedsCompositingUpdate(Composi
tingUpdateRebuildTree); | 3515 document().renderView()->compositor()->setNeedsCompositingUpdate(Composi
tingUpdateRebuildTree); |
3516 } | 3516 } |
3517 | 3517 |
3518 void HTMLMediaElement::willStopBeingFullscreenElement() | 3518 void HTMLMediaElement::willStopBeingFullscreenElement() |
3519 { | 3519 { |
3520 if (hasMediaControls()) | 3520 if (hasMediaControls()) |
3521 mediaControls()->exitedFullscreen(); | 3521 mediaControls()->exitedFullscreen(); |
3522 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isHTMLVideoEl
ement(*this)) | 3522 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isHTMLVideoEl
ement()) |
3523 document().renderView()->compositor()->setNeedsCompositingUpdate(Composi
tingUpdateRebuildTree); | 3523 document().renderView()->compositor()->setNeedsCompositingUpdate(Composi
tingUpdateRebuildTree); |
3524 } | 3524 } |
3525 | 3525 |
3526 blink::WebLayer* HTMLMediaElement::platformLayer() const | 3526 blink::WebLayer* HTMLMediaElement::platformLayer() const |
3527 { | 3527 { |
3528 return m_webLayer; | 3528 return m_webLayer; |
3529 } | 3529 } |
3530 | 3530 |
3531 bool HTMLMediaElement::hasClosedCaptions() const | 3531 bool HTMLMediaElement::hasClosedCaptions() const |
3532 { | 3532 { |
(...skipping 456 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 |