[Mac] AirPlay route is sometimes reset when changing video.src
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 May 2016 20:47:53 +0000 (20:47 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 May 2016 20:47:53 +0000 (20:47 +0000)
commit28afcb99e3bd56dc54387e2c69c2f54842a7ab2b
tree815aed6d889e2505721d176d5922f18174039632
parentfd5b18fcdac687b89c488dadb29d0aa050340396
[Mac] AirPlay route is sometimes reset when changing video.src
https://bugs.webkit.org/show_bug.cgi?id=158226
<rdar://problem/24197592>

Reviewed by Jer Noble.

Source/WebCore:

Test: media/airplay-autoplay.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Remove the gesture requirement
  if currently processing a user gesture.
(WebCore::HTMLMediaElement::dispatchEvent): Set m_failedToPlayToWirelessTarget to false when
  dispatching webkitcurrentplaybacktargetiswirelesschanged so an element can succeed after failing.

LayoutTests:

* media/airplay-autoplay-expected.txt: Added.
* media/airplay-autoplay.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/airplay-autoplay-expected.txt [new file with mode: 0644]
LayoutTests/media/airplay-autoplay.html [new file with mode: 0644]
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp