Bug 1392143 - P3. Resize window after moving it. r=mattwoodrow
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 07 Sep 2017 17:49:05 +0200
changeset 379701 83c640edfe509971e39ad7d10d1b7994664d7bba
parent 379700 bdd70cdbf8f118e1001b2e534c213c17c1fe8240
child 379702 6714fb98a7f25b857dab3f276e5b85871e5792a0
push id32461
push userkwierso@gmail.com
push dateFri, 08 Sep 2017 20:15:32 +0000
treeherdermozilla-central@dd3736e98e4e [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]);