Commit 958f051a authored by Mike Conley's avatar Mike Conley
Browse files

Bug 1700198 - Remove subviewbutton-iconic class from Library panel markup. r=mhowell

parent 519e7347
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -861,17 +861,17 @@
  <panelview id="appMenu-libraryView" class="PanelUI-subView">
    <vbox class="panel-subview-body">
      <toolbarbutton id="appMenu-library-bookmarks-button"
                     class="subviewbutton subviewbutton-iconic subviewbutton-nav"
                     class="subviewbutton subviewbutton-nav"
                     data-l10n-id="library-bookmarks-menu"
                     closemenu="none"
                     oncommand="BookmarkingUI.showSubView(this);"/>
      <toolbarbutton id="appMenu-library-history-button"
                     class="subviewbutton subviewbutton-iconic subviewbutton-nav"
                     class="subviewbutton subviewbutton-nav"
                     label="&historyMenu.label;"
                     closemenu="none"
                     oncommand="PanelUI.showSubView('PanelUI-history', this)"/>
      <toolbarbutton id="appMenu-library-downloads-button"
                     class="subviewbutton subviewbutton-iconic"
                     class="subviewbutton"
                     label="&libraryDownloads.label;"
                     oncommand="DownloadsPanel.showDownloadsHistory();"/>
    </vbox>
+0 −37
Original line number Diff line number Diff line
@@ -192,9 +192,6 @@ const PanelUI = {
    this.menuButton.removeEventListener("mousedown", this);
    this.menuButton.removeEventListener("keypress", this);
    CustomizableUI.removeListener(this);
    if (this.libraryView) {
      this.libraryView.removeEventListener("ViewShowing", this);
    }
    if (this.whatsNewPanel) {
      this.whatsNewPanel.removeEventListener("ViewShowing", this);
    }
@@ -334,8 +331,6 @@ const PanelUI = {
      case "ViewShowing":
        if (aEvent.target == this.whatsNewPanel) {
          this.onWhatsNewPanelShowing();
        } else if (aEvent.target == this.libraryView) {
          this.onLibraryShowing(this.libraryView);
        }
        break;
    }
@@ -467,7 +462,6 @@ const PanelUI = {
      return;
    }

    this.ensureLibraryInitialized(viewNode);
    this.ensureWhatsNewInitialized(viewNode);
    this.ensurePanicViewInitialized(viewNode);

@@ -546,24 +540,6 @@ const PanelUI = {
    }
  },

  /**
   * Sets up the event listener for when the Library view is shown.
   *
   * @param {panelview} viewNode The library view.
   */
  ensureLibraryInitialized(viewNode) {
    if (viewNode.id != "appMenu-libraryView" || viewNode._initialized) {
      return;
    }

    if (!this.libraryView) {
      this.libraryView = viewNode;
    }

    viewNode._initialized = true;
    viewNode.addEventListener("ViewShowing", this);
  },

  /**
   * Sets up the event listener for when the What's New panel is shown.
   *
@@ -611,19 +587,6 @@ const PanelUI = {
    );
  },

  onLibraryShowing(libraryPanel) {
    // While we support this panel for both Proton and non-Proton versions
    // of the AppMenu, we only want to show icons for the non-Proton
    // version. When Proton ships and we remove the non-Proton variant,
    // we can remove the subviewbutton-iconic classes from the markup.
    if (PanelUI.protonAppMenuEnabled) {
      let toolbarbuttons = libraryPanel.querySelectorAll("toolbarbutton");
      for (let toolbarbutton of toolbarbuttons) {
        toolbarbutton.classList.remove("subviewbutton-iconic");
      }
    }
  },

  /**
   * NB: The enable- and disableSingleSubviewPanelAnimations methods only
   * affect the hiding/showing animations of single-subview panels (tempPanel