From 9ca8ab908caba29e0cbf535f7cdbc41df1b7a0f3 Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Wed, 5 Oct 2016 16:12:16 +0200 Subject: [PATCH] Backed out changeset 0df9c1afedc2 (bug 1292317) --- browser/modules/PluginContent.jsm | 34 ++----------------------------- modules/libpref/init/all.js | 2 +- 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/browser/modules/PluginContent.jsm b/browser/modules/PluginContent.jsm index 4062118f0810..7693bfc9c83c 100644 --- a/browser/modules/PluginContent.jsm +++ b/browser/modules/PluginContent.jsm @@ -54,8 +54,6 @@ PluginContent.prototype = { global.addMessageListener("BrowserPlugins:NPAPIPluginProcessCrashed", this); global.addMessageListener("BrowserPlugins:CrashReportSubmitted", this); global.addMessageListener("BrowserPlugins:Test:ClearCrashData", this); - - Services.obs.addObserver(this, "decoder-doctor-notification", false); }, uninit: function() { @@ -77,9 +75,6 @@ PluginContent.prototype = { global.removeMessageListener("BrowserPlugins:NPAPIPluginProcessCrashed", this); global.removeMessageListener("BrowserPlugins:CrashReportSubmitted", this); global.removeMessageListener("BrowserPlugins:Test:ClearCrashData", this); - - Services.obs.removeObserver(this, "decoder-doctor-notification"); - delete this.global; delete this.content; }, @@ -123,26 +118,6 @@ PluginContent.prototype = { } }, - observe: function observe(aSubject, aTopic, aData) { - switch (aTopic) { - case "decoder-doctor-notification": - let data = JSON.parse(aData); - if (this.haveShownNotification && - aSubject.top.document == this.content.document && - data.formats.toLowerCase().includes("application/x-mpegurl", 0)) { - let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost); - let principal = this.content.document.nodePrincipal; - let location = this.content.document.location.href; - this.global.content.pluginRequiresReload = true; - this.global.sendAsyncMessage("PluginContent:ShowClickToPlayNotification", - { plugins: [... this.pluginData.values()], - showNow: true, - location: location, - }, null, principal); - } - } - }, - onPageShow: function (event) { // Ignore events that aren't from the main document. if (!this.content || event.target != this.content.document) { @@ -165,7 +140,6 @@ PluginContent.prototype = { this._finishRecordingFlashPluginTelemetry(); this.clearPluginCaches(); - this.haveShownNotification = false; }, getPluginUI: function (plugin, anonid) { @@ -751,11 +725,9 @@ PluginContent.prototype = { } } - // If there are no instances of the plugin on the page any more or if we've - // noted that the content needs to be reloaded due to replacing HLS, what the + // If there are no instances of the plugin on the page any more, what the // user probably needs is for us to allow and then refresh. - if (newState != "block" && - (!pluginFound || contentWindow.pluginRequiresReload)) { + if (newState != "block" && !pluginFound) { this.reloadPage(); } this.updateNotificationUI(); @@ -817,8 +789,6 @@ PluginContent.prototype = { this.pluginData.set(pluginInfo.permissionString, pluginInfo); } - this.haveShownNotification = true; - this.global.sendAsyncMessage("PluginContent:ShowClickToPlayNotification", { plugins: [... this.pluginData.values()], showNow: showNow, diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 993a9f9d0447..9b8705d26f0e 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -391,7 +391,7 @@ pref("media.gmp.storage.version.expected", 1); // Filter what triggers user notifications. // See DecoderDoctorDocumentWatcher::ReportAnalysis for details. -pref("media.decoder-doctor.notifications-allowed", "MediaWMFNeeded,MediaWidevineNoWMFNoSilverlight,MediaCannotInitializePulseAudio,MediaUnsupportedLibavcodec,MediaCannotPlayNoDecoders,MediaNoDecoders"); +pref("media.decoder-doctor.notifications-allowed", "MediaWMFNeeded,MediaWidevineNoWMFNoSilverlight,MediaCannotInitializePulseAudio,MediaUnsupportedLibavcodec"); // Whether we report partial failures. pref("media.decoder-doctor.verbose", false); // Whether DD should consider WMF-disabled a WMF failure, useful for testing.