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 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 if (layoutObject()) | 1128 if (layoutObject()) |
1129 layoutObject()->setShouldDoFullPaintInvalidation(); | 1129 layoutObject()->setShouldDoFullPaintInvalidation(); |
1130 // Make sure if we create/re-create the WebMediaPlayer that we update our wr
apper. | 1130 // Make sure if we create/re-create the WebMediaPlayer that we update our wr
apper. |
1131 m_audioSourceProvider.wrap(m_webMediaPlayer->getAudioSourceProvider()); | 1131 m_audioSourceProvider.wrap(m_webMediaPlayer->getAudioSourceProvider()); |
1132 m_webMediaPlayer->setVolume(effectiveMediaVolume()); | 1132 m_webMediaPlayer->setVolume(effectiveMediaVolume()); |
1133 | 1133 |
1134 m_webMediaPlayer->setPoster(posterImageURL()); | 1134 m_webMediaPlayer->setPoster(posterImageURL()); |
1135 | 1135 |
1136 m_webMediaPlayer->setPreload(effectivePreloadType()); | 1136 m_webMediaPlayer->setPreload(effectivePreloadType()); |
1137 | 1137 |
| 1138 m_webMediaPlayer->setPaused(m_paused); |
| 1139 |
1138 m_webMediaPlayer->load(loadType(), source, corsMode()); | 1140 m_webMediaPlayer->load(loadType(), source, corsMode()); |
1139 | 1141 |
1140 if (isFullscreen()) { | 1142 if (isFullscreen()) { |
1141 // This handles any transition to or from fullscreen overlay mode. | 1143 // This handles any transition to or from fullscreen overlay mode. |
1142 frame->chromeClient().enterFullScreenForElement(this); | 1144 frame->chromeClient().enterFullScreenForElement(this); |
1143 } | 1145 } |
1144 } | 1146 } |
1145 | 1147 |
1146 void HTMLMediaElement::setPlayerPreload() | 1148 void HTMLMediaElement::setPlayerPreload() |
1147 { | 1149 { |
(...skipping 2020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3168 m_playbackProgressTimer.stop(); | 3170 m_playbackProgressTimer.stop(); |
3169 m_playing = false; | 3171 m_playing = false; |
3170 double time = currentTime(); | 3172 double time = currentTime(); |
3171 if (time > m_lastSeekTime) | 3173 if (time > m_lastSeekTime) |
3172 addPlayedRange(m_lastSeekTime, time); | 3174 addPlayedRange(m_lastSeekTime, time); |
3173 | 3175 |
3174 if (mediaControls()) | 3176 if (mediaControls()) |
3175 mediaControls()->playbackStopped(); | 3177 mediaControls()->playbackStopped(); |
3176 } | 3178 } |
3177 | 3179 |
| 3180 // |m_playing| and |m_paused| may diverge prior to kHaveFutureData, keep the |
| 3181 // WebMediaPlayer up to date despite this divergence. |
| 3182 if (webMediaPlayer()) |
| 3183 webMediaPlayer()->setPaused(m_paused); |
| 3184 |
3178 if (layoutObject()) | 3185 if (layoutObject()) |
3179 layoutObject()->updateFromElement(); | 3186 layoutObject()->updateFromElement(); |
3180 } | 3187 } |
3181 | 3188 |
3182 void HTMLMediaElement::stopPeriodicTimers() | 3189 void HTMLMediaElement::stopPeriodicTimers() |
3183 { | 3190 { |
3184 m_progressEventTimer.stop(); | 3191 m_progressEventTimer.stop(); |
3185 m_playbackProgressTimer.stop(); | 3192 m_playbackProgressTimer.stop(); |
3186 } | 3193 } |
3187 | 3194 |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4027 | 4034 |
4028 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co
nst | 4035 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co
nst |
4029 { | 4036 { |
4030 IntRect result; | 4037 IntRect result; |
4031 if (LayoutObject* object = m_element->layoutObject()) | 4038 if (LayoutObject* object = m_element->layoutObject()) |
4032 result = object->absoluteBoundingBoxRect(); | 4039 result = object->absoluteBoundingBoxRect(); |
4033 return result; | 4040 return result; |
4034 } | 4041 } |
4035 | 4042 |
4036 } // namespace blink | 4043 } // namespace blink |
OLD | NEW |