[Mac] Playback target clients do not unregister on page reload
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 18:45:40 +0000 (18:45 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 18:45:40 +0000 (18:45 +0000)
commitc49a2c3e14b989229a094c96274c41dfdc68ab27
treeda02a94f7b1161eacc4ace40d6f06dd3db132d69
parent704569216bb86ede69daf48f5fcd1e4507e97b4c
[Mac] Playback target clients do not unregister on page reload
https://bugs.webkit.org/show_bug.cgi?id=144761

Reviewed by Brady Eidson.

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction): Unregister all target picker clients.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::registerWithDocument): Register for page cache callback.
(WebCore::HTMLMediaElement::unregisterWithDocument): Unregister for page cache callback.
(WebCore::HTMLMediaElement::documentWillSuspendForPageCache): New.
(WebCore::HTMLMediaElement::documentDidResumeFromPageCache): New.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h