Backed out changeset 4e1a1565e417 (bug 1007283) for causing 1385079 a=bustage
authorWes Kocher <wkocher@mozilla.com>
Fri, 28 Jul 2017 14:28:17 -0700
changeset 371615 e91b2c85aacd
parent 371614 16ffc1d05422
child 371697 ec329722b2f8
push id32251
push userkwierso@gmail.com
push dateFri, 28 Jul 2017 21:28:24 +0000
treeherdermozilla-central@e91b2c85aacd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1007283, 1385079
milestone56.0a1
backs out4e1a1565e417
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
Backed out changeset 4e1a1565e417 (bug 1007283) for causing 1385079 a=bustage MozReview-Commit-ID: 1FeEnNpHa8q
browser/base/content/browser.css
layout/xul/nsMenuPopupFrame.cpp
layout/xul/nsXULPopupManager.cpp
toolkit/content/tests/chrome/test_arrowpanel.xul
toolkit/content/xul.css
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -1175,17 +1175,17 @@ toolbarpaletteitem[place="palette"] > #d
   -moz-window-transform-origin: 20px bottom;
 }
 
 #BMB_bookmarksPopup[arrowposition="before_end"]:-moz-locale-dir(ltr),
 #BMB_bookmarksPopup[arrowposition="before_start"]:-moz-locale-dir(rtl) {
   -moz-window-transform-origin: calc(100% - 20px) bottom;
 }
 
-%else
+%elifndef MOZ_WIDGET_GTK
 
 #BMB_bookmarksPopup {
   transform: scale(.4);
   opacity: 0;
   transition-property: transform, opacity;
   transition-duration: 0.15s;
   transition-timing-function: ease-out;
 }
--- a/layout/xul/nsMenuPopupFrame.cpp
+++ b/layout/xul/nsMenuPopupFrame.cpp
@@ -578,26 +578,28 @@ nsMenuPopupFrame::LayoutPopup(nsBoxLayou
   if (mIsOpenChanged) {
     mIsOpenChanged = false;
 
     // Make sure the current selection in a menulist is visible.
     if (IsMenuList() && mCurrentMenu) {
       EnsureMenuItemIsVisible(mCurrentMenu);
     }
 
+#ifndef MOZ_WIDGET_GTK
     // If the animate attribute is set to open, check for a transition and wait
     // for it to finish before firing the popupshown event.
     if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::animate,
                               nsGkAtoms::open, eCaseMatters) &&
         nsLayoutUtils::HasCurrentTransitions(this)) {
       mPopupShownDispatcher = new nsXULPopupShownEvent(mContent, pc);
       mContent->AddSystemEventListener(NS_LITERAL_STRING("transitionend"),
                                        mPopupShownDispatcher, false, false);
       return;
     }
+#endif
 
     // If there are no transitions, fire the popupshown event right away.
     nsCOMPtr<nsIRunnable> event = new nsXULPopupShownEvent(GetContent(), pc);
     mContent->OwnerDoc()->Dispatch(TaskCategory::Other,
                                    event.forget());
   }
 
   if (needCallback && !mReflowCallbackData.mPosted) {
--- a/layout/xul/nsXULPopupManager.cpp
+++ b/layout/xul/nsXULPopupManager.cpp
@@ -1597,17 +1597,19 @@ nsXULPopupManager::FirePopupHidingEvent(
       popupFrame->SetPopupState(ePopupShown);
     }
     else {
       // If the popup has an animate attribute and it is not set to false, check
       // if it has a closing transition and wait for it to finish. The transition
       // may still occur either way, but the view will be hidden and you won't be
       // able to see it. If there is a next popup, indicating that mutliple popups
       // are rolling up, don't wait and hide the popup right away since the effect
-      // would likely be undesirable.
+      // would likely be undesirable. Transitions are currently disabled on Linux
+      // due to rendering issues on certain configurations.
+#ifndef MOZ_WIDGET_GTK
       if (!aNextPopup && aPopup->HasAttr(kNameSpaceID_None, nsGkAtoms::animate)) {
         // If animate="false" then don't transition at all. If animate="cancel",
         // only show the transition if cancelling the popup or rolling up.
         // Otherwise, always show the transition.
         nsAutoString animate;
         aPopup->GetAttr(kNameSpaceID_None, nsGkAtoms::animate, animate);
 
         if (!animate.EqualsLiteral("false") &&
@@ -1622,16 +1624,17 @@ nsXULPopupManager::FirePopupHidingEvent(
           if (nsLayoutUtils::HasCurrentTransitions(popupFrame)) {
             RefPtr<TransitionEnder> ender = new TransitionEnder(aPopup, aDeselectMenu);
             aPopup->AddSystemEventListener(NS_LITERAL_STRING("transitionend"),
                                            ender, false, false);
             return;
           }
         }
       }
+#endif
 
       HidePopupCallback(aPopup, popupFrame, aNextPopup, aLastPopup,
                         aPopupType, aDeselectMenu);
     }
   }
 }
 
 bool
--- a/toolkit/content/tests/chrome/test_arrowpanel.xul
+++ b/toolkit/content/tests/chrome/test_arrowpanel.xul
@@ -175,37 +175,41 @@ function* nextTest()
     $("bottomleft").setAttribute("right", "15");
     $("bottomright").setAttribute("left", "15");
     $("topleft").removeAttribute("left");
     $("topright").removeAttribute("right");
     $("bottomleft").removeAttribute("left");
     $("bottomright").removeAttribute("right");
   }
 
-  function transitionEnded(event) {
-    if ($("animatepanel").state != "open") {
-      is($("animatepanel").state, "showing", "state is showing during transitionend");
-      ok(!animatedPopupShown, "popupshown not fired yet")
-    } else {
-      is($("animatepanel").state, "open", "state is open after transitionend");
-      ok(animatedPopupShown, "popupshown now fired")
-      SimpleTest.executeSoon(() => runNextTest.next());
+  // Test that a transition occurs when opening or closing the popup. The transition is
+  // disabled on Linux.
+  if (navigator.platform.indexOf("Linux") == -1) {
+    function transitionEnded(event) {
+      if ($("animatepanel").state != "open") {
+        is($("animatepanel").state, "showing", "state is showing during transitionend");
+        ok(!animatedPopupShown, "popupshown not fired yet")
+      } else {
+        is($("animatepanel").state, "open", "state is open after transitionend");
+        ok(animatedPopupShown, "popupshown now fired")
+        SimpleTest.executeSoon(() => runNextTest.next());
+      }
     }
-  }
 
-  // Check that the transition occurs for an arrow panel with animate="true"
-  window.addEventListener("transitionend", transitionEnded, false);
-  $("animatepanel").openPopup($("topleft"), "after_start", 0, 0, false, false, null, "start");
-  is($("animatepanel").state, "showing", "state is showing");
-  yield;
-  window.removeEventListener("transitionend", transitionEnded, false);
+    // Check that the transition occurs for an arrow panel with animate="true"
+    window.addEventListener("transitionend", transitionEnded, false);
+    $("animatepanel").openPopup($("topleft"), "after_start", 0, 0, false, false, null, "start");
+    is($("animatepanel").state, "showing", "state is showing");
+    yield;
+    window.removeEventListener("transitionend", transitionEnded, false);
 
-  synthesizeKey("VK_ESCAPE", { });
-  ok(!animatedPopupHidden, "animated popup not hidden yet");
-  yield;
+    synthesizeKey("VK_ESCAPE", { });
+    ok(!animatedPopupHidden, "animated popup not hidden yet");
+    yield;
+  }
 
   SimpleTest.finish()
 }
 
 function setScale(win, scale)
 {
   var wn = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
               .getInterface(Components.interfaces.nsIWebNavigation);
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -503,17 +503,17 @@ panel[arrowposition="start_before"]:-moz
   -moz-window-transform-origin: left 20px;
 }
 
 panel[arrowposition="end_after"]:-moz-locale-dir(ltr),
 panel[arrowposition="start_after"]:-moz-locale-dir(rtl) {
   -moz-window-transform-origin: left calc(100% - 20px);
 }
 
-%else
+%elifndef MOZ_WIDGET_GTK
 
 panel[type="arrow"]:not([animate="false"]) {
   transform: scale(.4);
   opacity: 0;
   transition-property: transform, opacity;
   transition-duration: 0.15s;
   transition-timing-function: ease-out;
 }