mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 904616 - Ensure that sizes for preload browsers are applied correctly; r=jaws
This commit is contained in:
parent
1fe519eef8
commit
42ba28509a
@ -343,13 +343,9 @@ HiddenBrowser.prototype = {
|
||||
},
|
||||
|
||||
resize: function (width, height) {
|
||||
if (this._browser) {
|
||||
this._browser.style.width = width + "px";
|
||||
this._browser.style.height = height + "px";
|
||||
} else {
|
||||
this._width = width;
|
||||
this._height = height;
|
||||
}
|
||||
this._width = width;
|
||||
this._height = height;
|
||||
this._applySize();
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
@ -357,12 +353,20 @@ HiddenBrowser.prototype = {
|
||||
this._timer = clearTimer(this._timer);
|
||||
},
|
||||
|
||||
_applySize: function () {
|
||||
if (this._browser) {
|
||||
this._browser.style.width = this._width + "px";
|
||||
this._browser.style.height = this._height + "px";
|
||||
}
|
||||
},
|
||||
|
||||
_createBrowser: function () {
|
||||
HostFrame.get().then(aFrame => {
|
||||
let doc = aFrame.document;
|
||||
this._browser = doc.createElementNS(XUL_NS, "browser");
|
||||
this._browser.setAttribute("type", "content");
|
||||
this._browser.setAttribute("src", NEWTAB_URL);
|
||||
this._applySize();
|
||||
doc.getElementById("win").appendChild(this._browser);
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user