Bug 1921060 - Implement full mute button spec r=desktop-theme-reviewers,tabbrowser-reviewers,dao,sessionstore-reviewers,sclements

Differential Revision: https://phabricator.services.mozilla.com/D231182
This commit is contained in:
Kelly Cochrane
2024-12-12 12:57:41 +00:00
parent 0d37e7e5ff
commit 93e44d9499
11 changed files with 76 additions and 162 deletions

View File

@@ -2077,9 +2077,6 @@
// process so the browser can no longer be considered to be
// crashed.
tab.removeAttribute("crashed");
// we call updatetabIndicatorAttr here, rather than _tabAttrModified, so as
// to be consistent with how "crashed" attribute changes are handled elsewhere
this.tabContainer.updateTabIndicatorAttr(tab);
}
// If the findbar has been initialised, reset its browser reference.
@@ -6421,8 +6418,13 @@
event.stopPropagation();
let tab = event.target.triggerNode?.closest("tab");
if (!tab) {
event.preventDefault();
return;
if (event.target.triggerNode?.getRootNode()?.host?.closest("tab")) {
// Check if triggerNode is within shadowRoot of moz-button
tab = event.target.triggerNode?.getRootNode().host.closest("tab");
} else {
event.preventDefault();
return;
}
}
const tooltip = event.target;
@@ -6431,7 +6433,7 @@
const tabCount = this.selectedTabs.includes(tab)
? this.selectedTabs.length
: 1;
if (tab._overPlayingIcon) {
if (tab._overPlayingIcon || tab._overAudioButton) {
let l10nId;
const l10nArgs = { tabCount };
if (tab.selected) {
@@ -7045,7 +7047,6 @@
// process so the browser can no longer be considered to be
// crashed.
tab.removeAttribute("crashed");
gBrowser.tabContainer.updateTabIndicatorAttr(tab);
}
if (this.isFindBarInitialized(tab)) {
@@ -7370,7 +7371,6 @@
delete this.mBrowser.initialPageLoadedFromUserAction;
// If the browser is loading it must not be crashed anymore
this.mTab.removeAttribute("crashed");
gBrowser.tabContainer.updateTabIndicatorAttr(this.mTab);
}
if (this._shouldShowProgress(aRequest)) {