Bug 1569705 - Stop unnecessarily setting left/right margins on searchbar autocomplete popup. r=mak

This code now became obsolete and broken with the autocomplete popup being anchored to the textbox instead of the textbox inner input.

Differential Revision: https://phabricator.services.mozilla.com/D39794

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tim Nguyen 2019-07-30 14:24:20 +00:00
Родитель c535aefa0b
Коммит ed7ec67e33
1 изменённых файлов: 0 добавлений и 9 удалений

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

@ -19,9 +19,6 @@
// the width of the textfield.
let DOMUtils = window.windowUtils;
let textboxRect = DOMUtils.getBoundsWithoutFlushing(this.mInput);
let inputRect = DOMUtils.getBoundsWithoutFlushing(
this.mInput.inputField
);
// Ensure the panel is wide enough to fit at least 3 engines.
let minWidth = Math.max(
@ -29,12 +26,6 @@
this.oneOffButtons.buttonWidth * 3
);
this.style.minWidth = Math.round(minWidth) + "px";
// Alignment of the panel with the searchbar is obtained with negative
// margins.
this.style.marginLeft = textboxRect.left - inputRect.left + "px";
// This second margin is needed when the direction is reversed,
// eg. when using command+shift+X.
this.style.marginRight = inputRect.right - textboxRect.right + "px";
// First handle deciding if we are showing the reduced version of the
// popup containing only the preferences button. We do this if the