Bug 1428839 - Part 6 - Remove previous workaround for the panel resizing at the end of the transition. r=Gijs draft
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Tue, 27 Feb 2018 16:13:48 +0000
changeset 761007 2a0bc71f245bc93095497d5f75ae6fc5f3ae505a
parent 761006 071398e4381f890fdb097e09f90dde6c5cd910df
child 761008 28706bcd77ce1002ef633614002a99a791faa2eb
push id100802
push userpaolo.mozmail@amadzone.org
push dateWed, 28 Feb 2018 13:44:56 +0000
reviewersGijs
bugs1428839, 1354141
milestone60.0a1
Bug 1428839 - Part 6 - Remove previous workaround for the panel resizing at the end of the transition. r=Gijs This was added in bug 1354141 and is not needed anymore. MozReview-Commit-ID: 42oF7LpCa6R
browser/components/customizableui/PanelMultiView.jsm
--- a/browser/components/customizableui/PanelMultiView.jsm
+++ b/browser/components/customizableui/PanelMultiView.jsm
@@ -845,19 +845,16 @@ var PanelMultiView = class extends this.
     // Clean up any previous transition that may be active at this point.
     this._cleanupTransitionPhase();
 
     const { window } = this;
 
     let nextPanelView = PanelView.forNode(viewNode);
     let prevPanelView = PanelView.forNode(previousViewNode);
 
-    if (this._autoResizeWorkaroundTimer)
-      window.clearTimeout(this._autoResizeWorkaroundTimer);
-
     let details = this._transitionDetails = {
       phase: TRANSITION_PHASES.START,
     };
 
     // Set the viewContainer dimensions to make sure only the current view is
     // visible.
     let olderView = reverse ? nextPanelView : prevPanelView;
     this._viewContainer.style.minHeight = olderView.knownHeight + "px";
@@ -1002,26 +999,18 @@ var PanelMultiView = class extends this.
 
     let {phase, resolve, listener, cancelListener} = details;
     if (details == this._transitionDetails)
       this._transitionDetails = null;
 
     if (phase >= TRANSITION_PHASES.START) {
       this._panel.removeAttribute("width");
       this._panel.removeAttribute("height");
-      // Myeah, panel layout auto-resizing is a funky thing. We'll wait
-      // another few milliseconds to remove the width and height 'fixtures',
-      // to be sure we don't flicker annoyingly.
-      // NB: HACK! Bug 1363756 is there to fix this.
-      this._autoResizeWorkaroundTimer = this.window.setTimeout(() => {
-        if (!this._viewContainer)
-          return;
-        this._viewContainer.style.removeProperty("height");
-        this._viewContainer.style.removeProperty("width");
-      }, 500);
+      this._viewContainer.style.removeProperty("height");
+      this._viewContainer.style.removeProperty("width");
     }
     if (phase >= TRANSITION_PHASES.PREPARE) {
       this._transitioning = false;
       this._viewStack.style.removeProperty("margin-inline-start");
       this._viewStack.style.removeProperty("transition");
     }
     if (phase >= TRANSITION_PHASES.TRANSITION) {
       this._viewStack.style.removeProperty("transform");