Commit de4fcd43 authored by jer.noble@apple.com's avatar jer.noble@apple.com
Browse files

<https://webkit.org/b/120101> [Mac] Suspended HTMLMediaElements can still hold...

<https://webkit.org/b/120101> [Mac] Suspended HTMLMediaElements can still hold power assertion after playback stops.

Reviewed by Eric Carlson.

Call updateDisplaySleep() when we clear our MediaPlayer, as doing so may kill any in-flight
rateChanged() notifications.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::stop):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b022c270
2013-08-20 Jer Noble <jer.noble@apple.com>
<https://webkit.org/b/120101> [Mac] Suspended HTMLMediaElements can still hold power assertion after playback stops.
Reviewed by Eric Carlson.
Call updateDisplaySleep() when we clear our MediaPlayer, as doing so may kill any in-flight
rateChanged() notifications.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::stop):
2013-08-20 David Barr <davidbarr@chromium.org>, Gyuyoung Kim <gyuyoung.kim@samsung.com>
 
<https://webkit.org/b/92330> [CSS] Pass an image orientation data to drawImage()
......@@ -4148,6 +4148,10 @@ void HTMLMediaElement::clearMediaPlayer(int flags)
if (m_textTracks)
configureTextTrackDisplay();
#endif
#if PLATFORM(MAC)
updateDisableSleep();
#endif
}
bool HTMLMediaElement::canSuspend() const
......@@ -4180,6 +4184,10 @@ void HTMLMediaElement::stop()
// the media player now. Note that userCancelledLoad will already have cleared the player
// if the media was not fully loaded. This handles all other cases.
m_player.clear();
#if PLATFORM(MAC)
updateDisableSleep();
#endif
}
void HTMLMediaElement::suspend(ReasonForSuspension why)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment