Backed out changeset 3742522c4533 (bug 1353831) for failing at least test_focus_autocomplete.xul in a11y suite on OSX 10.10 debug. r=backout

This commit is contained in:
Sebastian Hengst 2017-04-15 00:00:29 +02:00
Родитель a8cb87ea48
Коммит 1e3c7e2a9c
1 изменённых файлов: 9 добавлений и 6 удалений

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

@ -72,6 +72,8 @@
<constructor><![CDATA[ <constructor><![CDATA[
if (this.parentNode.parentNode.localName == "toolbarpaletteitem") if (this.parentNode.parentNode.localName == "toolbarpaletteitem")
return; return;
// Make sure we rebuild the popup in onpopupshowing
this._needToBuildPopup = true;
Services.obs.addObserver(this, "browser-search-engine-modified", false); Services.obs.addObserver(this, "browser-search-engine-modified", false);
@ -90,10 +92,6 @@
Components.utils.reportError("Cannot initialize search service, bailing out: " + aStatus); Components.utils.reportError("Cannot initialize search service, bailing out: " + aStatus);
} }
}).bind(this)); }).bind(this));
this.textbox.popup.oneOffButtons.telemetryOrigin = "searchbar";
this.textbox.popup.oneOffButtons.popup = this.textbox.popup;
this.textbox.popup.oneOffButtons.textbox = this.textbox;
]]></constructor> ]]></constructor>
<destructor><![CDATA[ <destructor><![CDATA[
@ -1064,7 +1062,7 @@
<handlers> <handlers>
<handler event="popupshowing"><![CDATA[ <handler event="popupshowing"><![CDATA[
if (!this._computedMinWidth) { if (!this.oneOffButtons.popup) {
// The panel width only spans to the textbox size, but we also want it // The panel width only spans to the textbox size, but we also want it
// to include the magnifier icon's width. // to include the magnifier icon's width.
let ltr = getComputedStyle(this).direction == "ltr"; let ltr = getComputedStyle(this).direction == "ltr";
@ -1078,7 +1076,12 @@
); );
this.style.minWidth = minWidth + "px"; this.style.minWidth = minWidth + "px";
this._computedMinWidth = true; // Set the origin before assigning the popup, as the assignment does
// a rebuild and would miss the origin.
this.oneOffButtons.telemetryOrigin = "searchbar";
// Set popup after setting the minWidth since it builds the buttons.
this.oneOffButtons.popup = this;
this.oneOffButtons.textbox = this.input;
} }
// First handle deciding if we are showing the reduced version of the // First handle deciding if we are showing the reduced version of the