Index: Source/core/html/HTMLMediaElement.cpp |
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
index 380683b173f4715adebd76644a288b3f03b27a4b..1182859371c93b44dd36a20421dc8a822030725c 100644 |
--- a/Source/core/html/HTMLMediaElement.cpp |
+++ b/Source/core/html/HTMLMediaElement.cpp |
@@ -1232,9 +1232,9 @@ bool HTMLMediaElement::textTracksAreReady() const |
void HTMLMediaElement::textTrackReadyStateChanged(TextTrack* track) |
{ |
- if (m_player && m_textTracksWhenResourceSelectionBegan.contains(track)) { |
+ if (webMediaPlayer()&& m_textTracksWhenResourceSelectionBegan.contains(track)) { |
if (track->readinessState() != TextTrack::Loading) |
- setReadyState(m_player->readyState()); |
+ setReadyState(static_cast<ReadyState>(webMediaPlayer()->readyState())); |
} else { |
// The track readiness state might have changed as a result of the user |
// clicking the captions button. In this case, a check whether all the |
@@ -1586,10 +1586,10 @@ void HTMLMediaElement::changeNetworkStateFromLoadingToIdle() |
void HTMLMediaElement::mediaPlayerReadyStateChanged() |
{ |
- setReadyState(m_player->readyState()); |
+ setReadyState(static_cast<ReadyState>(webMediaPlayer()->readyState())); |
} |
-void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state) |
+void HTMLMediaElement::setReadyState(ReadyState state) |
{ |
WTF_LOG(Media, "HTMLMediaElement::setReadyState(%d) - current state is %d,", static_cast<int>(state), static_cast<int>(m_readyState)); |
@@ -1597,7 +1597,7 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state) |
bool wasPotentiallyPlaying = potentiallyPlaying(); |
ReadyState oldState = m_readyState; |
- ReadyState newState = static_cast<ReadyState>(state); |
+ ReadyState newState = state; |
bool tracksAreReady = textTracksAreReady(); |