Bug 1392143 - P3. Resize window after moving it. r=mattwoodrow
☠☠ backed out by b206bbf564fb ☠ ☠
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 07 Sep 2017 17:49:05 +0200
changeset 429068 ff3a335e711188c57ca887f1b4c50edef96c53ca
parent 429067 b1627a3a5d7794782936464743993f335624b523
child 429069 5220b19f1fc08f94118d5a475659873e55cacb4d
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1392143
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1392143 - P3. Resize window after moving it. r=mattwoodrow This ensure that the window still has the intended size if it had been resized due to different DPI setup. MozReview-Commit-ID: 9oeXbTKQqhe
toolkit/components/gfx/SanityTest.js
--- a/toolkit/components/gfx/SanityTest.js
+++ b/toolkit/components/gfx/SanityTest.js
@@ -340,13 +340,16 @@ SanityTest.prototype = {
         "chrome://gfxsanity/content/sanityparent.html",
         "Test Page",
         "width=" + PAGE_WIDTH + ",height=" + PAGE_HEIGHT + ",chrome,titlebar=0,scrollbars=0",
         null);
 
     // There's no clean way to have an invisible window and ensure it's always painted.
     // Instead, move the window far offscreen so it doesn't show up during launch.
     sanityTest.moveTo(100000000, 1000000000);
+    // In multi-screens with different dpi setup, the window may have been
+    // incorrectly resized.
+    sanityTest.resizeTo(PAGE_WIDTH, PAGE_HEIGHT);
     tester.scheduleTest(sanityTest);
   },
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SanityTest]);