| 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 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2735 // Clear the current source node pointer, but don't change the movie as
the spec says: | 2735 // Clear the current source node pointer, but don't change the movie as
the spec says: |
| 2736 // 4.8.8 - Dynamically modifying a source element and its attribute when
the element is already | 2736 // 4.8.8 - Dynamically modifying a source element and its attribute when
the element is already |
| 2737 // inserted in a video or audio element will have no effect. | 2737 // inserted in a video or audio element will have no effect. |
| 2738 m_currentSourceNode = nullptr; | 2738 m_currentSourceNode = nullptr; |
| 2739 WTF_LOG(Media, "HTMLMediaElement::sourceRemoved(%p) - m_currentSourceNod
e set to 0", this); | 2739 WTF_LOG(Media, "HTMLMediaElement::sourceRemoved(%p) - m_currentSourceNod
e set to 0", this); |
| 2740 } | 2740 } |
| 2741 } | 2741 } |
| 2742 | 2742 |
| 2743 void HTMLMediaElement::timeChanged() | 2743 void HTMLMediaElement::timeChanged() |
| 2744 { | 2744 { |
| 2745 WTF_LOG(Media, "HTMLMediaElement::mediaPlayerTimeChanged(%p)", this); | 2745 WTF_LOG(Media, "HTMLMediaElement::timeChanged(%p)", this); |
| 2746 | 2746 |
| 2747 cueTimeline().updateActiveCues(currentTime()); | 2747 cueTimeline().updateActiveCues(currentTime()); |
| 2748 | 2748 |
| 2749 invalidateCachedTime(); | 2749 invalidateCachedTime(); |
| 2750 | 2750 |
| 2751 // 4.8.10.9 steps 12-14. Needed if no ReadyState change is associated with t
he seek. | 2751 // 4.8.10.9 steps 12-14. Needed if no ReadyState change is associated with t
he seek. |
| 2752 if (m_seeking && m_readyState >= HAVE_CURRENT_DATA && !webMediaPlayer()->see
king()) | 2752 if (m_seeking && m_readyState >= HAVE_CURRENT_DATA && !webMediaPlayer()->see
king()) |
| 2753 finishSeek(); | 2753 finishSeek(); |
| 2754 | 2754 |
| 2755 // Always call scheduleTimeupdateEvent when the media engine reports a time
discontinuity, | 2755 // Always call scheduleTimeupdateEvent when the media engine reports a time
discontinuity, |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2820 mediaControls()->reset(); | 2820 mediaControls()->reset(); |
| 2821 if (layoutObject()) | 2821 if (layoutObject()) |
| 2822 layoutObject()->updateFromElement(); | 2822 layoutObject()->updateFromElement(); |
| 2823 | 2823 |
| 2824 if (requestSeek) | 2824 if (requestSeek) |
| 2825 seek(duration); | 2825 seek(duration); |
| 2826 } | 2826 } |
| 2827 | 2827 |
| 2828 void HTMLMediaElement::playbackStateChanged() | 2828 void HTMLMediaElement::playbackStateChanged() |
| 2829 { | 2829 { |
| 2830 WTF_LOG(Media, "HTMLMediaElement::mediaPlayerPlaybackStateChanged(%p)", this
); | 2830 WTF_LOG(Media, "HTMLMediaElement::playbackStateChanged(%p)", this); |
| 2831 | 2831 |
| 2832 if (!webMediaPlayer()) | 2832 if (!webMediaPlayer()) |
| 2833 return; | 2833 return; |
| 2834 | 2834 |
| 2835 if (webMediaPlayer()->paused()) | 2835 if (webMediaPlayer()->paused()) |
| 2836 pause(); | 2836 pause(); |
| 2837 else | 2837 else |
| 2838 playInternal(); | 2838 playInternal(); |
| 2839 } | 2839 } |
| 2840 | 2840 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2875 if (m_webLayer) | 2875 if (m_webLayer) |
| 2876 m_webLayer->invalidate(); | 2876 m_webLayer->invalidate(); |
| 2877 | 2877 |
| 2878 updateDisplayState(); | 2878 updateDisplayState(); |
| 2879 if (layoutObject()) | 2879 if (layoutObject()) |
| 2880 layoutObject()->setShouldDoFullPaintInvalidation(); | 2880 layoutObject()->setShouldDoFullPaintInvalidation(); |
| 2881 } | 2881 } |
| 2882 | 2882 |
| 2883 void HTMLMediaElement::sizeChanged() | 2883 void HTMLMediaElement::sizeChanged() |
| 2884 { | 2884 { |
| 2885 WTF_LOG(Media, "HTMLMediaElement::mediaPlayerSizeChanged(%p)", this); | 2885 WTF_LOG(Media, "HTMLMediaElement::sizeChanged(%p)", this); |
| 2886 | 2886 |
| 2887 ASSERT(hasVideo()); // "resize" makes no sense absent video. | 2887 ASSERT(hasVideo()); // "resize" makes no sense absent video. |
| 2888 if (m_readyState > HAVE_NOTHING && isHTMLVideoElement()) | 2888 if (m_readyState > HAVE_NOTHING && isHTMLVideoElement()) |
| 2889 scheduleEvent(EventTypeNames::resize); | 2889 scheduleEvent(EventTypeNames::resize); |
| 2890 | 2890 |
| 2891 if (layoutObject()) | 2891 if (layoutObject()) |
| 2892 layoutObject()->updateFromElement(); | 2892 layoutObject()->updateFromElement(); |
| 2893 } | 2893 } |
| 2894 | 2894 |
| 2895 TimeRanges* HTMLMediaElement::buffered() const | 2895 TimeRanges* HTMLMediaElement::buffered() const |
| (...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3814 visitor->trace(m_client); | 3814 visitor->trace(m_client); |
| 3815 } | 3815 } |
| 3816 | 3816 |
| 3817 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) | 3817 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) |
| 3818 { | 3818 { |
| 3819 visitor->trace(m_client); | 3819 visitor->trace(m_client); |
| 3820 } | 3820 } |
| 3821 #endif | 3821 #endif |
| 3822 | 3822 |
| 3823 } | 3823 } |
| OLD | NEW |