mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 42269ccaf982 (bug 1107695) for bc1 orange
This commit is contained in:
parent
8a8eb85e80
commit
da9cbeca9c
@ -1010,7 +1010,6 @@
|
||||
</xul:hbox>
|
||||
</xul:deck>
|
||||
<xul:description anonid="search-panel-one-offs"
|
||||
role="group"
|
||||
class="search-panel-one-offs"/>
|
||||
<xul:vbox anonid="add-engines"/>
|
||||
<xul:button anonid="search-settings"
|
||||
@ -1024,18 +1023,6 @@
|
||||
false after the mousedown event has been triggered to detect what
|
||||
caused rollup. -->
|
||||
<field name="_isHiding">false</field>
|
||||
<field name="_bundle">null</field>
|
||||
<property name="bundle" readonly="true">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
if (!this._bundle) {
|
||||
const kBundleURI = "chrome://browser/locale/search.properties";
|
||||
this._bundle = Services.strings.createBundle(kBundleURI);
|
||||
}
|
||||
return this._bundle;
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<method name="updateHeader">
|
||||
<body><![CDATA[
|
||||
@ -1051,8 +1038,10 @@
|
||||
this.removeAttribute("src");
|
||||
}
|
||||
|
||||
let headerText = this.bundle.formatStringFromName("searchHeader",
|
||||
[currentEngine.name], 1);
|
||||
const kBundleURI = "chrome://browser/locale/search.properties";
|
||||
let bundle = Services.strings.createBundle(kBundleURI);
|
||||
let headerText = bundle.formatStringFromName("searchHeader",
|
||||
[currentEngine.name], 1);
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "searchbar-engine-name")
|
||||
.setAttribute("value", headerText);
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "searchbar-engine")
|
||||
@ -1097,28 +1086,17 @@
|
||||
let headerPanel =
|
||||
document.getAnonymousElementByAttribute(this, "anonid",
|
||||
"search-panel-one-offs-header");
|
||||
let list = document.getAnonymousElementByAttribute(this, "anonid",
|
||||
"search-panel-one-offs");
|
||||
let textbox = searchbar.textbox;
|
||||
let self = this;
|
||||
let inputHandler = function() {
|
||||
headerSearchText.setAttribute("value", textbox.value);
|
||||
let groupText;
|
||||
if (textbox.value) {
|
||||
self.removeAttribute("showonlysettings");
|
||||
groupText = headerSearchText.previousSibling.value +
|
||||
'"' + headerSearchText.value + '"' +
|
||||
headerSearchText.nextSibling.value;
|
||||
headerPanel.selectedIndex = 1;
|
||||
}
|
||||
else {
|
||||
let noSearchHeader =
|
||||
document.getAnonymousElementByAttribute(this, "anonid",
|
||||
"searchbar-oneoffheader-search");
|
||||
groupText = noSearchHeader.value;
|
||||
headerPanel.selectedIndex = 0;
|
||||
}
|
||||
list.setAttribute("aria-label", groupText);
|
||||
};
|
||||
textbox.addEventListener("input", inputHandler);
|
||||
this.addEventListener("popuphiding", function hiding() {
|
||||
@ -1140,11 +1118,12 @@
|
||||
|
||||
let addEngines = gBrowser.selectedBrowser.engines;
|
||||
if (addEngines && addEngines.length > 0) {
|
||||
const kBundleURI = "chrome://browser/locale/search.properties";
|
||||
let bundle = Services.strings.createBundle(kBundleURI);
|
||||
for (let engine of addEngines) {
|
||||
let button = document.createElementNS(kXULNS, "button");
|
||||
let label = this.bundle.formatStringFromName("cmd_addFoundEngine",
|
||||
[engine.title], 1);
|
||||
button.id = "searchbar-add-engine-" + engine.title.replace(/ /g, '-');
|
||||
let label = bundle.formatStringFromName("cmd_addFoundEngine",
|
||||
[engine.title], 1);
|
||||
button.setAttribute("class", "addengine-item");
|
||||
button.setAttribute("label", label);
|
||||
button.setAttribute("pack", "start");
|
||||
@ -1162,6 +1141,8 @@
|
||||
}
|
||||
|
||||
// Finally, build the list of one-off buttons.
|
||||
let list = document.getAnonymousElementByAttribute(this, "anonid",
|
||||
"search-panel-one-offs")
|
||||
while (list.firstChild)
|
||||
list.firstChild.remove();
|
||||
|
||||
@ -1220,15 +1201,11 @@
|
||||
let height = rowCount * 33; // 32px per row, 1px border.
|
||||
list.setAttribute("height", height + "px");
|
||||
|
||||
// Ensure we can refer to the settings button by ID:
|
||||
let settingsEl = document.getAnonymousElementByAttribute(this, "anonid", "search-settings");
|
||||
settingsEl.id = this.id + "-anon-search-settings";
|
||||
|
||||
let dummyItems = enginesPerRow - (engines.length % enginesPerRow || enginesPerRow);
|
||||
for (let i = 0; i < engines.length; ++i) {
|
||||
let engine = engines[i];
|
||||
let button = document.createElementNS(kXULNS, "button");
|
||||
button.id = "searchbar-engine-one-off-item-" + engine.name.replace(/ /g, '-');
|
||||
button.setAttribute("label", engine.name);
|
||||
let uri = "chrome://browser/skin/search-engine-placeholder.png";
|
||||
if (engine.iconURI) {
|
||||
uri = PlacesUtils.getImageURLForResolution(window, engine.iconURI.spec);
|
||||
|
@ -826,8 +826,6 @@
|
||||
element = document.createElementNS(kXULNS, "menuseparator");
|
||||
cxmenu.appendChild(element);
|
||||
|
||||
this.setAttribute("aria-owns", this.popup.id);
|
||||
|
||||
var insertLocation = cxmenu.firstChild;
|
||||
while (insertLocation.nextSibling &&
|
||||
insertLocation.getAttribute("cmd") != "cmd_paste")
|
||||
@ -1021,11 +1019,9 @@
|
||||
if (val && !val.classList.contains("dummy")) {
|
||||
val.setAttribute("selected", "true");
|
||||
this._selectedButton = val;
|
||||
this.setAttribute("aria-activedescendant", val.id);
|
||||
return;
|
||||
}
|
||||
|
||||
this.removeAttribute("aria-activedescendant");
|
||||
this._selectedButton = null;
|
||||
]]></setter>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user