Bug 1796735 - Don't use width/height attributes for panel sizing. r=dao

While these work now because I haven't ported popups to modern flexbox,
let's remove usage of these attributes so I don't have to later. This
doesn't change behavior.

Depends on D159934

Differential Revision: https://phabricator.services.mozilla.com/D159935
This commit is contained in:
Emilio Cobos Álvarez
2022-10-21 13:01:51 +00:00
parent 2e69aa4ac1
commit 5d9735877d

View File

@@ -960,8 +960,8 @@ var PanelMultiView = class extends AssociatedToNode {
this._viewContainer.style.width = prevPanelView.knownWidth + "px";
// Lock the dimensions of the window that hosts the popup panel.
let rect = this._panel.getOuterScreenRect();
this._panel.setAttribute("width", rect.width);
this._panel.setAttribute("height", rect.height);
this._panel.style.width = rect.width + "px";
this._panel.style.height = rect.height + "px";
let viewRect;
if (reverse) {
@@ -1052,8 +1052,8 @@ var PanelMultiView = class extends AssociatedToNode {
// kicks of the height animation.
this._viewContainer.style.height = viewRect.height + "px";
this._viewContainer.style.width = viewRect.width + "px";
this._panel.removeAttribute("width");
this._panel.removeAttribute("height");
this._panel.style.removeProperty("width");
this._panel.style.removeProperty("height");
// We're setting the width property to prevent flickering during the
// sliding animation with smaller views.
viewNode.style.width = viewRect.width + "px";