Bug 1539311 - Fix incorrect parameter in the Windows Taskbar Previews code. r=Standard8 a=pascalc
authorFelipe Gomes <felipc@gmail.com>
Wed, 27 Mar 2019 10:26:53 +0000
changeset 522815 98acf3216e5a3445f7da68960fa51a1f53e65163
parent 522814 3b2fad2fe236ef5607b2dba3cb5fb360b1197af1
child 522816 d7c011c3dd7f589362c64829a28f7f42991937c5
push id10955
push usernerli@mozilla.com
push dateSat, 30 Mar 2019 16:10:00 +0000
treeherdermozilla-beta@381133904780 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8, pascalc
bugs1539311
milestone67.0
Bug 1539311 - Fix incorrect parameter in the Windows Taskbar Previews code. r=Standard8 a=pascalc Differential Revision: https://phabricator.services.mozilla.com/D25013
browser/modules/WindowsPreviewPerTab.jsm
toolkit/components/thumbnails/PageThumbs.jsm
--- a/browser/modules/WindowsPreviewPerTab.jsm
+++ b/browser/modules/WindowsPreviewPerTab.jsm
@@ -143,17 +143,17 @@ function PreviewController(win, tab) {
   this.win = win;
   this.tab = tab;
   this.linkedBrowser = tab.linkedBrowser;
   this.preview = this.win.createTabPreview(this);
 
   this.tab.addEventListener("TabAttrModified", this);
 
   XPCOMUtils.defineLazyGetter(this, "canvasPreview", function() {
-    let canvas = PageThumbs.createCanvas(this.win);
+    let canvas = PageThumbs.createCanvas(this.win.win);
     canvas.mozOpaque = true;
     return canvas;
   });
 }
 
 PreviewController.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.nsITaskbarPreviewController]),
 
@@ -265,17 +265,17 @@ PreviewController.prototype = {
    */
   requestPreview(aTaskbarCallback) {
     // Grab a high res content preview
     this.resetCanvasPreview();
     this.updateCanvasPreview(true, (aPreviewCanvas) => {
       let winWidth = this.win.width;
       let winHeight = this.win.height;
 
-      let composite = PageThumbs.createCanvas(this.win);
+      let composite = PageThumbs.createCanvas(this.win.win);
 
       // Use transparency, Aero glass is drawn black without it.
       composite.mozOpaque = false;
 
       let ctx = composite.getContext("2d");
       let scale = this.screenPixelsPerCSSPixel / this.zoom;
 
       composite.width = winWidth * scale;
--- a/toolkit/components/thumbnails/PageThumbs.jsm
+++ b/toolkit/components/thumbnails/PageThumbs.jsm
@@ -256,17 +256,17 @@ var PageThumbs = {
         aCanvas.getContext("2d").putImageData(imgData, 0, 0);
         if (aCallback) {
           aCallback(aCanvas);
         }
       })();
       return;
     }
     // The content is a local page, grab a thumbnail sync.
-    PageThumbUtils.createSnapshotThumbnail(aBrowser.ownerGlobal,
+    PageThumbUtils.createSnapshotThumbnail(aBrowser.contentWindow,
                                            aCanvas,
                                            aArgs);
 
     if (aCallback) {
       aCallback(aCanvas);
     }
   },