Backed out changeset b323faf96458 (bug 658467) for a11y failures a=backout

This commit is contained in:
Wes Kocher 2016-11-23 15:37:55 -08:00
Родитель 5f138b9942
Коммит bcd6c8fa34
5 изменённых файлов: 26 добавлений и 42 удалений

Просмотреть файл

@ -39,24 +39,12 @@
display: -moz-box;
}
.tab-label {
white-space: nowrap;
}
.tab-label-container {
overflow: hidden;
}
.tab-label-container[pinned] {
.tab-label[pinned] {
width: 0;
}
.tab-label-container[textoverflow]:not([pinned]) {
mask-image: linear-gradient(to left, transparent, black 1em);
}
.tab-label-container[textoverflow]:not([pinned]):-moz-locale-dir(rtl) {
mask-image: linear-gradient(to right, transparent, black 1em);
margin-left: 0 !important;
margin-right: 0 !important;
padding-left: 0 !important;
padding-right: 0 !important;
}
.tab-stack {

Просмотреть файл

@ -1438,7 +1438,8 @@
<body>
<![CDATA[
aTab.label = this.mStringBundle.getString("tabs.connecting");
this._tabAttrModified(aTab, ["label"]);
aTab.crop = "end";
this._tabAttrModified(aTab, ["label", "crop"]);
]]>
</body>
</method>
@ -1448,6 +1449,7 @@
<body>
<![CDATA[
var browser = this.getBrowserForTab(aTab);
var crop = "end";
var title = browser.contentTitle;
if (!title) {
@ -1469,6 +1471,9 @@
.getService(Components.interfaces.nsITextToSubURI);
title = textToSubURI.unEscapeNonAsciiURI(characterSet, title);
} catch (ex) { /* Do nothing. */ }
crop = "center";
} else if (aTab.hasAttribute("customizemode")) {
let brandBundle = document.getElementById("bundle_brand");
let brandShortName = brandBundle.getString("brandShortName");
@ -1478,11 +1483,13 @@
title = this.mStringBundle.getString("tabs.emptyTabTitle");
}
if (aTab.label == title)
if (aTab.label == title &&
aTab.crop == crop)
return false;
aTab.label = title;
this._tabAttrModified(aTab, ["label"]);
aTab.crop = crop;
this._tabAttrModified(aTab, ["label", "crop"]);
if (aTab.selected)
this.updateTitlebar();
@ -2169,6 +2176,7 @@
ContextualIdentityService.setTabStyle(t);
}
t.setAttribute("crop", "end");
t.setAttribute("onerror", "this.removeAttribute('image');");
t.className = "tabbrowser-tab";
@ -5243,9 +5251,6 @@
<handlers>
<handler event="underflow" phase="capturing"><![CDATA[
if (event.target != this)
return;
if (event.detail == 0)
return; // Ignore vertical events
@ -5261,9 +5266,6 @@
tabs._positionPinnedTabs();
]]></handler>
<handler event="overflow"><![CDATA[
if (event.target != this)
return;
if (event.detail == 0)
return; // Ignore vertical events
@ -5317,6 +5319,7 @@
var tab = this.firstChild;
tab.label = this.tabbrowser.mStringBundle.getString("tabs.emptyTabTitle");
tab.setAttribute("crop", "end");
tab.setAttribute("onerror", "this.removeAttribute('image');");
window.addEventListener("resize", this, false);
@ -6690,15 +6693,10 @@
anonid="overlay-icon"
class="tab-icon-overlay"
role="presentation"/>
<xul:hbox class="tab-label-container"
xbl:inherits="pinned,selected=visuallyselected"
onoverflow="this.setAttribute('textoverflow', 'true');"
onunderflow="this.removeAttribute('textoverflow');"
flex="1">
<xul:label class="tab-text tab-label"
xbl:inherits="xbl:text=label,accesskey,fadein,pinned,selected=visuallyselected,attention"
role="presentation"/>
</xul:hbox>
<xul:label flex="1"
xbl:inherits="value=label,crop,accesskey,fadein,pinned,selected=visuallyselected,attention"
class="tab-text tab-label"
role="presentation"/>
<xul:image xbl:inherits="soundplaying,soundplaying-scheduledremoval,pinned,muted,blocked,selected=visuallyselected"
anonid="soundplaying-icon"
class="tab-icon-sound"
@ -7077,7 +7075,7 @@
<parameter name="aTab"/>
<body><![CDATA[
aMenuitem.setAttribute("label", aTab.label);
aMenuitem.setAttribute("crop", "end");
aMenuitem.setAttribute("crop", aTab.getAttribute("crop"));
if (aTab.hasAttribute("busy")) {
aMenuitem.setAttribute("busy", aTab.getAttribute("busy"));

Просмотреть файл

@ -37,8 +37,7 @@ function doTest() {
}
function runOverflowTests(aEvent) {
if (aEvent.detail != 1 ||
aEvent.target != tabstrip)
if (aEvent.detail != 1)
return;
tabstrip.removeEventListener("overflow", runOverflowTests, false);

Просмотреть файл

@ -2465,7 +2465,6 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
.tab-label {
margin-top: 1px;
margin-bottom: 0;
-moz-box-flex: 1;
text-align: center;
}
@ -2565,7 +2564,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
opacity: 0.9999;
}
.tab-label-container:not([selected="true"]) {
.tab-label:not([selected="true"]) {
opacity: .7;
}
@ -2591,7 +2590,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
border-width: 0 11px;
}
.tabbrowser-tab:focus > .tab-stack > .tab-content > .tab-label-container:not([pinned]),
.tabbrowser-tab:focus > .tab-stack > .tab-content > .tab-label:not([pinned]),
.tabbrowser-tab:focus > .tab-stack > .tab-content > .tab-icon-image[pinned],
.tabbrowser-tab:focus > .tab-stack > .tab-content > .tab-throbber[pinned] {
box-shadow: @focusRingShadow@;

Просмотреть файл

@ -191,7 +191,7 @@
}
.tab-close-button {
margin-inline-start: 2px;
margin-inline-start: 4px;
margin-inline-end: -2px;
padding: 0;
}