Bug 1795944 - Remove descriptionheightworkaround. r=Gijs
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 19 Oct 2022 11:55:29 +0000 (2022-10-19)
changeset 638316 16fd9fff367fd789909bc0c68b5b515a41d252b0
parent 638315 d95a8118fcb329bf202ba7715bccc691586d7b22
child 638317 93c12047fd86bd6f942e2a5f05b21f7f930678ae
push id40332
push usernfay@mozilla.com
push dateWed, 19 Oct 2022 21:16:15 +0000 (2022-10-19)
treeherdermozilla-central@a1297d435b3f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1795944
milestone108.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 1795944 - Remove descriptionheightworkaround. r=Gijs Stuff wraps properly now with flexbox emulation. Differential Revision: https://phabricator.services.mozilla.com/D159621
browser/base/content/appmenu-viewcache.inc.xhtml
browser/base/content/browser-sitePermissionPanel.js
browser/base/content/browser-siteProtections.js
browser/base/content/browser-sync.js
browser/components/controlcenter/content/identityPanel.inc.xhtml
browser/components/controlcenter/content/permissionPanel.inc.xhtml
browser/components/controlcenter/content/protectionsPanel.inc.xhtml
browser/components/customizableui/PanelMultiView.jsm
browser/components/downloads/content/downloadsPanel.inc.xhtml
devtools/client/performance-new/popup/panel.jsm.js
--- a/browser/base/content/appmenu-viewcache.inc.xhtml
+++ b/browser/base/content/appmenu-viewcache.inc.xhtml
@@ -1,28 +1,26 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 <html:template id="appMenu-viewCache">
-  <panelview id="appMenu-mainView" class="PanelUI-subView"
-             descriptionheightworkaround="true">
+  <panelview id="appMenu-mainView" class="PanelUI-subView">
     <vbox class="panel-subview-body">
       <toolbarbutton id="appMenu-whatsnew-button"
                      class="subviewbutton subviewbutton-iconic subviewbutton-nav"
                      hidden="true"
                      closemenu="none"
                      oncommand="PanelUI.showSubView('PanelUI-whatsNew', this)"/>
     </vbox>
   </panelview>
 
   <!-- This is a placeholder app menu which should be replaced with the "real"
        Proton app menu before the Proton pref starts getting enabled. -->
   <panelview id="appMenu-protonMainView" class="PanelUI-subView"
-             descriptionheightworkaround="true"
              lockpanelvertical="true">
     <vbox class="panel-subview-body">
       <vbox id="appMenu-proton-addon-banners"/>
       <toolbarbutton id="appMenu-proton-update-banner" class="panel-banner-item subviewbutton"
                      oncommand="PanelUI._onBannerItemSelected(event)"
                      wrap="true"
                      hidden="true"/>
       <toolbaritem id="appMenu-fxa-status2"
@@ -243,17 +241,17 @@
     <toolbarseparator/>
     <toolbarbutton id="panelMenu_showAllBookmarks"
                    data-l10n-id="bookmarks-manage-bookmarks"
                    class="subviewbutton panel-subview-footer-button"
                    command="Browser:ShowAllBookmarks"
                    />
   </panelview>
 
-  <panelview id="PanelUI-profiler" flex="1" descriptionheightworkaround="true">
+  <panelview id="PanelUI-profiler" flex="1">
     <vbox id="PanelUI-profiler-container">
       <vbox id="PanelUI-profiler-header" animationready="false">
         <hbox id="PanelUI-profiler-header-bar">
           <label flex="1" data-l10n-id="profiler-popup-title" />
           <vbox class="PanelUI-profiler-toolbarbutton-container">
             <toolbarbutton id="PanelUI-profiler-info-button"
                           class="panel-info-button"
                           closemenu="none"
@@ -340,18 +338,17 @@
             <label data-l10n-id="profiler-popup-capture-shortcut"
                    class="PanelUI-profiler-shortcut" />
           </vbox>
         </hbox>
       </vbox>
     </vbox>
   </panelview>
 
-  <panelview id="PanelUI-panicView" flex="1"
-             descriptionheightworkaround="true">
+  <panelview id="PanelUI-panicView" flex="1">
     <vbox class="panel-subview-body">
       <hbox id="PanelUI-panic-timeframe">
         <image id="PanelUI-panic-timeframe-icon" alt=""/>
         <vbox flex="1">
           <description data-l10n-id="panic-main-timeframe-desc" id="PanelUI-panic-mainDesc"></description>
           <radiogroup id="PanelUI-panic-timeSpan" aria-labelledby="PanelUI-panic-mainDesc" closemenu="none">
             <radio id="PanelUI-panic-5min" data-l10n-id="panic-button-5min" selected="true"
                   value="5" class="subviewradio"/>
@@ -407,18 +404,17 @@
              flex="1" class="PanelUI-subView"
              remote="true"
              neverhidden="true"
              closemenu="none">
     <vbox class="PanelUI-savetopocket-container">
     </vbox>
   </panelview>
 
-  <panelview id="PanelUI-remotetabs" flex="1" class="PanelUI-subView"
-             descriptionheightworkaround="true">
+  <panelview id="PanelUI-remotetabs" flex="1" class="PanelUI-subView">
     <vbox class="panel-subview-body">
       <!-- this widget has 3 boxes in the body, but only 1 is ever visible -->
       <!-- When Sync is ready to sync -->
       <vbox id="PanelUI-remotetabs-main" hidden="true">
         <vbox id="PanelUI-remotetabs-buttons">
           <toolbarbutton id="PanelUI-remotetabs-syncnow"
                          align="center"
                          class="subviewbutton"
@@ -536,17 +532,17 @@
                          id="PanelUI-remotetabs-unverified-button"
                          data-l10n-id="appmenu-remote-tabs-opensettings"
                          oncommand="gSync.openPrefs('synced-tabs');"/>
         </vbox>
       </hbox>
     </vbox>
   </panelview>
 
-  <panelview id="PanelUI-fxa" class="PanelUI-subView" descriptionheightworkaround="true">
+  <panelview id="PanelUI-fxa" class="PanelUI-subView">
     <vbox id="PanelUI-fxa-menu" class="panel-subview-body">
       <toolbarbutton id="fxa-manage-account-button"
                      align="center"
                      class="subviewbutton"
                      oncommand="gSync.clickFxAMenuHeaderButton(this);">
         <vbox flex="1">
           <label id="fxa-menu-header-title"
                  crop="end"
--- a/browser/base/content/browser-sitePermissionPanel.js
+++ b/browser/base/content/browser-sitePermissionPanel.js
@@ -533,20 +533,16 @@ var gPermissionPanel = {
         id: "popup",
         state: SitePermissions.getDefault("popup"),
         scope: SitePermissions.SCOPE_PERSISTENT,
       };
       let item = this._createPermissionItem({ permission });
       this._defaultPermissionAnchor.appendChild(item);
       this._createBlockedPopupIndicator(totalBlockedPopups);
     }
-
-    PanelView.forNode(
-      this._permissionPopupMainView
-    ).descriptionHeightWorkaround();
   },
 
   /**
    * Creates a permission item based on the supplied options and returns it.
    * It is up to the caller to actually insert the element somewhere.
    *
    * @param permission - An object containing information representing the
    *                     permission, typically obtained via SitePermissions.jsm
@@ -802,19 +798,16 @@ var gPermissionPanel = {
       }
       SitePermissions.removeFromPrincipal(
         gBrowser.contentPrincipal,
         permission.id,
         browser
       );
 
       this._permissionReloadHint.hidden = false;
-      PanelView.forNode(
-        this._permissionPopupMainView
-      ).descriptionHeightWorkaround();
 
       if (idNoSuffix === "geo") {
         gBrowser.updateBrowserSharing(browser, { geo: false });
       } else if (idNoSuffix === "xr") {
         gBrowser.updateBrowserSharing(browser, { xr: false });
       }
 
       clearCallback();
--- a/browser/base/content/browser-siteProtections.js
+++ b/browser/base/content/browser-siteProtections.js
@@ -1616,17 +1616,17 @@ var gProtectionsHandler = {
       gBrowser.selectedBrowser.getContentBlockingEvents()
     );
   },
 
   /**
    * Update the in-panel UI given a blocking event. Called when the popup
    * is being shown, or when the popup is open while a new event comes in.
    */
-  updatePanelForBlockingEvent(event, isShown) {
+  updatePanelForBlockingEvent(event) {
     // Update the categories:
     for (let blocker of Object.values(this.blockers)) {
       if (blocker.categoryItem.hasAttribute("uidisabled")) {
         continue;
       }
       blocker.categoryItem.classList.toggle(
         "notFound",
         !blocker.isDetected(event)
@@ -1638,26 +1638,16 @@ var gProtectionsHandler = {
     this._protectionsPopup.toggleAttribute("blocking", this.anyBlocking);
     this._protectionsPopup.toggleAttribute("hasException", this.hasException);
 
     this.noTrackersDetectedDescription.hidden = this.anyDetected;
 
     if (this.anyDetected) {
       // Reorder categories if any are in use.
       this.reorderCategoryItems();
-
-      if (isShown) {
-        // Until we encounter a site that triggers them, category elements might
-        // be invisible when descriptionHeightWorkaround gets called, i.e. they
-        // are omitted from the workaround and the content overflows the panel.
-        // Solution: call it manually here.
-        PanelMultiView.forNode(
-          this._protectionsPopupMainView
-        ).descriptionHeightWorkaround();
-      }
     }
   },
 
   reportBlockingEventTelemetry(event, isSimulated, previousState) {
     if (!isSimulated) {
       if (this.hasException && !this.hadShieldState) {
         this.hadShieldState = true;
         this.shieldHistogramAdd(1);
@@ -1751,17 +1741,17 @@ var gProtectionsHandler = {
       this.showNoTrackerTooltipForTPIcon();
     }
 
     // Update the panel if it's open.
     let isPanelOpen = ["showing", "open"].includes(
       this._protectionsPopup?.state
     );
     if (isPanelOpen) {
-      this.updatePanelForBlockingEvent(event, true);
+      this.updatePanelForBlockingEvent(event);
     }
 
     // Notify other consumers, like CFR.
     // Don't send a content blocking event to CFR for
     // tab switches since this will already be done via
     // onStateChange.
     if (!isSimulated) {
       this.notifyContentBlockingEvent(event);
--- a/browser/base/content/browser-sync.js
+++ b/browser/base/content/browser-sync.js
@@ -169,19 +169,16 @@ this.SyncedTabsPanelList = class SyncedT
               paginationInfo.maxTabs
             );
           } else {
             this._appendSyncClient(client, container, labelId);
           }
           fragment.appendChild(container);
         }
         this.tabsList.appendChild(fragment);
-        PanelView.forNode(
-          this.tabsList.closest("panelview")
-        ).descriptionHeightWorkaround();
       })
       .catch(err => {
         Cu.reportError(err);
       })
       .then(() => {
         // an observer for tests.
         Services.obs.notifyObservers(
           null,
--- a/browser/components/controlcenter/content/identityPanel.inc.xhtml
+++ b/browser/components/controlcenter/content/identityPanel.inc.xhtml
@@ -10,19 +10,17 @@
        noautofocus="true"
        aria-labelledby="identity-popup-mainView-panel-header-span"
        onpopupshown="gIdentityHandler.onPopupShown(event);"
        onpopuphidden="gIdentityHandler.onPopupHidden(event);"
        orient="vertical">
 
   <panelmultiview id="identity-popup-multiView"
                   mainViewId="identity-popup-mainView">
-    <panelview id="identity-popup-mainView"
-               role="document"
-               descriptionheightworkaround="true">
+    <panelview id="identity-popup-mainView" role="document">
       <vbox id="identity-popup-mainView-panel-header">
         <label>
           <html:span id="identity-popup-mainView-panel-header-span" role="heading" aria-level="1"/>
         </label>
       </vbox>
       <toolbarseparator></toolbarseparator>
 
       <toolbarbutton id="identity-popup-security-button"
@@ -100,18 +98,17 @@
                 data-l10n-id="identity-clear-site-data"
                 class="subviewbutton panel-subview-footer-button"
                 oncommand="gIdentityHandler.clearSiteData(event);"/>
       </vbox>
     </panelview>
 
     <!-- Security SubView -->
     <panelview id="identity-popup-securityView"
-               role="document"
-               descriptionheightworkaround="true">
+               role="document">
       <vbox class="identity-popup-security-content">
         <vbox class="identity-popup-security-connection">
           <description class="identity-popup-connection-not-secure security-view"
                        when-connection="not-secure secure-cert-user-overridden cert-error-page net-error-page https-only-error-page" data-l10n-id="identity-connection-not-secure-security-view"></description>
           <description class="identity-popup-connection-secure security-view"
                        when-connection="secure secure-ev" data-l10n-id="identity-connection-verified"></description>
         </vbox>
       </vbox>
--- a/browser/components/controlcenter/content/permissionPanel.inc.xhtml
+++ b/browser/components/controlcenter/content/permissionPanel.inc.xhtml
@@ -10,18 +10,17 @@
        noautofocus="true"
        aria-labelledby="permission-popup-mainView-panel-header-span"
        onpopupshown="gPermissionPanel.onPopupShown(event);"
        onpopuphidden="gPermissionPanel.onPopupHidden(event);"
        orient="vertical">
   <panelmultiview id="permission-popup-multiView"
                   mainViewId="permission-popup-mainView">
     <panelview id="permission-popup-mainView"
-               role="document"
-               descriptionheightworkaround="true">
+               role="document">
       <vbox id="permission-popup-mainView-panel-header">
         <label>
           <html:span id="permission-popup-mainView-panel-header-span" role="heading" aria-level="1"/>
         </label>
       </vbox>
       <toolbarseparator></toolbarseparator>
       <hbox class="permission-popup-section">
         <vbox id="permission-popup-permissions-content" flex="1" role="group">
--- a/browser/components/controlcenter/content/protectionsPanel.inc.xhtml
+++ b/browser/components/controlcenter/content/protectionsPanel.inc.xhtml
@@ -11,18 +11,17 @@
        aria-labelledby="protections-popup-main-header-label"
        onpopupshown="gProtectionsHandler.onPopupShown(event);"
        onpopuphidden="gProtectionsHandler.onPopupHidden(event);"
        orient="vertical">
 
   <panelmultiview id="protections-popup-multiView"
                   mainViewId="protections-popup-mainView">
     <panelview id="protections-popup-mainView"
-               role="document"
-               descriptionheightworkaround="true">
+               role="document">
       <vbox id="protections-popup-mainView-panel-header-section">
         <hbox id="protections-popup-mainView-panel-header"
               onclick="gProtectionsHandler.onHeaderClicked(event);">
           <label id="protections-popup-main-header-label" flex="1"
                  role="heading" aria-level="1">
             <html:span id="protections-popup-mainView-panel-header-span"/>
           </label>
           <toolbarbutton id="protections-popup-info-button" class="panel-info-button"
@@ -66,55 +65,45 @@
       <!-- Tracking Protection Section -->
       <toolbarseparator></toolbarseparator>
       <vbox id="tracking-protection-container" class="protections-popup-section">
         <description id="protections-popup-no-trackers-found-description" data-l10n-id="protections-panel-no-trackers-found"></description>
         <tooltip id="protections-popup-not-blocking-why-etp-on-tooltip" data-l10n-id="protections-panel-not-blocking-why-etp-on-tooltip"></tooltip>
         <tooltip id="protections-popup-not-blocking-why-etp-off-tooltip" data-l10n-id="protections-panel-not-blocking-why-etp-off-tooltip"></tooltip>
         <vbox id="protections-popup-content" flex="1">
           <vbox id="protections-popup-category-list">
-            <!-- wrap=true is needed for descriptionheightworkaround, see bug 1564077 -->
             <toolbarbutton id="protections-popup-category-trackers"
                            oncommand="gProtectionsHandler.showTrackersSubview(event); gProtectionsHandler.recordClick('trackers');"
-                           class="protections-popup-category subviewbutton-nav" align="center"
-                           wrap="true">
+                           class="protections-popup-category subviewbutton-nav" align="center">
               <image class="protections-popup-category-icon trackers-icon"/>
               <label flex="1" class="protections-popup-category-label" data-l10n-id="protections-panel-content-blocking-tracking-protection"></label>
             </toolbarbutton>
-            <!-- wrap=true is needed for descriptionheightworkaround, see bug 1564077 -->
             <toolbarbutton id="protections-popup-category-socialblock"
                            oncommand="gProtectionsHandler.showSocialblockerSubview(event); gProtectionsHandler.recordClick('social');"
-                           class="protections-popup-category subviewbutton-nav" align="center"
-                           wrap="true">
+                           class="protections-popup-category subviewbutton-nav" align="center">
               <image class="protections-popup-category-icon socialblock-icon"/>
               <label flex="1"
               class="protections-popup-category-label" data-l10n-id="protections-panel-content-blocking-socialblock"></label>
             </toolbarbutton>
-            <!-- wrap=true is needed for descriptionheightworkaround, see bug 1564077 -->
             <toolbarbutton id="protections-popup-category-cookies"
                            oncommand="gProtectionsHandler.showCookiesSubview(event); gProtectionsHandler.recordClick('cookies');"
-                           class="protections-popup-category subviewbutton-nav" align="center"
-                           wrap="true">
+                           class="protections-popup-category subviewbutton-nav" align="center">
               <image class="protections-popup-category-icon thirdpartycookies-icon"/>
               <label flex="1" id="protections-popup-cookies-category-label"
                      class="protections-popup-category-label"/>
             </toolbarbutton>
-            <!-- wrap=true is needed for descriptionheightworkaround, see bug 1564077 -->
             <toolbarbutton id="protections-popup-category-cryptominers"
                            oncommand="gProtectionsHandler.showCryptominersSubview(event); gProtectionsHandler.recordClick('cryptominers');"
-                           class="protections-popup-category subviewbutton-nav" align="center"
-                           wrap="true">
+                           class="protections-popup-category subviewbutton-nav" align="center">
               <image class="protections-popup-category-icon cryptominers-icon"/>
               <label flex="1" class="protections-popup-category-label" data-l10n-id="protections-panel-content-blocking-cryptominers-label"></label>
             </toolbarbutton>
-            <!-- wrap=true is needed for descriptionheightworkaround, see bug 1564077 -->
             <toolbarbutton id="protections-popup-category-fingerprinters"
                            oncommand="gProtectionsHandler.showFingerprintersSubview(event); gProtectionsHandler.recordClick('fingerprinters');"
-                           class="protections-popup-category subviewbutton-nav" align="center"
-                           wrap="true">
+                           class="protections-popup-category subviewbutton-nav" align="center">
               <image class="protections-popup-category-icon fingerprinters-icon"/>
               <label flex="1" class="protections-popup-category-label" data-l10n-id="protections-panel-content-blocking-fingerprinters-label"></label>
             </toolbarbutton>
             <description id="protections-popup-blocking-section-header"
                          role="heading"
                          aria-level="2" data-l10n-id="protections-panel-blocking-label"></description>
             <hbox id="protections-popup-not-blocking-section-header" flex="1">
               <description id="protections-popup-not-blocking-section-description" flex="1" role="heading" aria-level="2" data-l10n-id="protections-panel-not-blocking-label"></description>
@@ -128,61 +117,54 @@
                          role="heading"
                          aria-level="2" data-l10n-id="protections-panel-not-found-label"></description>
           </vbox>
         </vbox>
       </vbox>
 
       <toolbarseparator></toolbarseparator>
       <vbox id="protections-popup-footer" class="protections-popup-section">
-        <!-- wrap=true is needed for descriptionheightworkaround, see bug 1564077 -->
         <toolbarbutton id="protections-popup-settings-button"
                        class="protections-popup-footer-button"
-                       wrap="true"
                        oncommand="gProtectionsHandler.openPreferences(); gProtectionsHandler.recordClick('settings');">
           <image class="protections-popup-footer-icon protections-popup-settings-icon"/>
           <label class="protections-popup-footer-button-label" flex="1" data-l10n-id="protections-panel-settings-label"></label>
           <label id="protections-popup-footer-protection-type-label"></label>
         </toolbarbutton>
         <stack id="protections-popup-show-report-stack">
-          <!-- wrap=true is needed for descriptionheightworkaround, see bug 1564077 -->
           <toolbarbutton id="protections-popup-show-report-button"
                          class="protections-popup-footer-button"
-                         wrap="true"
                          oncommand="gProtectionsHandler.openProtections(true); gProtectionsHandler.recordClick('full_report');">
             <image class="protections-popup-footer-icon protections-popup-show-report-icon"/>
             <label class="protections-popup-footer-button-label" flex="1" data-l10n-id="protections-panel-protectionsdashboard-label"></label>
           </toolbarbutton>
           <hbox id="protections-popup-trackers-blocked-counter-box"
                 align="center">
             <description id="protections-popup-trackers-blocked-counter-description"
                          onclick="gProtectionsHandler.openProtections(true);"/>
           </hbox>
         </stack>
       </vbox>
 
       <toolbarseparator id="protections-popup-milestones-separator"/>
       <hbox id="protections-popup-milestones" class="protections-popup-section">
-        <!-- wrap=true is needed for descriptionheightworkaround, see bug 1564077 -->
         <toolbarbutton id="protections-popup-milestones-content"
                        flex="1"
-                       wrap="true"
                        oncommand="gProtectionsHandler.openProtections(true); gProtectionsHandler.recordClick('milestone_message');">
           <description id="protections-popup-milestones-text" flex="1"
                        role="heading" aria-level="2"/>
           <image id="protections-popup-milestones-illustration"/>
         </toolbarbutton>
       </hbox>
     </panelview>
 
     <!-- Site Not Working? SubView -->
     <panelview id="protections-popup-siteNotWorkingView"
                role="document"
                data-l10n-id="protections-panel-site-not-working-view"
-               descriptionheightworkaround="true"
                flex="1">
         <hbox id="protections-popup-siteNotWorkingView-header">
           <vbox class="protections-popup-tp-switch-label-box" flex="1">
             <label class="protections-popup-tp-switch-on-header"
                    role="heading"
                    aria-level="1" data-l10n-id="protections-panel-etp-on-header"></label>
             <label class="protections-popup-tp-switch-off-header"
                    role="heading"
@@ -209,18 +191,17 @@
           <label id="protections-popup-siteNotWorkingView-sendReport"
             onclick="gProtectionsHandler.showSendReportView(); gProtectionsHandler.recordClick('send_report_link');"
             class="text-link" data-l10n-id="protections-panel-site-not-working-view-send-report"></label>
         </vbox>
     </panelview>
 
     <!-- Trackers SubView -->
     <panelview id="protections-popup-trackersView"
-               role="document"
-               descriptionheightworkaround="true">
+               role="document">
         <vbox id="protections-popup-trackersView-description" class="protections-popup-description">
           <description data-l10n-id="protections-panel-tracking-content"></description>
           <hbox id="protections-popup-trackersView-shim-allow-hint"
                 class="protections-popup-shim-allow-hint">
             <image class="protections-popup-shim-allow-hint-icon"></image>
             <vbox flex="1">
               <description data-l10n-id="protections-panel-description-shim-allowed">
               </description>
@@ -238,18 +219,17 @@
         <toolbarbutton id="protections-popup-trackersView-settings-button"
                 data-l10n-id="protections-panel-content-blocking-manage-settings"
                 class="subviewbutton panel-subview-footer-button"
                 oncommand="gProtectionsHandler.openPreferences(); gProtectionsHandler.recordClick('subview_settings', 'trackers');"/>
     </panelview>
 
     <!-- Social Block SubView -->
     <panelview id="protections-popup-socialblockView"
-               role="document"
-               descriptionheightworkaround="true">
+               role="document">
         <vbox id="protections-popup-socialblockView-heading" class="protections-popup-description">
           <description data-l10n-id="protections-panel-social-media-trackers"></description>
           <hbox id="protections-popup-socialblockView-shim-allow-hint"
                 class="protections-popup-shim-allow-hint">
             <image class="protections-popup-shim-allow-hint-icon"></image>
             <vbox flex="1">
               <description data-l10n-id="protections-panel-description-shim-allowed">
               </description>
@@ -267,35 +247,33 @@
         <toolbarbutton id="protections-popup-socialblockView-settings-button"
                 data-l10n-id="protections-panel-content-blocking-manage-settings"
                 class="subviewbutton panel-subview-footer-button"
                 oncommand="gProtectionsHandler.openPreferences(); gProtectionsHandler.recordClick('subview_settings', 'social');"/>
     </panelview>
 
     <!-- Cookies SubView -->
     <panelview id="protections-popup-cookiesView"
-               role="document"
-               descriptionheightworkaround="true">
+               role="document">
         <vbox id="protections-popup-cookiesView-heading" class="protections-popup-description">
           <description data-l10n-id="protections-panel-cross-site-tracking-cookies"></description>
         </vbox>
         <toolbarseparator></toolbarseparator>
         <vbox id="protections-popup-cookiesView-list" class="protections-popup-list">
         </vbox>
         <toolbarseparator></toolbarseparator>
         <toolbarbutton id="protections-popup-cookiesView-settings-button"
                   data-l10n-id="protections-panel-content-blocking-manage-settings"
                   class="subviewbutton panel-subview-footer-button"
                   oncommand="gProtectionsHandler.openPreferences(); gProtectionsHandler.recordClick('subview_settings', 'cookies');"/>
     </panelview>
 
     <!-- Fingerprinters SubView -->
     <panelview id="protections-popup-fingerprintersView"
-               role="document"
-               descriptionheightworkaround="true">
+               role="document">
         <vbox id="protections-popup-fingerprinters-heading" class="protections-popup-description">
           <description data-l10n-id="protections-panel-fingerprinters"></description>
           <hbox id="protections-popup-fingerprintersView-shim-allow-hint"
                 class="protections-popup-shim-allow-hint">
             <image class="protections-popup-shim-allow-hint-icon"></image>
             <vbox flex="1">
               <description data-l10n-id="protections-panel-description-shim-allowed">
               </description>
@@ -313,18 +291,17 @@
         <toolbarbutton id="protections-popup-fingerprintersView-settings-button"
                   data-l10n-id="protections-panel-content-blocking-manage-settings"
                   class="subviewbutton panel-subview-footer-button"
                   oncommand="gProtectionsHandler.openPreferences(); gProtectionsHandler.recordClick('subview_settings', 'fingerprinters');"/>
     </panelview>
 
     <!-- Cryptominers SubView -->
     <panelview id="protections-popup-cryptominersView"
-               role="document"
-               descriptionheightworkaround="true">
+               role="document">
         <vbox id="protections-popup-cryptominers-heading" class="protections-popup-description">
           <description data-l10n-id="protections-panel-cryptominers"></description>
           <hbox id="protections-popup-cryptominersView-shim-allow-hint"
                 class="protections-popup-shim-allow-hint">
             <image class="protections-popup-shim-allow-hint-icon"></image>
             <vbox flex="1">
               <description data-l10n-id="protections-panel-description-shim-allowed">
               </description>
@@ -342,18 +319,17 @@
         <toolbarbutton id="protections-popup-cryptominersView-settings-button"
                   data-l10n-id="protections-panel-content-blocking-manage-settings"
                   class="subviewbutton panel-subview-footer-button"
                   oncommand="gProtectionsHandler.openPreferences(); gProtectionsHandler.recordClick('subview_settings', 'cryptominers');"/>
     </panelview>
 
     <!-- Send Report SubView -->
     <panelview id="protections-popup-sendReportView"
-               data-l10n-id="protections-panel-content-blocking-breakage-report-view"
-               descriptionheightworkaround="true">
+               data-l10n-id="protections-panel-content-blocking-breakage-report-view">
         <vbox id="protections-popup-sendReportView-heading">
           <description data-l10n-id="protections-panel-content-blocking-breakage-report-view-description">
             <label id="protections-popup-sendReportView-learn-more"
                    is="text-link" data-l10n-name="learn-more"></label>
           </description>
         </vbox>
         <vbox id="protections-popup-sendReportView-body" class="panel-view-body-unscrollable">
           <vbox class="protections-popup-sendReportView-collection-section">
--- a/browser/components/customizableui/PanelMultiView.jsm
+++ b/browser/components/customizableui/PanelMultiView.jsm
@@ -126,17 +126,16 @@ const BLOCKERS_TIMEOUT_MS = 10000;
 const TRANSITION_PHASES = Object.freeze({
   START: 1,
   PREPARE: 2,
   TRANSITION: 3,
 });
 
 let gNodeToObjectMap = new WeakMap();
 let gWindowsWithUnloadHandler = new WeakSet();
-let gMultiLineElementsMap = new WeakMap();
 
 /**
  * Allows associating an object to a node lazily using a weak map.
  *
  * Classes deriving from this one may be easily converted to Custom Elements,
  * although they would lose the ability of being associated lazily.
  */
 var AssociatedToNode = class {
@@ -822,17 +821,16 @@ var PanelMultiView = class extends Assoc
     // reset all the properties that may be set on a subview.
     nextPanelView.mainview = true;
     nextPanelView.headerText = "";
     nextPanelView.minMaxWidth = 0;
     nextPanelView.minMaxHeight = 0;
 
     // Ensure the view will be visible once the panel is opened.
     nextPanelView.visible = true;
-    nextPanelView.descriptionHeightWorkaround();
 
     return true;
   }
 
   /**
    * Opens the specified PanelView and dispatches the ViewShowing event, which
    * can be used to populate the subview or cancel the operation.
    *
@@ -986,30 +984,25 @@ var PanelMultiView = class extends Assoc
       // Until the header is visible, it has 0 height.
       // Wait for layout before measuring it
       let header = viewNode.firstElementChild;
       if (header && header.classList.contains("panel-header")) {
         viewRect.height += await window.promiseDocumentFlushed(() => {
           return this._getBoundsWithoutFlushing(header).height;
         });
       }
-      await nextPanelView.descriptionHeightWorkaround();
       // Bail out if the panel was closed in the meantime.
       if (!nextPanelView.isOpenIn(this)) {
         return;
       }
     } else {
       this._offscreenViewStack.style.minHeight = olderView.knownHeight + "px";
       this._offscreenViewStack.appendChild(viewNode);
       nextPanelView.visible = true;
 
-      // Now that the subview is visible, we can check the height of the
-      // description elements it contains.
-      await nextPanelView.descriptionHeightWorkaround();
-
       viewRect = await window.promiseDocumentFlushed(() => {
         return this._getBoundsWithoutFlushing(viewNode);
       });
       // Bail out if the panel was closed in the meantime.
       if (!nextPanelView.isOpenIn(this)) {
         return;
       }
 
@@ -1262,17 +1255,16 @@ var PanelMultiView = class extends Assoc
       }
       case "popupshown":
         // The main view is always open and visible when the panel is first
         // shown, so we can check the height of the description elements it
         // contains and notify consumers using the ViewShown event. In order to
         // minimize flicker we need to allow synchronous reflows, and we still
         // make sure the ViewShown event is dispatched synchronously.
         let mainPanelView = this.openViews[0];
-        mainPanelView.descriptionHeightWorkaround(true).catch(Cu.reportError);
         this._activateView(mainPanelView);
         break;
       case "popuphidden": {
         // WebExtensions consumers can hide the popup from viewshowing, or
         // mid-transition, which disrupts our state:
         this._transitioning = false;
         this._viewContainer.removeAttribute("panelopen");
         this._cleanupTransitionPhase();
@@ -1463,134 +1455,16 @@ var PanelView = class extends Associated
    */
   captureKnownSize() {
     let rect = this._getBoundsWithoutFlushing(this.node);
     this.knownWidth = rect.width;
     this.knownHeight = rect.height;
   }
 
   /**
-   * If the main view or a subview contains wrapping elements, the attribute
-   * "descriptionheightworkaround" should be set on the view to force all the
-   * wrapping "description", "label" or "toolbarbutton" elements to a fixed
-   * height. If the attribute is set and the visibility, contents, or width
-   * of any of these elements changes, this function should be called to
-   * refresh the calculated heights.
-   *
-   * @param allowSyncReflows
-   *        If set to true, the function takes a path that allows synchronous
-   *        reflows, but minimizes flickering. This is used for the main view
-   *        because we cannot use the workaround off-screen.
-   */
-  async descriptionHeightWorkaround(allowSyncReflows = false) {
-    if (!this.node.hasAttribute("descriptionheightworkaround")) {
-      // This view does not require the workaround.
-      return;
-    }
-
-    const profilerMarkerStartTime = Cu.now();
-
-    // We batch DOM changes together in order to reduce synchronous layouts.
-    // First we reset any change we may have made previously. The first time
-    // this is called, and in the best case scenario, this has no effect.
-    let items = [];
-    let collectItems = () => {
-      // Non-hidden <label> or <description> elements that also aren't empty
-      // and also don't have a value attribute can be multiline (if their
-      // text content is long enough).
-      let isMultiline = ":not([hidden],[value],:empty)";
-      let selector = [
-        "description" + isMultiline,
-        "label" + isMultiline,
-        "toolbarbutton[wrap]:not([hidden])",
-      ].join(",");
-      for (let element of this.node.querySelectorAll(selector)) {
-        // Ignore items in hidden containers.
-        if (element.closest("[hidden]")) {
-          continue;
-        }
-
-        // Ignore content inside a <toolbarbutton>
-        if (
-          element.tagName != "toolbarbutton" &&
-          element.closest("toolbarbutton")
-        ) {
-          continue;
-        }
-
-        // Take the label for toolbarbuttons; it only exists on those elements.
-        element = element.multilineLabel || element;
-
-        let bounds = element.getBoundingClientRect();
-        let previous = gMultiLineElementsMap.get(element);
-        // We don't need to (re-)apply the workaround for invisible elements or
-        // on elements we've seen before and haven't changed in the meantime.
-        if (
-          !bounds.width ||
-          !bounds.height ||
-          (previous &&
-            element.textContent == previous.textContent &&
-            bounds.width == previous.bounds.width)
-        ) {
-          continue;
-        }
-
-        items.push({ element });
-      }
-    };
-    if (allowSyncReflows) {
-      collectItems();
-    } else {
-      await this.window.promiseDocumentFlushed(collectItems);
-      // Bail out if the panel was closed in the meantime.
-      if (!this.node.panelMultiView) {
-        return;
-      }
-    }
-
-    // Removing the 'height' property will only cause a layout flush in the next
-    // loop below if it was set.
-    for (let item of items) {
-      item.element.style.removeProperty("height");
-    }
-
-    // We now read the computed style to store the height of any element that
-    // may contain wrapping text.
-    let measureItems = () => {
-      for (let item of items) {
-        item.bounds = item.element.getBoundingClientRect();
-      }
-    };
-    if (allowSyncReflows) {
-      measureItems();
-    } else {
-      await this.window.promiseDocumentFlushed(measureItems);
-      // Bail out if the panel was closed in the meantime.
-      if (!this.node.panelMultiView) {
-        return;
-      }
-    }
-
-    // Now we can make all the necessary DOM changes at once.
-    for (let { element, bounds } of items) {
-      gMultiLineElementsMap.set(element, {
-        bounds,
-        textContent: element.textContent,
-      });
-      element.style.height = bounds.height + "px";
-    }
-
-    ChromeUtils.addProfilerMarker(
-      "PMV.descriptionHeightWorkaround()",
-      profilerMarkerStartTime,
-      `<${this.node.tagName} id="${this.node.id}">`
-    );
-  }
-
-  /**
    * Determine whether an element can only be navigated to with tab/shift+tab,
    * not the arrow keys.
    */
   _isNavigableWithTabOnly(element) {
     let tag = element.localName;
     return (
       tag == "menulist" ||
       tag == "radiogroup" ||
--- a/browser/components/downloads/content/downloadsPanel.inc.xhtml
+++ b/browser/components/downloads/content/downloadsPanel.inc.xhtml
@@ -165,17 +165,16 @@
                     pack="start"/>
           </vbox>
         </stack>
       </vbox>
     </panelview>
 
     <panelview id="downloadsPanel-blockedSubview"
                data-l10n-id="downloads-details"
-               descriptionheightworkaround="true"
                class="PanelUI-subView">
       <vbox class="panel-view-body-unscrollable">
         <hbox class="downloadsPanel-blockedSubview-title-box">
           <description id="downloadsPanel-blockedSubview-title"/>
           <image class="downloadsPanel-blockedSubview-image"/>
         </hbox>
         <description id="downloadsPanel-blockedSubview-details1"/>
         <description id="downloadsPanel-blockedSubview-details2"/>
--- a/devtools/client/performance-new/popup/panel.jsm.js
+++ b/devtools/client/performance-new/popup/panel.jsm.js
@@ -130,19 +130,16 @@ function createViewControllers(state, el
         );
         elements.presetsMenuList.value = presetName;
       } else {
         elements.presetDescription.style.display = "none";
         // We don't remove the l10n-id attribute as the element is hidden anyway.
         // It will be updated again when it's displayed next time.
         elements.presetsMenuList.value = "custom";
       }
-      const { PanelMultiView } = lazy.PanelMultiView();
-      // Update the description height sizing.
-      PanelMultiView.forNode(elements.panelview).descriptionHeightWorkaround();
     },
 
     updateProfilerState() {
       if (Services.profiler.IsActive()) {
         elements.inactive.hidden = true;
         elements.active.hidden = false;
         elements.settingsSection.hidden = true;
         elements.contentRecording.hidden = false;
@@ -216,21 +213,16 @@ function initializeView(state, elements,
   elements.window.requestAnimationFrame(() => {
     // Allow the elements to layout once, the updateInfoCollapse implementation measures
     // the size of the container. It needs to wait a second before the bounding box
     // returns an actual size.
     view.updateInfoCollapse();
     view.updateProfilerState();
     view.updatePresets();
 
-    // XUL <description> elements don't vertically size correctly, this is
-    // the workaround for it.
-    const { PanelMultiView } = lazy.PanelMultiView();
-    PanelMultiView.forNode(elements.panelview).descriptionHeightWorkaround();
-
     // Now wait for another rAF, and turn the animations back on.
     elements.window.requestAnimationFrame(() => {
       elements.header.setAttribute("animationready", "true");
     });
   });
 }
 
 /**