mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 522043: Text in nsPromptService authentication dialog is pannable [r=fabrice.desre]
This commit is contained in:
parent
d48c6d644f
commit
2e0c7d08df
@ -65,11 +65,16 @@ promptService.prototype = {
|
||||
// size the height of the scrollable message. this assumes the given element
|
||||
// is a child of a scrollbox
|
||||
sizeScrollableMsg: function(id, percent) {
|
||||
let screenH = this.getDocument().getElementById("main-window").getBoundingClientRect().height;
|
||||
let doc = this.getDocument();
|
||||
let screenH = doc.getElementById("main-window").getBoundingClientRect().height;
|
||||
let maxHeight = screenH * percent / 100;
|
||||
|
||||
let elem = this.getDocument().getElementById(id);
|
||||
let height = elem.getBoundingClientRect().height;
|
||||
let elem = doc.getElementById(id);
|
||||
let style = doc.defaultView.getComputedStyle(elem, null);
|
||||
let height = Math.ceil(elem.getBoundingClientRect().height) +
|
||||
parseInt(style.marginTop) +
|
||||
parseInt(style.marginBottom);
|
||||
|
||||
if (height > maxHeight)
|
||||
height = maxHeight;
|
||||
elem.parentNode.style.height = height + "px";
|
||||
|
Loading…
Reference in New Issue
Block a user