diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index e6bf0c62cff7..e58b17b9d1b3 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -2069,7 +2069,7 @@ "audioPlaybackStopped", "pauseMedia", "stopMedia", "blockMedia", "resumeMedia", "mute", "unmute", "blockedPopups", "lastURI", "purgeSessionHistory", "stopScroll", "startScroll", - "userTypedValue", "userTypedClear", "mediaBlocked" + "userTypedValue", "userTypedClear" ] @@ -2122,8 +2122,6 @@ break; case "reload": case "reloadWithFlags": - case "blockMedia": - case "resumeMedia": getter = () => { return (params) => { // Wait for load handler to be instantiated before @@ -2137,7 +2135,6 @@ break; case "userTypedValue": case "userTypedClear": - case "mediaBlocked": getter = () => { return SessionStore.getLazyTabValue(aTab, name); }; diff --git a/browser/components/sessionstore/SessionStore.jsm b/browser/components/sessionstore/SessionStore.jsm index d91eda4db7a9..073e2127d300 100644 --- a/browser/components/sessionstore/SessionStore.jsm +++ b/browser/components/sessionstore/SessionStore.jsm @@ -3588,8 +3588,6 @@ var SessionStoreInternal = { tab.toggleMuteAudio(tabData.muteReason); } - tab.setMediaBlock(!!tabData.mediaBlocked); - if (tabData.lastAccessed) { tab.updateLastAccessed(tabData.lastAccessed); } diff --git a/browser/components/sessionstore/TabAttributes.jsm b/browser/components/sessionstore/TabAttributes.jsm index b1bf9fb07f44..105641ee7aa6 100644 --- a/browser/components/sessionstore/TabAttributes.jsm +++ b/browser/components/sessionstore/TabAttributes.jsm @@ -14,10 +14,8 @@ this.EXPORTED_SYMBOLS = ["TabAttributes"]; // 'pending' is used internal by sessionstore and managed accordingly. // 'iconLoadingPrincipal' is same as 'image' that it should be handled by // using the gBrowser.getIcon()/setIcon() methods. -// 'mediaBlocked' should not be accessed directly but handled by using the -// tab.linkedBrowser.mediaBlocked, setMediaBlock methods. const ATTRIBUTES_TO_SKIP = new Set(["image", "muted", "pending", "iconLoadingPrincipal", - "skipbackgroundnotify", "mediaBlocked"]); + "skipbackgroundnotify"]); // A set of tab attributes to persist. We will read a given list of tab // attributes when collecting tab data and will re-set those attributes when diff --git a/browser/components/sessionstore/TabState.jsm b/browser/components/sessionstore/TabState.jsm index 3a0de4503991..8c21b1f0d03c 100644 --- a/browser/components/sessionstore/TabState.jsm +++ b/browser/components/sessionstore/TabState.jsm @@ -102,8 +102,6 @@ var TabStateInternal = { tabData.muteReason = tab.muteReason; } - tabData.mediaBlocked = browser.mediaBlocked; - // Save tab attributes. tabData.attributes = TabAttributes.get(tab); diff --git a/browser/components/sessionstore/test/browser_attributes.js b/browser/components/sessionstore/test/browser_attributes.js index 949c5a53d058..1619ed090017 100644 --- a/browser/components/sessionstore/test/browser_attributes.js +++ b/browser/components/sessionstore/test/browser_attributes.js @@ -25,21 +25,15 @@ add_task(async function test() { // Check that the tab has a 'muted' attribute. ok(tab.hasAttribute("muted"), "tab.muted exists"); - tab.setMediaBlock(true /* block */); - // Check that the tab has a 'media-blocked' attribute. - ok(tab.hasAttribute("media-blocked"), "tab.media-blocked exists"); - // Make sure we do not persist 'image' or 'muted' attributes. ss.persistTabAttribute("image"); ss.persistTabAttribute("muted"); ss.persistTabAttribute("iconLoadingPrincipal"); - ss.persistTabAttribute("mediaBlocked"); let {attributes} = JSON.parse(ss.getTabState(tab)); ok(!("image" in attributes), "'image' attribute not saved"); ok(!("iconLoadingPrincipal" in attributes), "'iconLoadingPrincipal' attribute not saved"); ok(!("muted" in attributes), "'muted' attribute not saved"); ok(!("custom" in attributes), "'custom' attribute not saved"); - ok(!("mediaBlocked" in attributes), "'mediaBlocked' attribute not saved"); // Test persisting a custom attribute. tab.setAttribute("custom", "foobar");