зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1215335 - Remove unused notification-inner container. r=bgrins
MozReview-Commit-ID: C9kKRpD3AzU --HG-- extra : rebase_source : 7f3dde91b73084783c63733f0c823ec0e7e80b90
This commit is contained in:
Родитель
e1887c7a6d
Коммит
555d47bbb5
|
@ -21,137 +21,135 @@
|
|||
<stylesheet src="chrome://global/skin/notification.css"/>
|
||||
</resources>
|
||||
<content>
|
||||
<xul:hbox class="notification-inner" flex="1" xbl:inherits="type">
|
||||
<xul:hbox anonid="details" align="center" flex="1">
|
||||
<xul:image class="translate-infobar-element messageImage"
|
||||
anonid="messageImage"/>
|
||||
<xul:panel anonid="welcomePanel" class="translation-welcome-panel"
|
||||
type="arrow" align="start">
|
||||
<xul:image class="translation-welcome-logo"/>
|
||||
<xul:vbox flex="1" class="translation-welcome-content">
|
||||
<xul:description class="translation-welcome-headline"
|
||||
anonid="welcomeHeadline"/>
|
||||
<xul:description class="translation-welcome-body" anonid="welcomeBody"/>
|
||||
<xul:hbox align="center">
|
||||
<xul:label anonid="learnMore" class="plain text-link"
|
||||
onclick="openUILinkIn('https://support.mozilla.org/kb/automatic-translation', 'tab'); this.parentNode.parentNode.parentNode.hidePopup();"/>
|
||||
<xul:spacer flex="1"/>
|
||||
<xul:button class="translate-infobar-element" anonid="thanksButton"
|
||||
onclick="this.parentNode.parentNode.parentNode.hidePopup();"/>
|
||||
</xul:hbox>
|
||||
</xul:vbox>
|
||||
</xul:panel>
|
||||
<xul:deck anonid="translationStates" selectedIndex="0">
|
||||
|
||||
<!-- offer to translate -->
|
||||
<xul:hbox class="translate-offer-box" align="center">
|
||||
<xul:label class="translate-infobar-element" value="&translation.thisPageIsIn.label;"/>
|
||||
<xul:menulist class="translate-infobar-element" anonid="detectedLanguage">
|
||||
<xul:menupopup/>
|
||||
</xul:menulist>
|
||||
<xul:label class="translate-infobar-element" value="&translation.translateThisPage.label;"/>
|
||||
<xul:button class="translate-infobar-element"
|
||||
label="&translation.translate.button;"
|
||||
anonid="translate"
|
||||
oncommand="document.getBindingParent(this).translate();"/>
|
||||
<xul:button class="translate-infobar-element"
|
||||
label="&translation.notNow.button;" anonid="notNow"
|
||||
oncommand="document.getBindingParent(this).closeCommand();"/>
|
||||
<xul:hbox anonid="details" align="center" flex="1">
|
||||
<xul:image class="translate-infobar-element messageImage"
|
||||
anonid="messageImage"/>
|
||||
<xul:panel anonid="welcomePanel" class="translation-welcome-panel"
|
||||
type="arrow" align="start">
|
||||
<xul:image class="translation-welcome-logo"/>
|
||||
<xul:vbox flex="1" class="translation-welcome-content">
|
||||
<xul:description class="translation-welcome-headline"
|
||||
anonid="welcomeHeadline"/>
|
||||
<xul:description class="translation-welcome-body" anonid="welcomeBody"/>
|
||||
<xul:hbox align="center">
|
||||
<xul:label anonid="learnMore" class="plain text-link"
|
||||
onclick="openUILinkIn('https://support.mozilla.org/kb/automatic-translation', 'tab'); this.parentNode.parentNode.parentNode.hidePopup();"/>
|
||||
<xul:spacer flex="1"/>
|
||||
<xul:button class="translate-infobar-element" anonid="thanksButton"
|
||||
onclick="this.parentNode.parentNode.parentNode.hidePopup();"/>
|
||||
</xul:hbox>
|
||||
</xul:vbox>
|
||||
</xul:panel>
|
||||
<xul:deck anonid="translationStates" selectedIndex="0">
|
||||
|
||||
<!-- translating -->
|
||||
<xul:vbox class="translating-box" pack="center">
|
||||
<xul:label class="translate-infobar-element"
|
||||
value="&translation.translatingContent.label;"/>
|
||||
</xul:vbox>
|
||||
<!-- offer to translate -->
|
||||
<xul:hbox class="translate-offer-box" align="center">
|
||||
<xul:label class="translate-infobar-element" value="&translation.thisPageIsIn.label;"/>
|
||||
<xul:menulist class="translate-infobar-element" anonid="detectedLanguage">
|
||||
<xul:menupopup/>
|
||||
</xul:menulist>
|
||||
<xul:label class="translate-infobar-element" value="&translation.translateThisPage.label;"/>
|
||||
<xul:button class="translate-infobar-element"
|
||||
label="&translation.translate.button;"
|
||||
anonid="translate"
|
||||
oncommand="document.getBindingParent(this).translate();"/>
|
||||
<xul:button class="translate-infobar-element"
|
||||
label="&translation.notNow.button;" anonid="notNow"
|
||||
oncommand="document.getBindingParent(this).closeCommand();"/>
|
||||
</xul:hbox>
|
||||
|
||||
<!-- translated -->
|
||||
<xul:hbox class="translated-box" align="center">
|
||||
<xul:label class="translate-infobar-element"
|
||||
value="&translation.translatedFrom.label;"/>
|
||||
<xul:menulist class="translate-infobar-element"
|
||||
anonid="fromLanguage"
|
||||
oncommand="document.getBindingParent(this).translate()">
|
||||
<xul:menupopup/>
|
||||
</xul:menulist>
|
||||
<xul:label class="translate-infobar-element"
|
||||
value="&translation.translatedTo.label;"/>
|
||||
<xul:menulist class="translate-infobar-element"
|
||||
anonid="toLanguage"
|
||||
oncommand="document.getBindingParent(this).translate()">
|
||||
<xul:menupopup/>
|
||||
</xul:menulist>
|
||||
<xul:label class="translate-infobar-element"
|
||||
value="&translation.translatedToSuffix.label;"/>
|
||||
<xul:button anonid="showOriginal"
|
||||
class="translate-infobar-element"
|
||||
label="&translation.showOriginal.button;"
|
||||
oncommand="document.getBindingParent(this).showOriginal();"/>
|
||||
<xul:button anonid="showTranslation"
|
||||
class="translate-infobar-element"
|
||||
label="&translation.showTranslation.button;"
|
||||
oncommand="document.getBindingParent(this).showTranslation();"/>
|
||||
</xul:hbox>
|
||||
<!-- translating -->
|
||||
<xul:vbox class="translating-box" pack="center">
|
||||
<xul:label class="translate-infobar-element"
|
||||
value="&translation.translatingContent.label;"/>
|
||||
</xul:vbox>
|
||||
|
||||
<!-- error -->
|
||||
<xul:hbox class="translation-error" align="center">
|
||||
<xul:label class="translate-infobar-element"
|
||||
value="&translation.errorTranslating.label;"/>
|
||||
<xul:button class="translate-infobar-element"
|
||||
label="&translation.tryAgain.button;"
|
||||
anonid="tryAgain"
|
||||
oncommand="document.getBindingParent(this).translate();"/>
|
||||
</xul:hbox>
|
||||
<!-- translated -->
|
||||
<xul:hbox class="translated-box" align="center">
|
||||
<xul:label class="translate-infobar-element"
|
||||
value="&translation.translatedFrom.label;"/>
|
||||
<xul:menulist class="translate-infobar-element"
|
||||
anonid="fromLanguage"
|
||||
oncommand="document.getBindingParent(this).translate()">
|
||||
<xul:menupopup/>
|
||||
</xul:menulist>
|
||||
<xul:label class="translate-infobar-element"
|
||||
value="&translation.translatedTo.label;"/>
|
||||
<xul:menulist class="translate-infobar-element"
|
||||
anonid="toLanguage"
|
||||
oncommand="document.getBindingParent(this).translate()">
|
||||
<xul:menupopup/>
|
||||
</xul:menulist>
|
||||
<xul:label class="translate-infobar-element"
|
||||
value="&translation.translatedToSuffix.label;"/>
|
||||
<xul:button anonid="showOriginal"
|
||||
class="translate-infobar-element"
|
||||
label="&translation.showOriginal.button;"
|
||||
oncommand="document.getBindingParent(this).showOriginal();"/>
|
||||
<xul:button anonid="showTranslation"
|
||||
class="translate-infobar-element"
|
||||
label="&translation.showTranslation.button;"
|
||||
oncommand="document.getBindingParent(this).showTranslation();"/>
|
||||
</xul:hbox>
|
||||
|
||||
<!-- unavailable -->
|
||||
<xul:vbox class="translation-unavailable" pack="center">
|
||||
<xul:label class="translate-infobar-element"
|
||||
value="&translation.serviceUnavailable.label;"/>
|
||||
</xul:vbox>
|
||||
<!-- error -->
|
||||
<xul:hbox class="translation-error" align="center">
|
||||
<xul:label class="translate-infobar-element"
|
||||
value="&translation.errorTranslating.label;"/>
|
||||
<xul:button class="translate-infobar-element"
|
||||
label="&translation.tryAgain.button;"
|
||||
anonid="tryAgain"
|
||||
oncommand="document.getBindingParent(this).translate();"/>
|
||||
</xul:hbox>
|
||||
|
||||
</xul:deck>
|
||||
<xul:spacer flex="1"/>
|
||||
<!-- unavailable -->
|
||||
<xul:vbox class="translation-unavailable" pack="center">
|
||||
<xul:label class="translate-infobar-element"
|
||||
value="&translation.serviceUnavailable.label;"/>
|
||||
</xul:vbox>
|
||||
|
||||
<xul:button type="menu"
|
||||
class="translate-infobar-element options-menu-button"
|
||||
anonid="options"
|
||||
label="&translation.options.menu;">
|
||||
<xul:menupopup class="translation-menupopup cui-widget-panel cui-widget-panelview
|
||||
cui-widget-panelWithFooter PanelUI-subView"
|
||||
onpopupshowing="document.getBindingParent(this).optionsShowing();">
|
||||
<xul:menuitem anonid="neverForLanguage"
|
||||
oncommand="document.getBindingParent(this).neverForLanguage();"/>
|
||||
<xul:menuitem anonid="neverForSite"
|
||||
oncommand="document.getBindingParent(this).neverForSite();"
|
||||
label="&translation.options.neverForSite.label;"
|
||||
accesskey="&translation.options.neverForSite.accesskey;"/>
|
||||
<xul:menuseparator/>
|
||||
<xul:menuitem oncommand="openPreferences('paneGeneral', {origin:'translationInfobar'});"
|
||||
label="&translation.options.preferences.label;"
|
||||
accesskey="&translation.options.preferences.accesskey;"/>
|
||||
<xul:menuitem class="subviewbutton panel-subview-footer"
|
||||
oncommand="document.getBindingParent(this).openProviderAttribution();">
|
||||
<xul:deck anonid="translationEngine" selectedIndex="0">
|
||||
<xul:hbox class="translation-attribution">
|
||||
<xul:label>&translation.options.attribution.beforeLogo;</xul:label>
|
||||
<xul:image src="chrome://browser/content/microsoft-translator-attribution.png"
|
||||
aria-label="Microsoft Translator"/>
|
||||
<xul:label>&translation.options.attribution.afterLogo;</xul:label>
|
||||
</xul:hbox>
|
||||
<xul:label class="translation-attribution">&translation.options.attribution.yandexTranslate;</xul:label>
|
||||
</xul:deck>
|
||||
</xul:menuitem>
|
||||
</xul:menupopup>
|
||||
</xul:button>
|
||||
</xul:deck>
|
||||
<xul:spacer flex="1"/>
|
||||
|
||||
<xul:button type="menu"
|
||||
class="translate-infobar-element options-menu-button"
|
||||
anonid="options"
|
||||
label="&translation.options.menu;">
|
||||
<xul:menupopup class="translation-menupopup cui-widget-panel cui-widget-panelview
|
||||
cui-widget-panelWithFooter PanelUI-subView"
|
||||
onpopupshowing="document.getBindingParent(this).optionsShowing();">
|
||||
<xul:menuitem anonid="neverForLanguage"
|
||||
oncommand="document.getBindingParent(this).neverForLanguage();"/>
|
||||
<xul:menuitem anonid="neverForSite"
|
||||
oncommand="document.getBindingParent(this).neverForSite();"
|
||||
label="&translation.options.neverForSite.label;"
|
||||
accesskey="&translation.options.neverForSite.accesskey;"/>
|
||||
<xul:menuseparator/>
|
||||
<xul:menuitem oncommand="openPreferences('paneGeneral', {origin:'translationInfobar'});"
|
||||
label="&translation.options.preferences.label;"
|
||||
accesskey="&translation.options.preferences.accesskey;"/>
|
||||
<xul:menuitem class="subviewbutton panel-subview-footer"
|
||||
oncommand="document.getBindingParent(this).openProviderAttribution();">
|
||||
<xul:deck anonid="translationEngine" selectedIndex="0">
|
||||
<xul:hbox class="translation-attribution">
|
||||
<xul:label>&translation.options.attribution.beforeLogo;</xul:label>
|
||||
<xul:image src="chrome://browser/content/microsoft-translator-attribution.png"
|
||||
aria-label="Microsoft Translator"/>
|
||||
<xul:label>&translation.options.attribution.afterLogo;</xul:label>
|
||||
</xul:hbox>
|
||||
<xul:label class="translation-attribution">&translation.options.attribution.yandexTranslate;</xul:label>
|
||||
</xul:deck>
|
||||
</xul:menuitem>
|
||||
</xul:menupopup>
|
||||
</xul:button>
|
||||
|
||||
</xul:hbox>
|
||||
<xul:toolbarbutton ondblclick="event.stopPropagation();"
|
||||
anonid="closeButton"
|
||||
class="messageCloseButton close-icon tabbable"
|
||||
xbl:inherits="hidden=hideclose"
|
||||
tooltiptext="&closeNotification.tooltip;"
|
||||
oncommand="document.getBindingParent(this).closeCommand();"/>
|
||||
</xul:hbox>
|
||||
<xul:toolbarbutton ondblclick="event.stopPropagation();"
|
||||
anonid="closeButton"
|
||||
class="messageCloseButton close-icon tabbable"
|
||||
xbl:inherits="hidden=hideclose"
|
||||
tooltiptext="&closeNotification.tooltip;"
|
||||
oncommand="document.getBindingParent(this).closeCommand();"/>
|
||||
</content>
|
||||
<implementation>
|
||||
<property name="state"
|
||||
|
|
|
@ -284,8 +284,8 @@ add_task(async function test_other_ignored() {
|
|||
Assert.ok(notification, "There should be a notification");
|
||||
|
||||
// Dismiss notification, creating the .dmp.ignore file
|
||||
let anonyNodes = document.getAnonymousNodes(notification)[0];
|
||||
let closeButton = anonyNodes.querySelector(".close-icon");
|
||||
let closeButton =
|
||||
document.getAnonymousElementByAttribute(notification, "anonid", "close-button");
|
||||
closeButton.click();
|
||||
gNotificationBox.removeNotification(notification, true);
|
||||
await waitForIgnoredReports(toIgnore);
|
||||
|
@ -476,8 +476,8 @@ add_task(async function test_can_ignore() {
|
|||
Assert.ok(notification, "There should be a notification");
|
||||
|
||||
// Dismiss the notification by clicking on the "X" button.
|
||||
let anonyNodes = document.getAnonymousNodes(notification)[0];
|
||||
let closeButton = anonyNodes.querySelector(".close-icon");
|
||||
let closeButton =
|
||||
document.getAnonymousElementByAttribute(notification, "anonid", "close-button");
|
||||
closeButton.click();
|
||||
// We'll not wait for the notification to finish its transition -
|
||||
// we'll just remove it right away.
|
||||
|
@ -550,8 +550,8 @@ add_task(async function test_shutdown_while_not_showing() {
|
|||
Assert.ok(notification, "There should be a notification");
|
||||
|
||||
// Dismiss the notification by clicking on the "X" button.
|
||||
let anonyNodes = document.getAnonymousNodes(notification)[0];
|
||||
let closeButton = anonyNodes.querySelector(".close-icon");
|
||||
let closeButton =
|
||||
document.getAnonymousElementByAttribute(notification, "anonid", "close-button");
|
||||
closeButton.click();
|
||||
// We'll not wait for the notification to finish its transition -
|
||||
// we'll just remove it right away.
|
||||
|
|
|
@ -399,20 +399,19 @@
|
|||
|
||||
<binding id="notification" role="xul:alert">
|
||||
<content>
|
||||
<xul:hbox class="notification-inner" flex="1" xbl:inherits="type">
|
||||
<xul:hbox anonid="details" align="center" flex="1"
|
||||
oncommand="this.parentNode.parentNode._doButtonCommand(event);">
|
||||
<xul:image anonid="messageImage" class="messageImage" xbl:inherits="src=image,type,value"/>
|
||||
<xul:description anonid="messageText" class="messageText" flex="1" xbl:inherits="xbl:text=label"/>
|
||||
<xul:spacer flex="1"/>
|
||||
<children/>
|
||||
</xul:hbox>
|
||||
<xul:toolbarbutton ondblclick="event.stopPropagation();"
|
||||
class="messageCloseButton close-icon tabbable"
|
||||
xbl:inherits="hidden=hideclose"
|
||||
tooltiptext="&closeNotification.tooltip;"
|
||||
oncommand="document.getBindingParent(this).dismiss();"/>
|
||||
<xul:hbox anonid="details" align="center" flex="1"
|
||||
oncommand="this.parentNode._doButtonCommand(event);">
|
||||
<xul:image anonid="messageImage" class="messageImage" xbl:inherits="src=image,type,value"/>
|
||||
<xul:description anonid="messageText" class="messageText" flex="1" xbl:inherits="xbl:text=label"/>
|
||||
<xul:spacer flex="1"/>
|
||||
<children/>
|
||||
</xul:hbox>
|
||||
<xul:toolbarbutton ondblclick="event.stopPropagation();"
|
||||
class="messageCloseButton close-icon tabbable"
|
||||
anonid="close-button"
|
||||
xbl:inherits="hidden=hideclose"
|
||||
tooltiptext="&closeNotification.tooltip;"
|
||||
oncommand="document.getBindingParent(this).dismiss();"/>
|
||||
</content>
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/notification.css"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче