Package: firefox Version: 61.0-1 Severity: wishlist Tags: patch Control: forwarded -1 https://bugzilla.mozilla.org/1408446
This patch works with Firefox 61. It is essentially the same as the one for Firefox 60 in upstream report.
Index: firefox-61.0/browser/components/extensions/parent/ext-windows.js =================================================================== --- firefox-61.0.orig/browser/components/extensions/parent/ext-windows.js +++ firefox-61.0/browser/components/extensions/parent/ext-windows.js @@ -225,6 +225,10 @@ this.windows = class extends ExtensionAP if (createData.titlePreface !== null) { win.setTitlePreface(createData.titlePreface); } + // Do a dummy resize (bug 1408446) + window.addEventListener("DOMContentLoaded", () => { + window.resizeTo(window.outerWidth, window.outerHeight); + }); return win.convert({populate: true}); }); }, Index: firefox-61.0/widget/gtk/nsWindow.cpp =================================================================== --- firefox-61.0.orig/widget/gtk/nsWindow.cpp +++ firefox-61.0/widget/gtk/nsWindow.cpp @@ -1112,6 +1112,22 @@ nsWindow::Show(bool aState) NativeShow(aState); } +// Add-ons may open windows that do not display their contents (bug 1408446), so +// invalidate the related layer when doing a repaint +static void +InvalidateFirstChildLayer(LayerManager* manager) +{ + Layer* root = manager->GetRoot(); + if (root) { + Layer* layer = root->GetFirstChild(); + if (layer) { + PaintedLayer *pLayer = layer->AsPaintedLayer(); + if (pLayer) + pLayer->InvalidateWholeLayer(); + } + } +} + void nsWindow::Resize(double aWidth, double aHeight, bool aRepaint) { @@ -1131,6 +1147,9 @@ nsWindow::Resize(double aWidth, double a NativeResize(); + if (aRepaint) + InvalidateFirstChildLayer(GetLayerManager()); + NotifyRollupGeometryChange(); // send a resize notification if this is a toplevel @@ -1159,6 +1178,9 @@ nsWindow::Resize(double aX, double aY, d NativeMoveResize(); + if (aRepaint) + InvalidateFirstChildLayer(GetLayerManager()); + NotifyRollupGeometryChange(); if (mIsTopLevel || mListenForResizes) {
smime.p7s
Description: S/MIME cryptographic signature