зеркало из https://github.com/mozilla/gecko-dev.git
Size the autocomplete popup relative to the page's full zoom b=407912 r=ajschult
This commit is contained in:
Родитель
25476e7c51
Коммит
8d3401fe9b
|
@ -1579,12 +1579,22 @@
|
|||
this.input = aInput;
|
||||
this.invalidate();
|
||||
|
||||
var viewer = aElement
|
||||
.ownerDocument
|
||||
.defaultView
|
||||
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIWebNavigation)
|
||||
.QueryInterface(Components.interfaces.nsIDocShell)
|
||||
.contentViewer
|
||||
.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
|
||||
var rect = aElement.getBoundingClientRect();
|
||||
var width = rect.right - rect.left;
|
||||
var width = Math.round((rect.right - rect.left) * viewer.fullZoom);
|
||||
this.setAttribute("width", width > 100 ? width : 100);
|
||||
const nsIPopupBoxObject = Components.interfaces.nsIPopupBoxObject;
|
||||
this.popupBoxObject.setConsumeRollupEvent(aInput.consumeRollupEvent
|
||||
? nsIPopupBoxObject.ROLLUP_CONSUME
|
||||
: nsIPopupBoxObject.ROLLUP_NO_CONSUME);
|
||||
this.openPopup(aElement, "after_start", 0, 0, false, false);
|
||||
|
||||
this.popupBoxObject.setConsumeRollupEvent(aInput.consumeRollupEvent);
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
|
Загрузка…
Ссылка в новой задаче