Bug 1513681 - part1 : dispatch 'GloballyAutoplayBlocked' event when site is permanent blocked. r=cpearce,smaug

This event is used to notify tab that this site is permanently blocked and we should show the blocking icon for it. Patch2 will handle following details.

Differential Revision: https://phabricator.services.mozilla.com/D14794
This commit is contained in:
alwu
2018-12-18 18:11:56 +00:00
parent d2a8b61ef9
commit 4b9b64db9f
3 changed files with 21 additions and 0 deletions

View File

@@ -3697,6 +3697,7 @@ void HTMLMediaElement::DispatchEventsWhenPlayWasNotAllowed() {
ChromeOnlyDispatch::eYes);
asyncDispatcher->PostDOMEvent();
#endif
OwnerDoc()->MaybeNotifyAutoplayBlocked();
}
void HTMLMediaElement::PlayInternal(bool aHandlingUserInput) {