Bug 1610227 - Remove page height hack from about:addons inline options r=rpl
authorMark Striemer <mstriemer@mozilla.com>
Thu, 23 Jan 2020 11:31:13 +0000
changeset 512505 6b3433e22d5fe6a5a559795679e2fa3989ba65f8
parent 512504 67ed349b3786987be2ce22770fa39e4e4fd4d4a5
child 512506 4e0a6c11be1bdd3f766991967e680ce6704b70d7
push id106433
push usermstriemer@mozilla.com
push dateTue, 04 Feb 2020 16:55:52 +0000
treeherderautoland@4e0a6c11be1b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrpl
bugs1610227
milestone74.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 1610227 - Remove page height hack from about:addons inline options r=rpl Depends on D60555 Differential Revision: https://phabricator.services.mozilla.com/D60558
toolkit/mozapps/extensions/content/aboutaddons.js
toolkit/mozapps/extensions/test/browser/browser_html_options_ui.js
--- a/toolkit/mozapps/extensions/content/aboutaddons.js
+++ b/toolkit/mozapps/extensions/content/aboutaddons.js
@@ -1931,18 +1931,17 @@ class InlineOptionsBrowser extends HTMLE
     }
 
     ExtensionParent.apiManager.emit("extension-browser-inserted", browser);
 
     await new Promise(resolve => {
       let messageListener = {
         receiveMessage({ name, data }) {
           if (name === "Extension:BrowserResized") {
-            // Add a pixel to work around a scrolling issue, bug 1548687.
-            browser.style.height = `${data.height + 1}px`;
+            browser.style.height = `${data.height}px`;
           } else if (name === "Extension:BrowserContentLoaded") {
             resolve();
           }
         },
       };
 
       let mm = browser.messageManager;
 
--- a/toolkit/mozapps/extensions/test/browser/browser_html_options_ui.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_html_options_ui.js
@@ -129,42 +129,38 @@ add_task(async function testInlineOption
   ok(
     card.querySelector('[action="preferences"]').hidden,
     "The preferences option is hidden now"
   );
 
   let waitForHeightChange = expectedHeight =>
     TestUtils.waitForCondition(() => browser.clientHeight === expectedHeight);
 
-  // The expected heights are 1px taller, to work around bug 1548687.
-  const EXPECTED_HEIGHT_SHORT = HEIGHT_SHORT + 1;
-  const EXPECTED_HEIGHT_TALL = HEIGHT_TALL + 1;
-
-  await waitForHeightChange(EXPECTED_HEIGHT_SHORT);
+  await waitForHeightChange(HEIGHT_SHORT);
 
   // Check resizing the browser through extension CSS.
   await extension.sendMessage("get-height");
   let height = await extension.awaitMessage("height");
-  is(height, EXPECTED_HEIGHT_SHORT, "The height is smaller to start");
+  is(height, HEIGHT_SHORT, "The height is smaller to start");
   is(height, browser.clientHeight, "The browser is the same size");
 
   info("Resize the browser to be taller");
   await extension.sendMessage("toggle-class");
-  await waitForHeightChange(EXPECTED_HEIGHT_TALL);
+  await waitForHeightChange(HEIGHT_TALL);
   await extension.sendMessage("get-height");
   height = await extension.awaitMessage("height");
-  is(height, EXPECTED_HEIGHT_TALL, "The height is bigger now");
+  is(height, HEIGHT_TALL, "The height is bigger now");
   is(height, browser.clientHeight, "The browser is the same size");
 
   info("Shrink the browser again");
   await extension.sendMessage("toggle-class");
-  await waitForHeightChange(EXPECTED_HEIGHT_SHORT);
+  await waitForHeightChange(HEIGHT_SHORT);
   await extension.sendMessage("get-height");
   height = await extension.awaitMessage("height");
-  is(height, EXPECTED_HEIGHT_SHORT, "The browser shrunk back");
+  is(height, HEIGHT_SHORT, "The browser shrunk back");
   is(height, browser.clientHeight, "The browser is the same size");
 
   info("Switching to details view");
   detailsBtn.click();
 
   info("Check the browser dimensions to make sure it's hidden");
   is(browser.clientWidth, 0, "The browser is hidden now");